Commit graph

895 commits

Author SHA1 Message Date
PrivacyDev
1634ffdf43 fixed bug that caused threads on user profiles to be hidden 2023-05-26 17:23:40 -04:00
Zed
e3b3b38a2d Add proper tombstone for subscriber tweets 2023-05-20 02:10:37 +02:00
Zed
774063fb5a Fix pinned "TweetPreviewDisplay" crash 2023-05-20 00:52:55 +02:00
PrivacyDev
12f2e16c81 Merge branch 'master' of https://github.com/zedeus/nitter into graphql 2023-04-21 17:43:18 -04:00
Zed
1ac389e7c7
GraphQL timeline (#812)
* Update deps

* Replace profile timeline with GraphQL endpoint

* Update GraphQL endpoint versions

* Use GraphQL for profile media tab

* Fix UserByRestId request

* Improve routing, fixes #814

* Fix token pool JSON

* Deduplicate GraphQL timeline endpoints

* Update list endpoints

* Use GraphQL for list tweets

* Remove debug leftover

* Replace old pinned tweet endpoint with GraphQL

* Validate tweet ID

* Minor token handling fix

* Hide US-only commerce cards

* Update config example

* Remove http pool and gzip from token pool

* Support tombstoned tweets in threads

* Retry GraphQL timeout errors

* Remove unnecessary 401 retry

* Remove broken timeout retry

* Update karax, use new bool attribute feature

* Update card test

* Fix odd edgecase with broken retweets

* Replace search endpoints, switch Bearer token

* Only parse user search if it's a list

* Fix quoted tweet crash

* Fix empty search query handling

* Fix invalid user search errors again
2023-04-21 14:41:30 +02:00
Zed
e2560dc1f1 Prevent search endpoint from discarding tokens 2023-04-21 01:01:18 +02:00
PrivacyDev
e6e30baa43 raise a RateLimitError when Twitter returns HTTP status 429 2023-04-18 22:19:38 -04:00
PrivacyDev
11279e2b4f added authentication headers to user search for nsfw users 2023-04-16 02:05:45 -04:00
PrivacyDev
6875569bf2 stopped using Twitter session info for userID requests 2023-04-09 17:32:57 -04:00
PrivacyDev
d5689f2253 added login-based workaround to view NSFW content 2023-04-08 10:33:49 -04:00
PrivacyDev
a6dd229444 fixed token issue that broke all pages besides the favorites / likes timeline 2023-04-05 01:14:30 -04:00
PrivacyDev
7d2a558e89 added favorites endpoint and added likes tab to profile pages 2023-04-04 23:55:01 -04:00
Zed
7edc5646fe And another one 2023-03-06 11:06:27 +01:00
Zed
ad9083149c Add yet another status error code 2023-03-06 11:00:27 +01:00
Zed
56420a28bd Add another error code to parseStatus 2023-03-06 00:22:27 +01:00
Zed
725f601c9b Add missing error codes for unavailable tweets 2023-03-04 00:46:44 +01:00
Zed
aea884c48e Deduplicate note tweet parsing 2023-03-03 21:27:06 +01:00
HookedBehemoth
368974c803
Update src/parser.nim
Co-authored-by: Zed <zedeus@pm.me>
2023-03-01 16:13:36 +01:00
HookedBehemoth
3a5faded86 parse recently added long tweets 2023-03-01 00:54:10 +01:00
Zed
c21511037e Uppercase HLS in preference description 2023-02-26 00:43:42 +01:00
Peter Dave Hello
54cc790bdb
Remove Instagram -> Bibliogram replacement as it's discontinued (#772)
Close #761

Reference: https://cadence.moe/blog/2022-09-01-discontinuing-bibliogram
2023-02-26 00:39:08 +01:00
Zed
2751504d2f Fix crash on unavailable tweets 2023-02-25 18:25:02 +01:00
Zed
85f14c9a64 Fix crash when parsing non-GraphQL cached tweets 2023-02-24 01:02:28 +01:00
Zed
670a3bca6e Revert "Revert "Replace tweet endpoint with GraphQL""
This reverts commit 36c72f9860.
2023-02-24 01:01:22 +01:00
Zed
36c72f9860 Revert "Replace tweet endpoint with GraphQL"
This reverts commit 19adc658c3.
2023-02-02 12:38:58 +01:00
Zed
19adc658c3 Replace tweet endpoint with GraphQL 2023-02-02 12:31:49 +01:00
Zed
22b51b414b Fix typo to actually cache pinned tweets 2023-01-20 04:55:56 +01:00
Zed
ff61d97a1d Optimize profile fetching and caching 2023-01-20 04:55:42 +01:00
Zed
cd163b26a3 Use webp for thumbnails when available 2023-01-09 00:29:59 +01:00
Zed
b5dee25b37 Enable SO_REUSEPORT for simplier load balancing 2023-01-09 00:11:33 +01:00
Zed
687447cea4 Only retry on 401 once 2022-12-19 10:07:24 +01:00
Zed
d923c20aa6 Explicitly don't support 'model3d' cards
Fixes #597
2022-11-27 18:19:30 +01:00
Zed
9bae009bbc Fix 'unknown' compilation error 2022-11-27 17:27:07 +01:00
Zed
da4d6eabdd Add enum hooks to log parseHook jsony errors 2022-11-27 17:24:29 +01:00
Zed
6a7e56b613 Linting 2022-11-27 16:20:53 +01:00
Zed
78b6877b02 Add "Search (...)" to tab title
Fixes #247
2022-11-27 16:19:30 +01:00
Zed
096d44856f Remove Location field autofocus from search panel 2022-11-27 16:06:36 +01:00
Zed
85316f8f8d Reduce usage of strformat, minor perf improvement 2022-11-27 15:50:08 +01:00
Zed
b1ef505cff Fix "Show this thread" for pinned threads 2022-11-27 01:57:32 +01:00
Zed
8ad8cef875 Revert /c/ removal from YouTube replacer
Fixes #724
2022-11-27 00:40:33 +01:00
Zed
dd18471568 Make YouTube regex case insensitive
Fixes #726
2022-11-27 00:28:49 +01:00
Zed
02557b67c3 Fix minor bug 2022-11-27 00:03:11 +01:00
Zed
2ac3afa5b2 Retry intermittent 401 Unauthorized requests 2022-09-21 05:50:16 +02:00
jackyzy823
077ebc95fa
make video control bar fit parent div (#683) 2022-08-15 01:07:40 +02:00
Mico
5f31e86e0e
Fixes selection issues on iOS devices (#671) 2022-07-21 15:04:27 +02:00
jackyzy823
17cb977e70
fix profile-website css (#669) 2022-07-17 18:42:40 +02:00
Jules Bertholet
81ec41328d
Add redirect for thread links (#647) 2022-06-23 22:47:03 +02:00
HookedBehemoth
5e827c91aa
emit body and doctype on iframe embed endpoint (#640) 2022-06-16 18:46:41 +02:00
Zed
38bbc67757 Remove old unnecessary rate limit error log 2022-06-05 22:27:22 +02:00
Zed
adaa94d998 Add more logging to the token pool 2022-06-05 21:47:25 +02:00
Zed
21e8f04fa4 Use strformat more 2022-06-04 02:18:26 +02:00
Zed
6709f6f1b5 Fix "playback disabled" message 2022-06-04 01:32:02 +02:00
Zed
2a5541c126 Merge branch 'fork-graveyard/master' 2022-06-04 01:23:55 +02:00
Zed
90135d44e1 Merge branch 'original-image-urls' 2022-06-04 00:47:56 +02:00
girst
e2b8e17f85 use largest resolution mp4 video available 2022-05-18 19:52:17 +02:00
girst
0633ec2c39 Prefer mp4 to m3u8 for Video Playback if proxyVideos is off
m3u8 videos only work when the proxy is enabled. Further, this allows
video playback without Javascript.

This is only done when proxying is disabled to avoid excessive memory
usage on the nitter instance that would result from loading longer
videos in a single chunk.
2022-05-18 19:51:38 +02:00
Zed
683c052036 Fix placeholders in photo rail 2022-05-13 20:31:42 +02:00
Zed
3710a4ddec Merge branch '110Percent/master' 2022-05-13 13:36:46 +02:00
Zed
2536370cd7 Minor fixes, update tests 2022-04-01 17:56:55 +02:00
jackyzy823
9b97ddc8d8 Fix list members not displaying 2022-03-10 21:24:57 +08:00
ce5cbaeb87 Implement getSource proc 2022-02-26 19:02:34 -05:00
baf5bf89e7 Implement requested changes 2022-02-26 19:00:06 -05:00
8f65bd583d Remove accidental newline 2022-02-26 13:40:38 -05:00
b031ea762e Add source label to main tweets 2022-02-26 13:37:17 -05:00
Zed
ecb6fe4162
Merge pull request #555 from yoshiyoshyosh/master
CSS Tweak to fix avatar issues when "hide tweet stats" is enabled
2022-02-20 21:24:20 +01:00
Zed
e789fdbe5a
Merge pull request #557 from jackyzy823/fix-bio-hashtag
Fix bio hashtag
2022-02-20 21:23:53 +01:00
jackyzy823
c7a78a7f43 fix slashes between hastags 2022-02-20 14:29:35 +01:00
yoshiyoshyosh
3590ded482
revert previous "fix", move absolute under embed 2022-02-19 20:01:11 -06:00
yoshiyoshyosh
139b7edebc
fix embed css 2022-02-19 19:12:26 -06:00
yoshiyoshyosh
2c97cb0763
Update _base.scss 2022-02-19 16:37:12 -06:00
jackyzy823
67c937a3a2 ignore banner url startwith hash in link preload 2022-02-14 14:47:01 +01:00
jackyzy823
7ca3591920 fix non-ascii hashtag regex 2022-02-14 09:20:32 +01:00
Zed
6695784050 Fix user search parser 2022-02-11 22:41:45 +01:00
niladic
3e2756df6f
Fix RSS <source> tag 2022-02-11 08:50:32 +01:00
decoy-walrus
644fe41a08 Use the correct format string for fetching files from twitter.
Per their docs https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/entities#photo_format
2022-02-08 14:50:56 -05:00
decoy-walrus
4cdb8f78cb Add new endpoint for original resolution images
This change is to work around the issue that chromium based browsers have handling the "name=orig" parameter appended to URLs. This parameter is needed to retrieve the full resolution image from twitter, but causes those browsers to fill in "jpg_name=orig" as the extension on the filename.

This change adds a new endpoint, "/pic/orig/<encoded media>". This new endpoint will internally fetch the URL with ":orig" appended on the end for the full res image. Externally, the endpoint will serve the image without the extra parameter to expose the real extension to the browser.

This new endpoint is used when rendering tweets with attached images. The old endpoint is still in place for all other proxied images, and for any legacy links.

I also updated the "?name=small" parameter to ":small" since that seems to be the new pattern for image sizing.

This should fix issue #458.
2022-02-07 16:21:20 -05:00
Zed
adfd31c530 Fix timeline parser 2022-02-07 21:58:06 +01:00
Mitarashi
e01f3960cb Embed CSS tweak 2022-02-05 19:43:13 +02:00
Zed
b1a90cd52b Disable input autocomplete
Fixes #433
2022-01-30 17:19:00 +01:00
Zed
8ecac89ea0 Fix hidePinned preference 2022-01-30 16:59:07 +01:00
Zed
f10519c41a Minor RSS behavior improvements 2022-01-27 14:55:51 +01:00
Zed
091bb6813d Move RSS compression to Redis module, fix crash 2022-01-27 14:36:12 +01:00
Zed
3a076a9b4e Add experimental parser module 2022-01-26 21:05:23 +01:00
Zed
4738ec3385 Add experimental user search parser 2022-01-26 20:56:05 +01:00
Zed
49a2fbb070 Support profile image color parsing in wip parser 2022-01-26 18:36:12 +01:00
Zed
a54d6aa1eb Add experimental GraphQL list members parser 2022-01-26 18:04:01 +01:00
Zed
ae7091e69d Add experimental GraphQL user parser 2022-01-26 18:04:01 +01:00
Mitarashi
d56628ed2f removed spaces 2022-01-24 21:55:14 +02:00
Mitarashi
e4f634705b Fix #521 2022-01-24 21:53:59 +02:00
Zed
c9b451d3ea Set listMembers max remaining to 500 2022-01-24 12:29:03 +01:00
Zed
4ffe7d7665 Fix compilation with Nim 1.4.8 2022-01-23 14:47:13 +01:00
Zed
182b5ba90b Support quotes in pinned tweets 2022-01-23 10:15:54 +01:00
Zed
d1a3e7ab58 Fix empty pinned tweets when status wasn't found 2022-01-23 09:12:13 +01:00
Zed
f58824cb35 Add URL to request errors 2022-01-23 08:38:38 +01:00
Zed
c355beda85 Cleanup profile fetching logic 2022-01-23 08:17:41 +01:00
Zed
27183f1a74 Use faster API to get pinned tweets 2022-01-23 07:45:01 +01:00
Zed
51ae076ea0 Rearchitect profile, support pins, Profile -> User 2022-01-23 07:23:09 +01:00
Zed
79b98a8081 Simplify bad http client pruning 2022-01-23 07:23:09 +01:00
Zed
cdb4efadfe Temporary fix to Twitter's global timeline error 2022-01-21 09:17:18 +01:00
Zed
a76ca3d60f Remove Redis pipelining 2022-01-20 02:22:32 +01:00
Zed
b01810e261 Improve profile page elements, reduce jank
Fixes #167
2022-01-17 05:59:16 +01:00
Zed
43b0bdc08a Remove user agents 2022-01-17 04:13:27 +01:00
Zed
e0b141daf9 Small optimization for photo rail request size 2022-01-17 03:21:38 +01:00
Zed
f3d6f53f6d Rework profile cache behavior, fix suspended cache
Fixes #480
2022-01-16 20:32:45 +01:00
Zed
23f87c115a Add template to make Redis usage cleaner 2022-01-16 19:22:27 +01:00
Zed
fff04de24b Simplify new error handling 2022-01-16 18:28:40 +01:00
Zed
3d91ae0256 Set tokens to expire 5 minutes early
Prevents occasional usage of tokens the very second they expire
2022-01-16 17:57:18 +01:00
Zed
3ab778b49c Remove old parseUserShow proc 2022-01-16 06:34:38 +01:00
Zed
6f348f2f2e Strip trailing newlines from tweets 2022-01-16 06:18:01 +01:00
Zed
cdf49dcddd Add experimental user parser 2022-01-16 06:01:13 +01:00
Zed
fcfc1ef497 Parse user stats as ints, not strings, cleanup 2022-01-16 03:32:18 +01:00
Zed
54330f0b0c Fix quote avatar css 2022-01-14 23:12:33 +01:00
Mitarashi
6ebfafde80 added tweet background and bumped css 2022-01-14 21:07:02 +02:00
Mitarashi
eff098003f unified function call styles 2022-01-14 20:45:02 +02:00
Mitarashi
aee222eb62 Merge branch 'embedded' of https://github.com/LainLayer/nitter into embedded 2022-01-14 20:36:06 +02:00
Mitarashi
d29186bf8f stylistic changes 2022-01-14 20:35:01 +02:00
alqeeu
1e027f5edf
Update src/routes/embed.nim
Co-authored-by: Zed <zedeus@pm.me>
2022-01-14 20:33:01 +02:00
alqeeu
74fcc071a3
Update src/sass/tweet/_base.scss
Co-authored-by: Zed <zedeus@pm.me>
2022-01-14 20:32:50 +02:00
Mitarashi
ac0edc0a41 made twitter embed links redirect to nitter ones 2022-01-14 20:24:06 +02:00
Mitarashi
a6bd05bca6 fixed more stupid code 2022-01-14 20:14:06 +02:00
Mitarashi
90eae2669b fixed stupid code (sorry) 2022-01-14 20:11:51 +02:00
Mitarashi
784d0d42ac minor css change and version bump 2022-01-14 19:49:36 +02:00
Mitarashi
817501a516 wrapped embedded tweet in div and changed css
also bumped css version
2022-01-14 19:44:09 +02:00
Mitarashi
875a2c5387 moved themes to be handled in renderHead and changed path to /embed 2022-01-14 19:34:10 +02:00
Mitarashi
3579bd8e30 handled unavailable in renderEmbeddedTweet 2022-01-14 19:17:10 +02:00
Mitarashi
0d3469df66 changed code to be not shit 2022-01-14 19:01:47 +02:00
Mitarashi
7f15993a74 crude implementation of embedding tweets 2022-01-14 15:23:53 +02:00
Zed
888e965f41 Unify avatar class generation 2022-01-14 03:16:44 +01:00
Mitarashi
3afe330f23 removed weird spaces at end of line 2022-01-13 23:59:30 +02:00
Mitarashi
8d557bc490 minor changes 2022-01-13 23:58:07 +02:00
Mitarashi
b2948e3071 refined code 2022-01-13 23:54:22 +02:00
Mitarashi
bc337027ca Implemented square profile pictures
- Added preference "Square profile pictures"
2022-01-13 22:44:47 +02:00
Zed
111927a21c Add experimental support for unified_card
Closes #345
2022-01-13 12:17:18 +01:00
Zed
8a6fbe81ab Fix video processing crash
Closes #512
2022-01-12 19:19:14 +01:00
Zed
6c6386913e Remove nim-regex dependency, improve performance 2022-01-11 03:22:31 +01:00
Zed
0e5da8c305 Reimplement titleize without regex 2022-01-10 16:18:10 +01:00
Zed
63b9e8dbc1 Cleanup 2022-01-10 00:45:35 +01:00
Zed
db74fa8893 Remove capture group from titleization regex 2022-01-10 00:37:04 +01:00
Zed
c042c84203 Add auto theme that uses Twitter dark
Closes #332
2022-01-10 00:36:13 +01:00
Zed
23b36d4268 Prevent bad staticDir from causing problems 2022-01-09 23:55:17 +01:00
Zed
4ec2874008 Use staticDir to load about page
Fixes #414
Closes #406
2022-01-09 23:48:25 +01:00
Zed
8c2e0c66e2 Render markdown files with a tool 2022-01-09 23:35:56 +01:00
Zed
f21e192a8f Improve mobile responsiveness 2022-01-06 15:21:42 +01:00
Zed
ffcac982d0 Style fixes 2022-01-06 03:57:14 +01:00
Zed
f5ba2b62e7 Add audiospace to list of unsupported cards 2022-01-06 03:37:27 +01:00
Zed
d4c6876bc9 Add more info to /.tokens endpoint 2022-01-06 00:42:18 +01:00
Zed
4d9fd1a6f8 Use int for token reset instead of Time 2022-01-06 00:19:09 +01:00
Zed
34964f9e56 Track pending token requests to limit concurrency 2022-01-05 23:52:45 +01:00
Zed
f9c9b0d3a4 Add /.tokens debug endpoint to see token pool 2022-01-05 22:49:16 +01:00
Zed
dd71e60f35 Track token rate limits per endpoint 2022-01-05 22:48:45 +01:00