shop_name = 'test'
headers = {}
headers.update({'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,'
'image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'})
# headers.update({'accept-encoding': 'gzip, deflate, br'})
headers.update({'accept-language': 'ru-RU,ru;q=0.9'})
headers.update({'referer': f'https://rents.ws/ru/shops/settings/{shop_name}/goods/'})
headers.update({'sec-fetch-dest': 'document'})
headers.update({'sec-fetch-mode': 'navigate'})
headers.update({'sec-fetch-site': 'same-site'})
headers.update({'sec-fetch-user': '?1'})
headers.update({'upgrade-insecure-requests': '1'})
headers.update({'origin': 'https://m.vk.com'})
headers.update({'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/88.0.4324.190 Safari/537.36'})
with open('shoptest_cookies.pkl', mode='rb') as file:
cookies = pickle.load(file)
url = f'http://rents.ws/ru/shops/settings/{shop_name}/goods/'
res = requests.get(url=url, cookies=cookies, verify=False, headers=headers)
print(res.text)
print('\n\n\n')
# очистка товара
good_id = 1039885
url = f'http://rents.ws/ru/shops/settings/{shop_name}/goods/clean/{good_id}/'
res = requests.get(url=url, cookies=cookies, verify=False, headers=headers)
print(res.text)