jsvine / waybackpack

Download the entire Wayback Machine archive for a given URL.
MIT License
2.8k stars 189 forks source link

Syntax error in Collab and Jupyter? #45

Closed ppival closed 3 years ago

ppival commented 3 years ago

Attempting to run in either Google Colab or a Jupyter notebook. It installs, but returns a syntax error with any URL:

File "<ipython-input-10-e826c76cce5b>", line 1 waybackpack dol.gov -d ~/Downloads/dol-wayback --to-date 2020 ^ SyntaxError: invalid syntax

jsvine commented 3 years ago

It appears that you are running waybackpack dol.gov -d ~/Downloads/dol-wayback --to-date 2020 as Python code, which it is not; instead, it's a shell command. Instead, if you want to execute the command in a Jupyter notebook, try using the %%bash "magic" in the relevant notebook cell:

%%bash
waybackpack dol.gov -d ~/Downloads/dol-wayback --to-date 2020
ppival commented 3 years ago

Thanks, @jsvine that of course did the trick :-) I still have to figure out files with Colab, but it worked perfectly in Jupyter. Bookmarking Magics

Much appreciated!