Alessio
43566b4613
Add integration test for no-clobbering banned users
2025-02-17 18:39:01 -08:00
Alessio
1e09477a5e
If a scraped tweet has tombstone type 'suspended', then the user should be marked as banned during reply-joining
2025-02-17 18:05:49 -08:00
Alessio
041af0f91d
Move common type definitions (Tweet, User, etc) from 'scraper' package to 'persistence'
2025-02-14 16:02:40 -08:00
Alessio
b2f697a8a6
REFACTOR: make Session file storage functions more generic (not hardcoded for scraper.API)
2025-02-04 14:46:13 -08:00
Alessio
0c1d853f55
REFACTOR: change media downloader dependency injection to take just the download function rather than a whole API object
2025-02-03 21:24:53 -08:00
Alessio
95a52906ba
Tidy up logging in API do_http methods
2025-02-03 10:58:41 -08:00
Alessio
e0ce1f205a
REFACTOR: convert tweet trove methods that make API calls to API methods instead that take a TweetTrove
2025-02-03 08:03:13 -08:00
Alessio
368209a1cc
Add handling for 'Twitterversary' account anniversary notification
2025-02-02 20:50:35 -08:00
Alessio
cd02110021
BUGFIX: fix a scraping error on encountering a 'composer' entry in a tweet thread
2025-02-02 17:28:18 -08:00
Alessio
bd0e353771
REFACTOR: move a bunch of stuff around in the scraper to consolidate
...
- delete type-specific test files and put them in api_types_test
- remove an unneeded test file
2024-12-23 19:06:29 -08:00
Alessio
32531a3bd9
Move User Detail query, structures, parsing and tests to new 'api_types_user' file
2024-12-23 18:43:45 -08:00
Alessio
14024f550d
REFACTOR: Get rid of SortableXYZ types, use slices.SortFunc instead
2024-12-23 12:53:58 -08:00
Alessio
81e6dc50be
REFACTOR: rename some stuff in scraper apiv1
...
- rename TweetResponse -> APIv1Response
- rename Entry -> APIv1Entry
- rename APIv1Response.GetCursor -> GetCursorBottom
2024-12-23 12:37:28 -08:00
Alessio
e27cd12cdc
REFACTOR: change 'fetch_tweet_only' to use the regular fetch-tweet scraper function, and extract the main tweet in the 'main' package instead of having a scraper function for it
2024-12-21 09:21:23 -08:00
Alessio
850662c3cb
REFACTOR: move as much API code out of the types files and into api_types_...
files as possible
...
- also remove a few useless functions
2024-12-21 09:15:02 -08:00
Alessio
5b7713bb05
Handle 'X Premium' native ads in notifications
2024-12-09 14:56:17 -08:00
Alessio
fe3b2b311c
Fix another lint error
2024-11-06 22:04:26 -08:00
Alessio
4a1147c7ea
Fix another typo
2024-11-06 22:03:01 -08:00
Alessio
a0ae810cd6
Fix lint error
2024-11-06 21:58:44 -08:00
Alessio
faac7e9b16
Add marking notifications as read
2024-11-06 21:54:21 -08:00
Alessio
c7a6b5b321
Add back in the GetUserByID unauthenticated operation since apparently it does actually work
2024-11-06 18:58:18 -08:00
Alessio
2b7a636720
Remove the unauthenticated GetUser requests as they no longer work
2024-11-06 18:36:06 -08:00
Alessio
a4285c2db1
Add test file for previous commit
2024-11-03 20:11:41 -08:00
Alessio
640ac531e5
Fix a new bug type where blocked users' tweets can be empty-but-not-tombstoned, or something (not totally sure what this is)
2024-11-03 20:08:57 -08:00
Alessio
90f453c207
Fix crashing on non-timeline-module composer button entries
2024-10-26 22:11:23 -07:00
Alessio
e319dc1988
Fix 'user followed you' notifications sometimes parsing as 'new recommended post' notifications
2024-10-23 22:40:43 -07:00
Alessio
74db0f5797
Remove sqlx mapper function; just map all fields manually
2024-10-23 21:50:54 -07:00
Alessio
f7cbe17deb
Fix lint errors
2024-09-22 22:24:56 -07:00
Alessio
381e9e0706
'fetch_user' and 'fetch_user_by_id' subcommands now check for conflicting user handle errors and rescrape if needed
2024-09-22 22:11:08 -07:00
Alessio
4ea15f10af
Add scraper function to get user by ID
2024-09-15 22:56:59 -07:00
Alessio
9c0f9504f6
"ConvertToAPIUser() now returns an error indicating a "not-found" response, which propagates through "GetUser" API calls
2024-09-15 17:59:25 -07:00
Alessio
b9e025589e
Update CHANGELOG.txt for v0.6.16
2024-09-03 18:36:23 -07:00
Alessio
9c7174a84a
Add way to scrape unread count; add db query to count unread notifs since a given sort index
2024-09-02 15:02:27 -07:00
Alessio
0c620621a6
Add scraping notiication detail
2024-08-28 19:22:09 -07:00
Alessio
dc816c6f28
Track retweet lists in notifications alongside tweets
2024-08-28 19:20:29 -07:00
Alessio
b8db01c0ab
Add test file for previous commit
2024-08-26 00:19:24 -07:00
Alessio
2c7c35e23f
Add pagination to notifications
...
- handle notifications end-of-feed
- add support for "quoted" and "mentioned" notifications
2024-08-26 00:07:10 -07:00
Alessio
b77612c66f
Add SQL queries for notifications
2024-08-25 22:54:18 -07:00
Alessio
e94327b153
Add current user ID to notifications' UserID
field (notification recient) when parsing
...
- also make an enum for notification types instead of magic numbers in the code
2024-08-25 22:48:09 -07:00
Alessio
fae23cc243
Fix lint errors
2024-08-25 19:01:52 -07:00
Alessio
eafdbf5ffb
Add Notifications parser
2024-08-25 16:27:49 -07:00
Alessio
c45b8e7ad8
Add --delay flag to force a delay between requests in a large paginated scrape
2024-08-19 18:20:12 -07:00
Alessio
4990e7913d
Fix lint error
2024-08-19 17:29:54 -07:00
Alessio
e2ca9a975a
Remove scraper singleton pattern entirely
2024-08-19 17:27:54 -07:00
Alessio
08e5a726a8
Remove most uses of the singleton pattern in 'scraper' package
2024-08-19 16:45:32 -07:00
Alessio
91f722b7fa
Scraper requests now report invalidated or expired sessions
2024-08-18 16:22:37 -07:00
Alessio
24129c4852
REFACTOR: reduce technical debt, particularly that caused by singleton pattern in pkg/scraper
...
- ensure all scraper functions have a `api.XYZ` version and a package-level convenience function
- isolate `the_api` to top-level convenience functions, in preparation for removal
- move a bunch of scraper functions around to be nearby their related functions
- new ErrLoginRequired
- remove obsolete APIv1 stuff (Feed, TweetDetail)
- rename scraper function GetUserFeedGraphqlFor => GetUserFeed
- fix go.mod Go version incorrectly claiming it's compatible with Go 1.16 (should be Go 1.17)
2024-08-09 19:48:50 -07:00
Alessio
b4384f9cc4
Enable sending emoji reactions in DMs
2024-07-28 14:09:41 -07:00
Alessio
8aca12695b
Handle media download 404s gracefully
2024-07-28 12:50:00 -07:00
Alessio
d0c23b392b
Don't crash when receiving a Grok card
2024-07-28 08:07:33 -07:00