You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scraper when receives <Response [429 Too Many Requests]> returns None which causes Cannot parse JSON response 'NoneType' object has no attribute 'json' inside of 'get_json'
#234
defget_json(res: list[Response], **kwargs) ->list:
cursor=kwargs.get('cursor')
temp=resifany(isinstance(r, (list, tuple)) forrinres):
temp=flatten(res)
results= []
forrintemp:
try:
ifrisNone: # Add this check herecontinuedata=r.json()
ifcursor:
results.append([data, cursor])
else:
results.append(data)
exceptExceptionase:
print('Cannot parse JSON response', e)
print(dedent(f'''{ORANGE} Checklist: 1. Log-in via the browser and confirm your account is not blocked, or has pending security challenges. 2. Copy the `ct0` and `auth_token` cookies from the browser. 3. Re-run your program using these new cookies.{RESET}'''))
returnresults
The text was updated successfully, but these errors were encountered:
vxoid
added a commit
to vxoid/twitter-api-client
that referenced
this issue
Sep 14, 2024
pretty easy fix here
The text was updated successfully, but these errors were encountered: