Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looks like a decent tool, but I personally would not use it in production. Took a few minutes to look through the code: They basically use the HTML pages instead of the APIs. What puts me off is that the code is missing tests altogether and has quite a few separation of concern issues. HTML extraction is everywhere, storage is embedded into the package. Cool proof of concept, not ready for production, I think.

Minor stuff: Printing instead of logging. Would prefer a package that only does the retrieval and nothing else. Hardcoded SQL(ite?) storage.



> They basically use the HTML pages instead of the APIs.

For Twitter in specific, isn't HTML scraping vastly preferable to using their official APIs? Otherwise you run into pretty arbitrary usage limits and missing features.

There's a small list of services where I think I prefer HTML scraping and browser piloting for a 3rd-party client: Twitter, Patreon, Facebook, LinkedIn, a few others. Services where the official APIs are underdeveloped or crippled to the point of almost uselessness.


That quote is supposed to be a neutral summary, so yes, that might be the case :)


Fair objections perhaps, but regarding using HTMLs -- scraping is the whole point, because getting API tokens these days is hard.


I was teaching a hands on workshop (meetup) on how to use the Twitter API a few months ago, and the hardest part for everybody was getting those API keys, clicking through several pages, checking boxes, having it emailed to you.

Then it turned out Twitter refused half of the attendees the API key.. (maybe they thought it was spam coming from the same wifi, same time).

So then I just gave out my API key to the rest of the class, and in a few minutes it was blocked..

For a service that has a history of empowering users to protest and to spread news in crisis situations, it's a shame their API is so locked down.


Yep. At least it was a realistic experience :)

The hardest part when working with data is often not manipulating data per se, but spending time on crap like this.


Sorry, looks like I did not make that clear enough. Was not meant to be an objection, totally understand why they do it.


What do you use instead?


There's a pretty actively-maintained Python wrapper for the internal API: https://github.com/bisguzar/twitter-scraper


Here's a comment of someone who built a tool that uses twitter's public facing but private api, https://news.ycombinator.com/item?id=22855148


Took me 20 seconds to install twint, and start scraping.

Took me 20 minutes to install twitter-dump, and despite a successful twitter-dump auth, I end up with 'Request exception Forbidden {"errors":[{"code":200,"message":"Forbidden."}]}'.

Not going to spend time to fix that, I'll use the dirty solution that works.


That's fine. I'm not saying you have to switch, but it looks like there's a way.

Maybe they could combine efforts? Maybe they could look at the code, and if the licenses allow, port things to theirs.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: