-
-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Description
Hi @vladkens first off, thanks for maintaining this library. It’s a super useful tool and I think it could be made even more resilient against Twitter’s anti-bot protections with a few enhancements
Suggested Improvements
-
TLS Fingerprint Spoofing via
httpx-curl-cffi
- Twitter (relies on Cloudflare) relies heavily on TLS fingerprint checks (JA3, SNI patterns, etc.) for bot detection
httpx-curl-cffi
(https://github.com/vgavro/httpx-curl-cffi) provides a drop-in transport forhttpx
with cURL-level TLS fingerprint spoofing- Replacing the default
httpx
transport with this would make requests look much closer to a real browser session
-
HTTP/2 and HTTP/3 Support
- Twitter endpoints seem to default to HTTP/2 (and in some cases HTTP/3)
- Currently
twscrape
requests appear to be forced through HTTP/1.1, which is a detectable - Upgrading to use h2/h3 via the transport layer (e.g. with
httpx-curl-cffi
or hyper/h3 libraries) would improve stealth and performance
-
Account Unlocking Flow
- Many accounts fail to provide a
ct0
cookie simply because they’re in a "locked" state - With Cloudflare checks bypassed via
httpx-curl-cffi
, it should be possible to implement the same flow browsers do to “unlock” accounts (completing the initial challenge)
- Many accounts fail to provide a
VelocityRa, jacobprice808, FishInThroat, TheCrazyLex and BonifacioCalindoro
Metadata
Metadata
Assignees
Labels
No labels