
Ask HN: How to you manage your favorite HN submissions? - amzpix
I have close to 900 submissions marked as favorite on HN. I&#x27;m trying to find all SQL related submissions from this list. Is there a quick way to search without scanning through 30 pages?
======
gabrielsroka
I 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/...](https://github.com/gabrielsroka/gabrielsroka.github.io/blob/master/getHNFavorites.js)
or Python:
[https://github.com/gabrielsroka/gabrielsroka.github.io/blob/...](https://github.com/gabrielsroka/gabrielsroka.github.io/blob/master/getHNFavorites.py)

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
This worked perfectly! I found what I was looking for. Thank you so much for
writing this and sharing with others.

~~~
gabrielsroka
You'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.

------
blackbrokkoli
Since 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=PAGENUM...](https://news.ycombinator.com/favorites?id=YOURNAME&p=PAGENUMBER).

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!

------
AlexanderNull
I 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.

------
dzonga
I have a service, on the way to do so. leave your email, and will send you
mail when ready. thanks

------
112
ripgrep + fzf = love

