Hacker News new | ask | show | jobs
by lameiam 1988 days ago
this is so cool; i see that there's a way to dl individual issues, but I was wondering if there was a way to bulk dl them? thanks in advance.
2 comments

answering my question

this works:

wget https://archive.org/download/Dungeon_Magazine_006/Dungeon_Ma...

I just wrote a quick scrip to increment the issues

mobi = "wget https://archive.org/download/Dungeon_Magazine_{count}/Dungeo..." pdf = "wget https://archive.org/download/Dungeon_Magazine_{count}/Dungeo..."

with open("grab_dragon.sh", "w") as file1: for index in range(200):

        str_index = str(index)
        if len(str_index) != 3:
            str_index = str_index.zfill(3)
        pdf_format = pdf.format(count=str_index)
        mobi_format = mobi.format(count=str_index)

        file1.write(pdf_format + "\n")
        file1.write(mobi_format + "\n")
Throw in two spaces before each code line and that will be formatted much better:

  with open("grab_dragon.sh", "w") as file1:
    for index in range(200):
      ...
The script's redering by HN is off. Maybe you should change the indentation somehow?
I posted an example using the Internet Archive's official Python library and command line program:

https://news.ycombinator.com/item?id=25780123