aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-02-16 22:06:26 +0600
committerSergey M․ <dstftw@gmail.com>2016-02-16 22:06:26 +0600
commitf4db09178a2c531005a3502a497b8dbf0bfe20e2 (patch)
tree0ebf8ca1f7bb1e13d197c6979a1f4cbc4cdd5afe
parent86be3cdc2a623a522500ca073835579b853a1ae1 (diff)
[xtube:user] Remove duplicated video ids
-rw-r--r--youtube_dl/extractor/xtube.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/xtube.py b/youtube_dl/extractor/xtube.py
index 24df5c48e..4075b8a4f 100644
--- a/youtube_dl/extractor/xtube.py
+++ b/youtube_dl/extractor/xtube.py
@@ -7,6 +7,7 @@ from .common import InfoExtractor
from ..compat import compat_urllib_parse_unquote
from ..utils import (
int_or_none,
+ orderedSet,
sanitized_Request,
str_to_int,
)
@@ -118,7 +119,8 @@ class XTubeUserIE(InfoExtractor):
if not html:
break
- for _, video_id in re.findall(r'data-plid=(["\'])(.+?)\1', html):
+ for video_id in orderedSet([video_id for _, video_id in re.findall(
+ r'data-plid=(["\'])(.+?)\1', html)]):
entries.append(self.url_result('xtube:%s' % video_id, XTubeIE.ie_key()))
page_count = int_or_none(page.get('pageCount'))