Skip to content

Show HN: Daily Dune Quotes Reader

dailydune.app
3 pointsmilancurcic4 comments
On HN

I've been a fan of Frank Herbert's Dune novels and love many quotes sprinkled throughout the books. However I couldn't find an easy way to go back to them, so I curated them and put them in a web-app. It currently covers the entire first book, but am working toward covering all six. I hope Dune novels fans here enjoy it.

Comments

Any chance you're going to have an API? I'd love to have a random Dune quote in my email signature. =)

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.

Brilliant. Thank you!

Thank you! :) Let me know how it can be improved.

AboutSource Built by g1lg1l

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