News for hackers. Stuff that matters.

Ask HN: Best way to save text from dynamically generated pages that won't curl?

Anthropic doesn't provide a mechanism for saving Claude chats. Curl doesn't work so I have to resort to opening the chat and selecting text. I asked Claude about it. the answer was Anthropic may consider it's output intellectual property, which may be a hallucination. I'm looking for an extension or other solution that makes it easier. Thanks.
( 4 comments | on HN )
Re:Ask HN: Best way to save text from dynamically generated ... by cpburns2009 on Saturday June 01, 2024 @06:24PM (#40549601)
I use Selenium's WebDriver for tasks where I need to programmatically interact with webpages that require JavaScript. It runs a headless Chrome or Firefox, with a virtual screen. It has bindings for various languages with Python being my preferred one.
Re:Ask HN: Best way to save text from dynamically generated ... by labrador on Saturday June 01, 2024 @11:44PM (#40551152)
I was wondering about a headless browser. I'll look into this. Python is a great choice.
Re:Ask HN: Best way to save text from dynamically generated ... by ai_what on Saturday June 01, 2024 @05:41PM (#40549297)
You could write a userscript for this, or go a step further and write a small browser extension.

If you use Joplin, there's already a web to markdown plugin for browsers.

Re:Ask HN: Best way to save text from dynamically generated ... by labrador on Saturday June 01, 2024 @05:55PM (#40549387)
Thanks I'll check out Joplin. I also found FireShot which I'm currently trying. It saves to PDF while I just want text