Skip to content

3 Historical Stats#4

Draft
SilkRose wants to merge 134 commits into
devfrom
3-fimfic-stats
Draft

3 Historical Stats#4
SilkRose wants to merge 134 commits into
devfrom
3-fimfic-stats

Conversation

@SilkRose

@SilkRose SilkRose commented Mar 6, 2024

Copy link
Copy Markdown
Collaborator

Adds historical data scraping.

@SilkRose SilkRose changed the base branch from main to dev March 6, 2024 04:56
SilkRose added 6 commits March 6, 2024 00:34
Use status code for error handling with html file request.
Scrapes the Rankings and Bookshelves heading 1 stats from the story stats' page.
Also changes status codes initial value to -1 for a placeholder.
Makes the sleep function use less CPU.
Improves logging and skips logging error status codes.
Improved sleep function written by @meadowsys.
SilkRose added 9 commits March 7, 2024 01:10
Uses zod to validate the json parsed from the html of the stats page.
Makes the request interval a variable so it can be set in one place.
Add more comments to make things more clear.
Most of the schema is in place, need to finish the included section and lower.
SQL does not like tables named Index.
SilkRose added 5 commits March 9, 2024 01:18
Also add date joined to SQL Authors table.
Start of DB insertion, more to come later.
Validate the data with the schema for the API and stats JSON at the right times.
Also remove rate limit check, FIMFiction does not have rate limiting.
Need to fix quotes in titles.
Added ranking, word ranking, bookshelves, and tracking counts, they were missing in the stories table and in the insert function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants