Relative Content

Tag Archive for pythonhttppython-requestsproxyhttp-status-code-429

429 response code even with proxy rotation

import re import requests from bs4 import BeautifulSoup from random import choice http = [‘http://89.23.112.143:80’, ‘http://84.47.161.3:8118’, ‘http://77.232.21.4:8080’, ‘http://194.67.91.153:80’, ‘http://195.161.41.163:8080’] current_proxy = { ‘http’: f'{choice(http)}’, } def get_autobuy(steam_listing): steam_url=’https://steamcommunity.com/market/listings/730/’+steam_listing current_proxy[‘http’] = choice(http) html = requests.get(steam_url, proxies=current_proxy).text soup = BeautifulSoup(html, ‘lxml’) id = None for script in soup.find_all(‘script’): id_regex = re.search(r’Market_LoadOrderSpread(([ 0-9]+))’, script.text) if id_regex: id = […]