Replies: 1 comment 1 reply
-
Oooooh, brilliant! 🔥 Love the 2-script combo. I bet that's useful for a bunch of scenarios |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This was a fun one to build. So GitHub does not have an API endpoint for their trending page. So to work around this I used playwright to scrape the pages for various languages. Then I'd create a tab for a variety of language. What I ran into though was given the data likely doesn't change too often, going and scraping on every tab change was slow. To resolve this, I wrote a second script that runs on an hourly cron and then saves the data to a
lowdb
database with the preloadeddb
function. This now makes the main script run instantly as the entries are cached on my system.Scripts
Main Script:
Background puller script:
Beta Was this translation helpful? Give feedback.
All reactions