зеркало из
https://github.com/viginum-datalab/twscrape.git
synced 2025-10-29 13:06:13 +02:00
improve Dependency (131) handling #166
Этот коммит содержится в:
родитель
6ed84ae45e
Коммит
cd5724b002
@ -170,8 +170,13 @@ class QueueClient:
|
|||||||
|
|
||||||
# something from twitter side - abort all queries, see: https://github.com/vladkens/twscrape/pull/80
|
# something from twitter side - abort all queries, see: https://github.com/vladkens/twscrape/pull/80
|
||||||
if err_msg.startswith("(131) Dependency: Internal error"):
|
if err_msg.startswith("(131) Dependency: Internal error"):
|
||||||
logger.warning(f"Dependency error (request skipped): {err_msg}")
|
# looks like when data exists, we can ignore this error
|
||||||
raise AbortReqError()
|
# https://github.com/vladkens/twscrape/issues/166
|
||||||
|
if rep.status_code == 200 and "data" in res and "user" in res["data"]:
|
||||||
|
err_msg = "OK"
|
||||||
|
else:
|
||||||
|
logger.warning(f"Dependency error (request skipped): {err_msg}")
|
||||||
|
raise AbortReqError()
|
||||||
|
|
||||||
# content not found
|
# content not found
|
||||||
if rep.status_code == 200 and "_Missing: No status found with that ID" in err_msg:
|
if rep.status_code == 200 and "_Missing: No status found with that ID" in err_msg:
|
||||||
|
|||||||
Загрузка…
x
Ссылка в новой задаче
Block a user