jsvine / waybackpack

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

IndexError: list index out of range with v0.3.0 #14

Closed StevenACoffman closed 8 years ago

StevenACoffman commented 8 years ago
waybackpack dol.gov -d /Users/scoffman/shots/sobig/resources/shots/pages --to-date 1996

Results in:

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): web.archive.org
Traceback (most recent call last):
  File "/Users/scoffman/.virtualenvs/shots/bin/waybackpack", line 11, in <module>
    sys.exit(main())
  File "/Users/scoffman/.virtualenvs/shots/lib/python2.7/site-packages/waybackpack/cli.py", line 73, in main
    collapse=args.collapse
  File "/Users/scoffman/.virtualenvs/shots/lib/python2.7/site-packages/waybackpack/cdx.py", line 21, in search
    fields = cdx[0]
IndexError: list index out of range

I am using Python 2.7.10 with waybackpack=0.3.0 and requests=2.10.0

jsvine commented 8 years ago

Thanks for @StevenACoffman! And strange! I can't replicate this error. (I'm testing on 2.7.9 with the same library versions.) Regardless, that's clearly a bug. I've fixed the offending line, and pushed the changes to the repo and to PyPi. Try pip install --upgrade waybackpack and let me know if it's still causing problems.

StevenACoffman commented 8 years ago

Awesome! Thanks so much! Fixed my problem, and now I'm up and working again. If it helps, I was using it via https://github.com/bevacqua/shots