News for hackers. Stuff that matters.
Re:Show HN: Export HN Favorites to a CSV File by gabrielsroka on Monday April 06, 2020 @11:53PM (#22800222)
I think this one is a little cleaner. I used some of the ideas in sbr464's code.

    path = 'favorites?id=app4soft'
    while path:
        r = requests.get('https://news.ycombinator.com/' + path)
        s = BeautifulSoup(r.text, 'html.parser')
        print([{'title': a.text, 'url': a['href']} for a in s.select('a.storylink')])
        more = s.select_one('a.morelink')
        path = more['href'] if more else None
Re:Show HN: Export HN Favorites to a CSV File by app4soft on Tuesday April 07, 2020 @09:21AM (#22802940)
Go on! ;)