|
|
|
@ -85,9 +85,10 @@ def get_timeline(driver, url):
|
|
|
|
|
"ListLatestTweetsTimeline" in message["params"]["response"]["url"]):
|
|
|
|
|
request_id = message["params"]["requestId"]
|
|
|
|
|
resp = driver.execute_cdp_cmd('Network.getResponseBody', {'requestId': request_id})
|
|
|
|
|
logger.info(f"checked")
|
|
|
|
|
return json.loads(resp["body"])
|
|
|
|
|
except:
|
|
|
|
|
logger.error("check failed")
|
|
|
|
|
except Exception as e:
|
|
|
|
|
logger.error(f"check failed: {e}")
|
|
|
|
|
return {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -168,6 +169,7 @@ def parse_tweet(tweet):
|
|
|
|
|
"retweeted": {},
|
|
|
|
|
"card": {}
|
|
|
|
|
}
|
|
|
|
|
data["profile_image"] = data["profile_image"].replace("_normal.", ".")
|
|
|
|
|
|
|
|
|
|
for m in tweet["legacy"]["entities"].get("media", []):
|
|
|
|
|
data["media"].append(parse_media(m))
|
|
|
|
|