I've been trying to make a script that scrape 9gag and retreive posts from specific categories. The problem is when im trying to download the jpg pictures a certificate issue emerges.
Is there another way to download the pictures?
The url for each pictures can be presented somewhat like this:
https://img-9gag-fun.9cache.com/photo/aAgRxj0_460s.jpg https://img-9gag-fun.9cache.com/photo/aDgAx0N_460s.jpg
The code for downloading the images:
def download(pictures, file_name, name):
for images in pictures['url_images']:
full_path = file_name + name + '.jpg'
urllib.request.urlretrieve(images, full_path)
The following result is presented:
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)>