Skip to content

Comment on Show HN: Daily Dune Quotes Readerparent

Comments

I'd prefer not maintaining a server. If I set it up, I'll post here. All the quotes are in a JSON file that's loaded in the browser, so you could download the relevant js file and parse out the quotes data JSON. I may make this JSON file available in a public repo but I'd like to get a permission from the copyright owner before I do that.

Here's a Python snippet that will download the relevant js file with the quotes data:

  import bs4
  import requests

  baseurl = 'https://dailydune.app'

  r = requests.get(baseurl)
  html = bs4.BeautifulSoup(r.content)
  scripts = html.find_all('script')

  for script in scripts:
      src = script.get('src')
      if src and '/js/app.' in src:
          break

  r = requests.get(baseurl + src)

I didn't go as far to extract the quotes from the response body, but it shouldn't be too difficult.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.