Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ImgurAlbum] TypeError: list indices must be integers, not unicode #7918

Closed
jwilk opened this issue Dec 20, 2015 · 0 comments
Closed

[ImgurAlbum] TypeError: list indices must be integers, not unicode #7918

jwilk opened this issue Dec 20, 2015 · 0 comments

Comments

@jwilk
Copy link
Contributor

@jwilk jwilk commented Dec 20, 2015

$ youtube-dl https://imgur.com/gallery/YcAQlkx
[ImgurAlbum] YcAQlkx: Downloading JSON metadata
Traceback (most recent call last):
  File "/home/jwilk/.local/bin/youtube-dl", line 6, in <module>
    youtube_dl.main()
  File "/home/jwilk/.local/lib/python2.7/site-packages/youtube_dl/__init__.py", line 410, in main
    _real_main(argv)
  File "/home/jwilk/.local/lib/python2.7/site-packages/youtube_dl/__init__.py", line 400, in _real_main
    retcode = ydl.download(all_urls)
  File "/home/jwilk/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1677, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/home/jwilk/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 665, in extract_info
    ie_result = ie.extract(url)
  File "/home/jwilk/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 291, in extract
    return self._real_extract(url)
  File "/home/jwilk/.local/lib/python2.7/site-packages/youtube_dl/extractor/imgur.py", line 118, in _real_extract
    album_id)['data']['images']
TypeError: list indices must be integers, not unicode

(Tested with e462474.)

@dstftw dstftw closed this Dec 22, 2015
dstftw added a commit that referenced this issue Dec 22, 2015
remove outer parentheses in if

Conflicts:
	youtube_dl/extractor/imgur.py

checked code with flake8

not returning list in case of single images.

using the fact that id with length 5 are albums and more are single videos.
Also for single videos ie ImgurIE both urls - http://imgur.com/gallery/oWeAMW2 and http://imgur.com/oWeAMW2 are equally fine. Change regex to allow thuis.
For albums urls - http://imgur.com/gallery/Q95ko and http://imgur.com/Q95ko are ok. Change regex to allow this also.

update description in ImgurIE Tests.
Also move single video test 'https://imgur.com/gallery/YcAQlkx' from ImgurAlbumIE to ImgurIE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.