>>> import requests
>>> test = {'elementID': 'find_unp_reestr', 'begin_between': '1', 'end_between': '10', 'unp': '490822627'}
>>> r = requests.post("http://www.portal.nalog.gov.by/ngb/data/", data=test)
>>> r.text
'<tbody><tr><td>490822627</td><td>Общество с ограниченной ответственностью "Джог и Ко"</td><td>23.04.2014</td><td>Абзац 6 п.1.1 Указа 488</td><td/><td/></tr></tbody>'
total_pages = int(soup.find('div', {'class': 'page_listing'}).findAll('a')[-1].text)
base_url = 'https://www.citilink.ru/catalog/computers_and_notebooks/computers/?available=1&status=55395790&p={}'
urls = [base_url.format(x) for x in range (1, total_pages+1)]
class SaveImg():
def __init__(self, new_dir_name, images_url):
os.chdir('images')
os.mkdir(str(new_dir_name))
os.chdir(str(new_dir_name))
count = 1
for img in images_url:
img_name = str(count) + '.jpg'
try:
urlretrieve(img, img_name)
count += 1
except ContentTooShortError as e:
print(e)
continue
os.chdir('..')
os.chdir('..')