Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace tokens with guest accounts, swap endpoints #985

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
3572dd7
Replace tokens with guest accounts, swap endpoints
zedeus Aug 18, 2023
bbd68e6
Filter out account limits that already reset
zedeus Aug 18, 2023
3d8858f
Track rate limits, reset after 24 hours
zedeus Aug 20, 2023
e8b5cbe
Add missing limitedAt assignment
zedeus Aug 20, 2023
51714b5
Add guest accounts variable to GitHub action
zedeus Aug 21, 2023
c3d9441
Unify some guest account logs
zedeus Aug 21, 2023
12504bc
Fix compilation error
zedeus Aug 21, 2023
30bdf3a
Reduce max concurrent pending requests per account
zedeus Aug 21, 2023
5c08e6a
Fix compilation on older versions of Nim
zedeus Aug 22, 2023
6e87449
Tweak /.tokens, add amount of limited accounts
zedeus Aug 22, 2023
8df5256
Switch back to old user search endpoint
zedeus Aug 22, 2023
4580836
Fix tweetDetail stats
zedeus Aug 22, 2023
a3e11e3
Switch to using typeahead for user search
zedeus Aug 23, 2023
88b005c
Revert "Switch to using typeahead for user search"
zedeus Aug 23, 2023
ae9fa02
Switch to TweetDetail for tweets
zedeus Aug 25, 2023
03794a8
Cleanup
zedeus Aug 25, 2023
7630f57
Fix cards not being displayed
zedeus Aug 26, 2023
4ccf350
Improve .tokens output
zedeus Aug 29, 2023
986b91a
Handle ProtocolError and BadClientError equally
zedeus Aug 29, 2023
898b19b
Improve rate limit handling, minor refactor
zedeus Aug 30, 2023
37b58a5
Fix accounts logging
zedeus Aug 30, 2023
282ce8b
Add 429 logging
zedeus Aug 30, 2023
82beb5d
Add empty oauth token logging
zedeus Aug 30, 2023
84dcf49
Fix negative pending requests bug
zedeus Aug 31, 2023
b8fe212
Add media proxying error logging
zedeus Sep 1, 2023
4250245
Shorten media proxy error log
zedeus Sep 2, 2023
fcd74e8
Retry rate limited requests with different account
zedeus Sep 2, 2023
14f9a09
Fix crash on missing quote tweet data crash
zedeus Sep 14, 2023
7abcb48
Increase photo rail cache ttl
zedeus Sep 18, 2023
7d14789
Improve guest accounts loading, add JSONL support
zedeus Sep 18, 2023
537af7f
Improve Liberapay css for Firefox compatibility
zedeus Sep 19, 2023
735b30c
fix(nitter): add graphql user search (#1047)
DrSocket Oct 30, 2023
32e3469
Fix multi-user timelines
zedeus Oct 31, 2023
edad09f
Update nimcrypto and jsony
zedeus Oct 31, 2023
0892758
Bump minimum Nim version
zedeus Oct 31, 2023
4120558
Replace /.tokens with /.health and /.accounts
zedeus Oct 31, 2023
b8103cf
Fix compilation on Nim 1.6.x
zedeus Oct 31, 2023
60a8256
Run tests on multiple Nim versions
zedeus Oct 31, 2023
bd0be72
Merge branch 'master' into guest_accounts
zedeus Oct 31, 2023
b930a3d
Fix guest accounts CI setup
zedeus Oct 31, 2023
33bad37
Fix guest accounts CI setup attempt 2
zedeus Nov 1, 2023
006b91c
Prevent annoying warnings on devel
zedeus Nov 1, 2023
b0b3351
Fix missing CI file argument
zedeus Nov 1, 2023
58e73a1
Fix guest accounts CI setup attempt 3
zedeus Nov 1, 2023
1d20bd0
Remove redundant "active" field from /.health
zedeus Nov 1, 2023
7b3fcdc
Fix guest accounts CI setup attempt 4
zedeus Nov 1, 2023
623424f
Fix outdated test
zedeus Nov 1, 2023
e1838e0
Move CI workflow to buildjet
zedeus Nov 1, 2023
209f453
Purge expired accounts after parsing
zedeus Nov 1, 2023
d175832
Don't requests made before reset
zedeus Nov 1, 2023
e0d9dd0
Fix #670
zedeus Nov 4, 2023
5e18864
Bump Nim in the ARM64 Dockerfile, add nitter user
zedeus Nov 8, 2023
eaedd2a
Fix ARM64 Dockerfile versions
zedeus Nov 8, 2023
c2819da
Fix #1106
zedeus Nov 15, 2023
06ab1ea
Enable disabled tests
zedeus Nov 15, 2023
4dac9f0
Add simple job_details card support
zedeus Nov 25, 2023
d6be08d
Fix jobDetails error on old Nim versions
zedeus Nov 25, 2023
f8254c2
Add support for business and gov verification
zedeus Nov 25, 2023
a9740fe
Fix compilation with old Nim again
zedeus Nov 25, 2023
583c858
Fix search queries in user search RSS feeds (#1126)
the-blank-x Dec 3, 2023
52db03b
Fix broken video playback by forcing fmp4
zedeus Jan 12, 2024
cdff5e9
Fix for #1147, Proxy for audio URL and upgrade hls.js (#1178)
jackyzy823 Feb 21, 2024
c6edec0
Update auth.nim (#1164)
somini Feb 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix #670
  • Loading branch information
zedeus committed Nov 8, 2023
commit e0d9dd0f9c8175fe9f5bf5aa86c0f56ccbc970a9
4 changes: 2 additions & 2 deletions src/auth.nim
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ proc hasExpired(account: GuestAccount): bool =
let
created = snowflakeToEpoch(account.id)
now = epochTime().int64
daysOld = int(now - created) div (24 * 60 * 60)
daysOld = int(now - created) div dayInSeconds
return daysOld > 30

proc getAccountPoolHealth*(): JsonNode =
let now = epochTime().int

var
totalReqs = 0
limited: PackedSet[BiggestInt]
limited: PackedSet[int64]
reqsPerApi: Table[string, int]
oldest = now.int64
newest = 0'i64
Expand Down
2 changes: 1 addition & 1 deletion src/sass/profile/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
}

.profile-card-tabs-name {
@include breakable;
flex-shrink: 100;
}

.profile-card-avatar {
Expand Down
4 changes: 2 additions & 2 deletions src/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type
limitedAt*: int

GuestAccount* = ref object
id*: BiggestInt
id*: int64
oauthToken*: string
oauthSecret*: string
pending*: int
Expand Down Expand Up @@ -164,7 +164,7 @@ type
newsletterPublication = "newsletter_publication"
hidden
unknown

Card* = object
kind*: CardKind
url*: string
Expand Down