jiasenlu / vilbert_beta

473 stars 96 forks source link

Could not download image of conceptual_captions? #77

Open heyichang opened 1 year ago

heyichang commented 1 year ago

headers = {

'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36',

'User-Agent':'Googlebot-Image/1.0', # Pretend to be googlebot
'X-Forwarded-For': '64.18.15.200'

}

try this url 'https://i.pinimg.com/736x/94/8e/5e/948e5e26c5e79a6b7db24accf918e98f--jean-skirts-cowboy-boots.jpg'

response = requests.get('https://i.pinimg.com/736x/94/8e/5e/948e5e26c5e79a6b7db24accf918e98f--jean-skirts-cowboy-boots.jpg', stream=False, timeout=10, allow_redirects=True, headers=headers)

get the error ConnectTimeoutError