Share your repls and programming experiences

← Back to all posts
📝 Replit Talk Post Fetcher
eankeen (1387)

📝 Replit Talk Post Fetcher

What it does

If you're into helping other people in, you may be continuously checking replit talk for recently asked questions.

Sometimes refreshing the page burns one too many calories. Or, you're worried you'll get arthritis by clicking too much.

Either way, you can use this repl, which gets new posts from After getting the post data, it creates a neat 'dashboard' page like below 👇

This GIF demonstrates how quickly the data can be fetched. However, when using this please only check for updates every 15 seconds. Notice the appearance of the yellow div

Notice in the GIF below, the total comments in the yellow div increases to 1, then to 2. Props to @nithilan4 for helping me show this.

💛 Yellow elements represent new posts (less than an hour old)
💚Green elements represent answered posts
💜 Links to posts turn purple after you click on them

If an element is new and has been answered, it will appear green, rather than yellow.

How I made it

I chose to not rely on any external modules or libraries when creating this application. The server is a simple NodeJS HTTP server. As for JavaScript running on the client, I wrote everything up in VanillaJS.

Thank you for your time, and I hope you found this repl useful 😄!

amasad (2712)

This could be a mobile app!!

eankeen (1387)

@amasad Yeah that could be cool! Do you guys have some delegated authorization flow etc. setup that this potential app can leverage? So it can post on behalf of user.

mkhoi (307)

This is very helpful! 👍

PDanielY (1125)

Is there an API for this? @eankeen

eankeen (1387)

@PDanielY all i did was http their 'repl talk ask new' page and parse the response with a regular expression, slap that in a javascript object, and display it :)

you can hit up their actually api - its basically their /graphql endpoint - im not sure if it requires some sort of authentication or session information to work though. so if you actually want to use it, it might require a bit of work :P

Steven_The_GuyT (239)

Whenever I open it up, it displays a blank screen with the title, but no repls.

eankeen (1387)

@Steven_The_GuyT Oh no! Lemmie see if I can fix it

Steven_The_GuyT (239)

Wait, @eankeen, whenever a question was like 61 minutes ago, the program says the question was 2 hours ago. Like whenever a question gets to be more than 60 minutes old, the repl displays the age as one hour older than it should be.

eankeen (1387)

@Steven_The_GuyT 🤔 Hmm. I understand the actual time it displayed is incorrect, but I just want it to match the time displayed on replit talk. And I think it does match? :P

eankeen (1387)

@Steven_The_GuyT If you want to change it, you can go to the util.js file and change those Math.ceil() calls to Math.floor() or Math.round() Heck, you may not even want to round :)

EthanJustice (29)

Really like the UI! Looks a lot like Reddit too!

Steven_The_GuyT (239)

This is super useful! Thank you!

mat1 (3432)

You should make it work as a PWA!

eankeen (1387)

@mat1 Yeah I thought about doing that! Didn't feel like it was absolutely necessary though.