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
Copy file name to clipboardExpand all lines: examples/cycletls/README.md
+3-9Lines changed: 3 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ This example demonstrates how to use the `@the-convocation/twitter-scraper/cycle
4
4
5
5
## Problem
6
6
7
-
Twitter's authentication endpoints may be protected by Cloudflare's advanced bot detection, which analyzes TLS fingerprints to detect non-browser clients. Standard Node.js TLS handshakes can trigger `403 Forbidden` errors during login.
7
+
Twitter's authentication endpoints may be protected by Cloudflare's bot detection, which analyzes TLS fingerprints to detect non-browser clients. Standard Node.js TLS handshakes can trigger `403 Forbidden` errors during login.
8
8
9
9
## Solution
10
10
11
-
This example uses [CycleTLS](https://github.com/Danny-Dasilva/CycleTLS), which leverages golang to mimic Chrome browser TLS fingerprints, allowing requests to pass through Cloudflare's protection.
11
+
This example uses [CycleTLS](https://github.com/Danny-Dasilva/CycleTLS) to mimic Chrome browser TLS fingerprints, allowing requests to pass through Cloudflare's protection.
12
12
13
13
## Installation
14
14
@@ -18,7 +18,7 @@ yarn install
18
18
19
19
## Configuration
20
20
21
-
Create a `.env` file in the root of the repository (two levels up) with your Twitter credentials:
21
+
Create a `.env` file in this directory with your Twitter credentials:
22
22
23
23
```
24
24
TWITTER_USERNAME=your_username
@@ -46,9 +46,3 @@ const scraper = new Scraper({
46
46
```
47
47
48
48
This replaces the default fetch implementation with one that uses Chrome-like TLS fingerprints, bypassing Cloudflare's detection.
49
-
50
-
## Important Notes
51
-
52
-
-**Node.js only**: The `/cycletls` entrypoint requires Node.js and will not work in browsers
53
-
-**Cleanup required**: Always call `cycleTLSExit()` when done to cleanup golang resources
54
-
-**Optional dependency**: `cycletls` must be explicitly installed alongside the main package
0 commit comments