service_args = [
'--proxy=192.168.0.1:3128',
'--proxy-auth=login:pass'
]
from PIL import Image
import requests
from io import BytesIO
response = requests.get(url)
img = Image.open(BytesIO(response.content))
with open(filename, 'rb') as f:
r = requests.post(url, data=f.read())