4 ms·
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.
by lameiam 6y 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.
- lameiam 6y agoanswering my question this works: wget https://archive.org/download/Dungeon_Magazine_006/Dungeon_Magazine_006.mobi 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}/Dungeon_Magazine_{count}.mobi https://archive.org/download/Dungeon_Magazine_{count}/Dungeo..." pdf = "wget https://archive.org/download/Dungeon_Magazine_{count}/Dungeon_Magazine_{count}.pdf 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")
- Jtsummers 6y agoThrow 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): ...
- dspearson 6y agoOr similarly: for i in `seq -w 001 221`; do wget https://archive.org/download/Dungeon_Magazine_$i/Dungeon_Magazine_$i.pdf; https://archive.org/download/Dungeon_Magazine_$i/Dungeon_Mag... done; wget https://archive.org/download/Dungeon_Magazine_Annual_2010/Dungeon_Magazine_Annual_2010.pdf https://archive.org/download/Dungeon_Magazine_Annual_2010/Du...
- einpoklum 6y agoThe script's redering by HN is off. Maybe you should change the indentation somehow?
- msla 6y agoI posted an example using the Internet Archive's official Python library and command line program: https://news.ycombinator.com/item?id=25780123 https://news.ycombinator.com/item?id=25780123