They are blocking urllib,but it work with Requests(as you should use anyway).
You always do test like this,before you are making a loop
Quote:please write it for me , i cant understand anythingYou should try yourself,but to be nice here how to download 1 image.
You always do test like this,before you are making a loop
from bs4 import BeautifulSoup import requests import os page = 4 url = 'https://alpha.wallhaven.cc/random?page={}'.format(page) url_get = requests.get(url) soup = BeautifulSoup(url_get.content, 'html.parser') # Parse kelimeler = soup.find("img", {"class":"lazyload"}) img_nr = os.path.basename(kelimeler['data-src']) img_nr = img_nr.split('-')[-1] img_large = 'https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-{}'.format(img_nr) # Download down_link = requests.get(img_large) with open(img_nr, "wb") as img_obj: img_obj.write(down_link.content)