Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- img_url = "http://site.com/image1337.jpg"
- # как получить?
- img_cached = ???
- headers = {
- 'Accept': 'application/json',
- }
- files = {
- # подготовить полученное изображение к отправке
- 'img': ('some_img.jpg', img_cached),
- }
- response = requests.post('https://example.com/api/',headers=headers, files=files, auth=('login', 'password'))
Add Comment
Please, Sign In to add comment