fix bug: profile origin image (v1.5.1)

master
wlt233 3 months ago
parent 320dbd7205
commit a79628e9e0

@ -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))

Loading…
Cancel
Save