4 ms·
Ask HN: How to you manage your favorite HN submissions?
I have close to 900 submissions marked as favorite on HN. I'm trying to find all SQL related submissions from this list. Is there a quick way to search without scanning through 30 pages?
- gabrielsroka 6y agoI wrote some tools to export your HN favorites to CSV or HTML in both JavaScript and Python. Check out https://gabrielsroka.github.io/getHNFavorites.js https://gabrielsroka.github.io/getHNFavorites.js or to view the source code, see JS: https://github.com/gabrielsroka/gabrielsroka.github.io/blob/master/getHNFavorites.js https://github.com/gabrielsroka/gabrielsroka.github.io/blob/... or Python: https://github.com/gabrielsroka/gabrielsroka.github.io/blob/master/getHNFavorites.py https://github.com/gabrielsroka/gabrielsroka.github.io/blob/... Previous discussion, other tools and more info: https://news.ycombinator.com/item?id=22788236 https://news.ycombinator.com/item?id=22788236 Maybe I should add a SQL interface ;) select * from favorites where username = 'amzpix' and title like '%SQL%';
- amzpix 6y agoThis worked perfectly! I found what I was looking for. Thank you so much for writing this and sharing with others.
- gabrielsroka 6y agoYou're welcome. I just added a little search feature (in the spirit of my bad SQL joke above) to the JS version. It uses a JS regex.
- potta_coffee 6y agoNeat, thanks very much.
- 112 6y agoripgrep + fzf = love
- AlexanderNull 6y agoI set up a job posting sentiment analysis ML app on the Who's Hiring post recently and use a the public firebase REST API: https://github.com/HackerNews/API https://github.com/HackerNews/API . It mostly works for my usecase but its search capabilities are severely lacking over REST so might not be the best in your case. I never got around to trying a firebase client so I have no clue if it interacts with a different interface, might be worth taking a quick look at.
- blackbrokkoli 6y agoSince HN is such a beautiful old school websites, the pages of your submissions are denoted in the URL like https://news.ycombinator.com/favorites?id=YOURNAME&p=PAGENUMBER https://news.ycombinator.com/favorites?id=YOURNAME&p=PAGENUM.... So you could just loop said page number in your favorite language, access the generated webpage and get the raw HTML. If you get all lines of class "storylink" and "title", you will have all the post titles and where they link. Save that into any format as simple as Excel and you have a nice searchable overview. Always rate limit yourself sensibly when web crawling, and have fun!
- dzonga 6y agoI have a service, on the way to do so. leave your email, and will send you mail when ready. thanks