Unable to Get Image Using urllib3
Question:
Answers:
You need to specify the headers:
import urllib3
url = "https://www.mouser.com/images/adi/sm/ITP_ADI_SOT-23-6_05-08-1636_t.jpg"
http = urllib3.PoolManager(headers={'User-Agent': 'Mozilla/5.0'})
response = http.request('GET', url)
print(response.status)
You need to specify the headers:
import urllib3
url = "https://www.mouser.com/images/adi/sm/ITP_ADI_SOT-23-6_05-08-1636_t.jpg"
http = urllib3.PoolManager(headers={'User-Agent': 'Mozilla/5.0'})
response = http.request('GET', url)
print(response.status)