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
hey, before building it i wanted to check if there'd be interest in an optional helper that performs the X login flow in a real stealth browser once, then dumps cookies to a file that twikit's existing load_cookies can read directly. no change to twikit's HTTP core.
motivation: ToProtectYourAccount.md already recommends save_cookies / load_cookies to avoid repeated login calls. the first login still has to happen somewhere though, and increasingly X's login flow requires JS challenges (Castle Token, ondemand.s.js fingerprinting) that pure HTTP can't pass cleanly. relevant open PRs touching this surface: #324#393#410.
the helper would wrap feder-cr/invisible_playwright, which drives a patched Firefox 150 (feder-cr/invisible_firefox, MPL-2, same license as Firefox upstream, fingerprint patches at the C++ source level so no JS shims to detect). optional dependency, only loaded when the helper is imported. used as login_to_cookies(username, email, password, output='cookies.json') then the usual twikit path with client.load_cookies('cookies.json'). issues against the helper route to feder-cr/invisible_playwright.
also opened a draft PR #427 with a proposal doc at the repo root so the idea has somewhere concrete to land.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hey, before building it i wanted to check if there'd be interest in an optional helper that performs the X login flow in a real stealth browser once, then dumps cookies to a file that twikit's existing
load_cookiescan read directly. no change to twikit's HTTP core.motivation:
ToProtectYourAccount.mdalready recommendssave_cookies/load_cookiesto avoid repeatedlogincalls. the first login still has to happen somewhere though, and increasingly X's login flow requires JS challenges (Castle Token, ondemand.s.js fingerprinting) that pure HTTP can't pass cleanly. relevant open PRs touching this surface: #324 #393 #410.the helper would wrap feder-cr/invisible_playwright, which drives a patched Firefox 150 (feder-cr/invisible_firefox, MPL-2, same license as Firefox upstream, fingerprint patches at the C++ source level so no JS shims to detect). optional dependency, only loaded when the helper is imported. used as
login_to_cookies(username, email, password, output='cookies.json')then the usual twikit path withclient.load_cookies('cookies.json'). issues against the helper route to feder-cr/invisible_playwright.also opened a draft PR #427 with a proposal doc at the repo root so the idea has somewhere concrete to land.
Beta Was this translation helpful? Give feedback.
All reactions