Thành Trung Phan
Thành Trung Phan

Reputation: 15

How to get data from label box?

I have a link that leads to an image. How can I get it or download it with python? This is the link of the image: https://storage.labelbox.com/ckc5wddcn1f6x0766ewd1yuc1%2Fa58f8ca1-3265-ad38-6c3d-c71e8e6a88a6-image852.jpg?Expires=1597225683779&KeyName=labelbox-assets-key-1&Signature=PpAGopCySjZQz4r49sLPaa72CLs

Upvotes: 1

Views: 756

Answers (1)

bigbounty
bigbounty

Reputation: 17408

You can use requests module to download the image

import requests

res = requests.get("https://storage.labelbox.com/ckc5wddcn1f6x0766ewd1yuc1%2Fa58f8ca1-3265-ad38-6c3d-c71e8e6a88a6-image852.jpg?Expires=1597225683779&KeyName=labelbox-assets-key-1&Signature=PpAGopCySjZQz4r49sLPaa72CLs")

with open("a.jpg", "wb") as f:
    f.write(res.content)

Upvotes: 2

Related Questions