jsvine / waybackpack

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

'Invalid Syntax Error' #32

Closed lyons7 closed 5 years ago

lyons7 commented 5 years ago

Hi! I am having an issue just running the simplest command - I think I am doing something wrong that is so stupid I can't find any resources for help...

import waybackpack import requests waybackpack https://www.metopera.org/season/2017-18-season/elektra-strauss-tickets -d ~/Downloads --user-agent

Gives me an invalid Syntax error. I'm working in a .py file in Atom Mac OS with Python 3. Any suggestions?

lyons7 commented 5 years ago

Ok, I fixed it. Even though this says it is for Python you have to run it through terminal. I had to navigate to the exact directory in which the 'waybackpack' was located then run the example code shown in the README on the terminal command line. (This is probably why it's called a 'command line tool', lol) It works fine which is great, but I am still confused why this is called a Python module and is said to work for Python 2 and 3 when you ... don't actual run it in Python? 😮 I know there is something I am missing and, well, that's okay, I hope I learn enough to understand it one day. In the meantime, I wanted to share my journey in the hope that it assists some other poor schmuck like myself, who always tests the boundaries of things you thought you never had to specify or explain ❤️

jsvine commented 5 years ago

Thanks for submitting this issue, @lyons7. It's genuinely useful to know where people get confused.

To answer your question about why Python is mentioned: The tool is written in Python and requires Python to be installed on your computer in order for it to work. Some tools are written in a way that only work with Python 3, and require Python 3 to be installed on your computer. (Or, conversely, only work for Python 2.) This tool, however, will work no matter which version of Python you have installed.