[pornhub:playlistbase] Use orderedSet
authorSergey M․ <dstftw@gmail.com>
Sun, 27 Mar 2016 18:21:08 +0000 (00:21 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 27 Mar 2016 18:21:08 +0000 (00:21 +0600)
youtube_dl/extractor/pornhub.py

index 5a55c25e78cf4b5ad95c05e5856f639d9bdd8617..670e9294a81ac18c09db9469e124f6d2911572c9 100644 (file)
@@ -12,6 +12,7 @@ from ..compat import (
 from ..utils import (
     ExtractorError,
     int_or_none,
+    orderedSet,
     sanitized_Request,
     str_to_int,
 )
@@ -150,7 +151,7 @@ class PornHubPlaylistBaseIE(InfoExtractor):
     def _extract_entries(self, webpage):
         return [
             self.url_result('http://www.pornhub.com/%s' % video_url, PornHubIE.ie_key())
-            for video_url in set(re.findall(
+            for video_url in orderedSet(re.findall(
                 r'href="/?(view_video\.php\?.*\bviewkey=[\da-z]+[^"]*)"', webpage))
         ]