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

ComedyCentral module broken (extractor/mtv.py description_node.text is None) #8968

Closed
smkent opened this issue Mar 25, 2016 · 2 comments
Closed

Comments

@smkent
Copy link

@smkent smkent commented Mar 25, 2016

This appears to have become an issue sometime within the past 2 days.

Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 6, in <module>
    youtube_dl.main()
  File "/usr/lib64/python2.7/site-packages/youtube_dl/__init__.py", line 412, in main
    _real_main(argv)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/__init__.py", line 402, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1719, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 668, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/common.py", line 320, in extract
    return self._real_extract(url)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/mtv.py", line 219, in _real_extract
    videos_info = self._get_videos_info(mgid)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/mtv.py", line 183, in _get_videos_info
    return self._get_videos_info_from_url(info_url, video_id)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/mtv.py", line 190, in _get_videos_info_from_url
    [self._get_video_info(item) for item in idoc.findall('.//item')])
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/mtv.py", line 135, in _get_video_info
    description = description_node.text.strip()
AttributeError: 'NoneType' object has no attribute 'strip'

Temporary workaround:

--- /usr/lib64/python2.7/site-packages/youtube_dl/extractor/mtv.py      2016-03-24 17:35:48.518820768 -0700
+++ /usr/lib64/python2.7/site-packages/youtube_dl/extractor/mtv.py      2016-03-24 17:32:24.162000946 -0700
@@ -132,7 +132,10 @@

         description_node = itemdoc.find('description')
         if description_node is not None:
-            description = description_node.text.strip()
+            if description_node.text:
+                description = description_node.text.strip()
+            else:
+                description = None
         else:
             description = None


@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 25, 2016

Already fixed.

@dstftw dstftw closed this Mar 25, 2016
@phihag
Copy link
Contributor

@phihag phihag commented Mar 25, 2016

I believe this issue is already fixed in youtube-dl 2016.03.25. If it still fails for you, please open a new issue and make sure to include the complete output of youtube-dl when called with -v.

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
3 participants
You can’t perform that action at this time.