X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=inline;f=youtube_dl%2Fextractor%2Fxtube.py;h=5584674a061fc5a67bbb65bc0b58fc96e96eae3b;hb=f7923a4c399e0ce8e6cd230db92aefbfcff297c3;hp=b293e2665b81b9a486bff2ec91b410da4a6d9998;hpb=bfcb6e3917f89ad283cbcaf9cdf67925ce5e7155;p=youtube-dl
diff --git a/youtube_dl/extractor/xtube.py b/youtube_dl/extractor/xtube.py
index b293e2665..5584674a0 100644
--- a/youtube_dl/extractor/xtube.py
+++ b/youtube_dl/extractor/xtube.py
@@ -1,114 +1,158 @@
from __future__ import unicode_literals
+import itertools
import re
-import json
from .common import InfoExtractor
from ..utils import (
- compat_urllib_request,
+ int_or_none,
+ orderedSet,
parse_duration,
+ sanitized_Request,
str_to_int,
)
class XTubeIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?(?P ([^<]+)', webpage, 'title')
- video_uploader = self._html_search_regex(
- r'so_s\.addVariable\("owner_u", "([^"]+)', webpage, 'uploader', fatal=False)
- video_description = self._html_search_regex(
- r' ([^<]+)', webpage, 'description', fatal=False)
- duration = parse_duration(self._html_search_regex(
- r'Runtime: ([^<]+)
([^<]+)', webpage, 'description', fatal=False)
+ uploader = self._search_regex(
+ (r']+name="contentOwnerId"[^>]+value="([^"]+)"',
+ r']+class="nickname"[^>]*>([^<]+)'),
+ webpage, 'uploader', fatal=False)
+ duration = parse_duration(self._search_regex(
+ r'