nikhilkumarsingh/content-downloader

When I use ctdl I get this error :/

UmutAlihan opened this issue · 1 comments

Hi,

Which kind of information of my pc setup do you require in order to analyze my issue? Sorry I am noob, so you can just tell me about I post it here...
But Initially I use Ubuntu 16.04 on an old Macbook.

The Error on my terminal is like this:

uad@uad:~$ sudo ctdl "letter of guarantee"
Downloading 10 pdf files on topic letter of guarantee and saving to directory: letter-of-guarantee
Traceback (most recent call last):
  File "/usr/local/bin/ctdl", line 11, in <module>
    load_entry_point('ctdl==1.4.5', 'console_scripts', 'ctdl')()
  File "/usr/local/lib/python2.7/dist-packages/ctdl/ctdl.py", line 235, in main
    download_content(**args_dict)
  File "/usr/local/lib/python2.7/dist-packages/ctdl/ctdl.py", line 149, in download_content
    links = search(args['query'], args['file_type'], args['limit'])
  File "/usr/local/lib/python2.7/dist-packages/ctdl/ctdl.py", line 108, in search
    valid_links = validate_links(links)
  File "/usr/local/lib/python2.7/dist-packages/ctdl/ctdl.py", line 82, in validate_links
    urls[link] = {'code': get_url_nofollow(link)}
  File "/usr/local/lib/python2.7/dist-packages/ctdl/ctdl.py", line 64, in get_url_nofollow
    except urllib.error.HTTPError as e:
AttributeError: 'module' object has no attribute 'error'

Thank you for all your efforts. This tool is really awesome. You have a great mind :).
Best regards,

There was an issue with Python 2 compatibility which has been fixed in latest version.
Please upgrade ctdl using this command:
sudo pip install -U ctdl