-
-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace guest tokens with account sessions (#1210)
* Replace tokens with guest accounts, swap endpoints * Filter out account limits that already reset * Track rate limits, reset after 24 hours * Add missing limitedAt assignment * Add guest accounts variable to GitHub action * Unify some guest account logs * Fix compilation error * Reduce max concurrent pending requests per account * Fix compilation on older versions of Nim * Tweak /.tokens, add amount of limited accounts * Switch back to old user search endpoint * Fix tweetDetail stats * Switch to using typeahead for user search * Revert "Switch to using typeahead for user search" This reverts commit a3e11e3. * Switch to TweetDetail for tweets * Cleanup * Fix cards not being displayed * Improve .tokens output * Handle ProtocolError and BadClientError equally * Improve rate limit handling, minor refactor * Fix accounts logging * Add 429 logging * Add empty oauth token logging * Fix negative pending requests bug * Add media proxying error logging * Shorten media proxy error log * Retry rate limited requests with different account * Fix crash on missing quote tweet data crash * Increase photo rail cache ttl * Improve guest accounts loading, add JSONL support * Improve Liberapay css for Firefox compatibility * fix(nitter): add graphql user search (#1047) * fix(nitter): add graphql user search * fix(nitter): rm gitignore 2nd guest_accounts * fix(nitter): keep query from user search in result. remove personal mods * fix(nitter): removce useless line gitignore * Fix multi-user timelines * Update nimcrypto and jsony * Bump minimum Nim version * Replace /.tokens with /.health and /.accounts * Fix compilation on Nim 1.6.x * Run tests on multiple Nim versions * Fix guest accounts CI setup * Fix guest accounts CI setup attempt 2 * Prevent annoying warnings on devel * Fix missing CI file argument * Fix guest accounts CI setup attempt 3 * Remove redundant "active" field from /.health * Fix guest accounts CI setup attempt 4 * Fix outdated test * Move CI workflow to buildjet * Purge expired accounts after parsing * Don't requests made before reset * Fix #670 * Bump Nim in the ARM64 Dockerfile, add nitter user * Fix ARM64 Dockerfile versions * Fix #1106 Closes #831 * Enable disabled tests * Add simple job_details card support * Fix jobDetails error on old Nim versions * Add support for business and gov verification Also improve icon rendering on Firefox * Fix compilation with old Nim again * Fix search queries in user search RSS feeds (#1126) Fixes #992 * Fix broken video playback by forcing fmp4 * Fix for #1147, Proxy for audio URL and upgrade hls.js (#1178) * Revert "Fix broken video playback by forcing fmp4" This reverts commit 52db03b. * Fix audio url in video m3u8 * Upgrade hls.js to 1.5.1 and use full version * Update auth.nim (#1164) Avoid expiring the tokens for now. See: - #983 (comment) - #1155 (comment) Thanks @cmj * Replace old v1 photo rail API with gql * Raise NoAccountsError when all accounts limited * Move limited flag to be account-level * Capture "account locked" API error * Update authority header * Add regex for x.com links * Update endpoint versions, switch tweet endpoint * Return 403 on hmac error * Add lazy loading for images * Fix missing video thumbnail being too small * Silence 404 proxy errors * Skip null fetch errors * Increase max concurrent reqs per account * Rename accounts/guest accounts to sessions The new file loaded by default is now ./sessions.jsonl JSONL is also required, .json support dropped. * Update Dockerfiles * Update README, added an important note * Add Python script to create account sessions * Change main page search to "Tweets" search * Remove old tokenCount from nitter.example.conf * Fix tests * Fix empty image URLs in photo rail --------- Co-authored-by: LS <[email protected]> Co-authored-by: blankie <[email protected]> Co-authored-by: jackyzy823 <[email protected]> Co-authored-by: somini <[email protected]>
- Loading branch information
1 parent
b62d73d
commit 9d85a51
Showing
56 changed files
with
981 additions
and
794 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,6 @@ nitter | |
/public/css/style.css | ||
/public/md/*.html | ||
nitter.conf | ||
guest_accounts.json* | ||
sessions.json* | ||
dump.rdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM nimlang/nim:2.0.0-alpine-regular as nim | ||
FROM nimlang/nim:2.2.0-alpine-regular as nim | ||
LABEL maintainer="[email protected]" | ||
|
||
RUN apk --no-cache add libsass-dev pcre | ||
|
@@ -9,7 +9,7 @@ COPY nitter.nimble . | |
RUN nimble install -y --depsOnly | ||
|
||
COPY . . | ||
RUN nimble build -d:danger -d:lto -d:strip \ | ||
RUN nimble build -d:danger -d:lto -d:strip --mm:refc \ | ||
&& nimble scss \ | ||
&& nimble md | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
FROM alpine:3.18 as nim | ||
FROM alpine:3.21.2 as nim | ||
LABEL maintainer="[email protected]" | ||
|
||
RUN apk --no-cache add gcc git libc-dev libsass-dev "nim=1.6.14-r0" nimble pcre | ||
RUN apk --no-cache add libsass-dev pcre gcc git libc-dev nim nimble | ||
|
||
WORKDIR /src/nitter | ||
|
||
COPY nitter.nimble . | ||
RUN nimble install -y --depsOnly | ||
|
||
COPY . . | ||
RUN nimble build -d:danger -d:lto -d:strip \ | ||
RUN nimble build -d:danger -d:lto -d:strip --mm:refc \ | ||
&& nimble scss \ | ||
&& nimble md | ||
|
||
FROM alpine:3.18 | ||
FROM alpine:3.21.2 | ||
WORKDIR /src/ | ||
RUN apk --no-cache add ca-certificates pcre openssl1.1-compat | ||
RUN apk --no-cache add pcre ca-certificates openssl | ||
COPY --from=nim /src/nitter/nitter ./ | ||
COPY --from=nim /src/nitter/nitter.example.conf ./nitter.conf | ||
COPY --from=nim /src/nitter/public ./public | ||
EXPOSE 8080 | ||
RUN adduser -h /src/ -D -s /bin/sh nitter | ||
USER nitter | ||
CMD ./nitter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.