grequests парсит только первую страницу
1)Почему не парсятся все страницы, а только 1 страница во втором цикле? 2)Почему не находит все ключи?
import grequests
import json
import fake_useragent
urls=[]
try:
for url in range(176288495,176288500):
urls.append(f"https://steamcommunity.com/market/itemordershistogram?country=RU&language=russian¤cy=5&item_nameid={url}&two_factor=0")
responce=[grequests.get(u, headers={'user-agent' : fake_useragent.UserAgent().random}) for u in urls]
maps=grequests.map(responce)
print(maps)
for count in maps: #
js=json.loads(count.text)
print(js)
for key in js.keys():
print(key)
if key == 'buy_order_graph':
order_price = float(js.get(key)[0][0])
if key == 'sell_order_summary':
quantily = int(str(re.findall("\d+", js.get(key))[0]).replace("{'", '').replace("'}", ''))
if key == 'sell_order_graph':
normal_price = float(js.get(key)[0][0])
print(f'{order_price} -- {normal_price} -- {quantily} ')
except Exception:
pass
finally:
pass