mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 14:49:32 +00:00
Fix CF block
This commit is contained in:
parent
5858809a08
commit
28b55a5017
2 changed files with 2 additions and 3 deletions
|
|
@ -69,14 +69,13 @@ proc genHeaders*(session: Session, url: Uri, skipTid: bool): Future[HttpHeaders]
|
||||||
"accept": "*/*",
|
"accept": "*/*",
|
||||||
"accept-encoding": "gzip",
|
"accept-encoding": "gzip",
|
||||||
"accept-language": "en-US,en;q=0.9",
|
"accept-language": "en-US,en;q=0.9",
|
||||||
"connection": "keep-alive",
|
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
"origin": "https://x.com",
|
"origin": "https://x.com",
|
||||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36",
|
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36",
|
||||||
"x-twitter-active-user": "yes",
|
"x-twitter-active-user": "yes",
|
||||||
"x-twitter-client-language": "en",
|
"x-twitter-client-language": "en",
|
||||||
"priority": "u=1, i"
|
"priority": "u=1, i"
|
||||||
})
|
}, titleCase=true)
|
||||||
|
|
||||||
case session.kind
|
case session.kind
|
||||||
of SessionKind.oauth:
|
of SessionKind.oauth:
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ proc release*(pool: HttpPool; client: AsyncHttpClient; badClient=false) =
|
||||||
|
|
||||||
proc acquire*(pool: HttpPool; heads: HttpHeaders): AsyncHttpClient =
|
proc acquire*(pool: HttpPool; heads: HttpHeaders): AsyncHttpClient =
|
||||||
if pool.conns.len == 0:
|
if pool.conns.len == 0:
|
||||||
result = newAsyncHttpClient(headers=heads, proxy=proxy)
|
result = newAsyncHttpClient(userAgent="", headers=heads, proxy=proxy)
|
||||||
else:
|
else:
|
||||||
result = pool.conns.pop()
|
result = pool.conns.pop()
|
||||||
result.headers = heads
|
result.headers = heads
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue