Skip to content

Commit

Permalink
[youtube] correct --no-playlist for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
FiloSottile committed Oct 1, 2013
1 parent d4d9920 commit 7c61bd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/test_youtube_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_youtube_playlist_noplaylist(self):
ie = YoutubePlaylistIE(dl)
result = ie.extract('https://www.youtube.com/watch?v=FXxLjLQi3Fg&list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re')
self.assertEqual(result['_type'], 'url')
self.assertEqual(YoutubeIE()._extract_id(result['url']), 'FXxLjLQi3Fg')

def test_issue_673(self):
dl = FakeYDL()
Expand Down
4 changes: 2 additions & 2 deletions youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import traceback
import xml.etree.ElementTree
import zlib
import urlparse

from .common import InfoExtractor, SearchInfoExtractor
from .subtitles import SubtitlesInfoExtractor
Expand All @@ -24,6 +23,7 @@
compat_urllib_error,
compat_urllib_parse,
compat_urllib_request,
compat_urlparse,
compat_str,

clean_html,
Expand Down Expand Up @@ -1527,7 +1527,7 @@ def _real_extract(self, url):
playlist_id = mobj.group(1) or mobj.group(2)

# Check if it's a video-specific URL
query_dict = urlparse.parse_qs(urlparse.urlparse(url).query)
query_dict = compat_urlparse.parse_qs(compat_urlparse.urlparse(url).query)
if 'v' in query_dict:
video_id = query_dict['v'][0]
if self._downloader.params.get('noplaylist'):
Expand Down

0 comments on commit 7c61bd3

Please sign in to comment.