aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-09-18 07:22:06 +0700
committerSergey M․ <dstftw@gmail.com>2016-09-18 07:22:06 +0700
commit190d2027d0b6c785cf789edf6c1bdac2ef650a66 (patch)
tree7439f1d68b244b4044a6402d0f0172615384fdcd
parent26394d021df1137301b1508bd00dd3478c15116c (diff)
[xfileshare] Add title regex for streamin.to and fallback to video id (Closes #10646)
-rw-r--r--youtube_dl/extractor/xfileshare.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/youtube_dl/extractor/xfileshare.py b/youtube_dl/extractor/xfileshare.py
index 995aada0d..de344bad2 100644
--- a/youtube_dl/extractor/xfileshare.py
+++ b/youtube_dl/extractor/xfileshare.py
@@ -124,12 +124,14 @@ class XFileShareIE(InfoExtractor):
webpage = self._download_webpage(req, video_id, 'Downloading video page')
title = (self._search_regex(
- [r'style="z-index: [0-9]+;">([^<]+)</span>',
+ (r'style="z-index: [0-9]+;">([^<]+)</span>',
r'<td nowrap>([^<]+)</td>',
r'h4-fine[^>]*>([^<]+)<',
r'>Watch (.+) ',
- r'<h2 class="video-page-head">([^<]+)</h2>'],
- webpage, 'title', default=None) or self._og_search_title(webpage)).strip()
+ r'<h2 class="video-page-head">([^<]+)</h2>',
+ r'<h2 style="[^"]*color:#403f3d[^"]*"[^>]*>([^<]+)<'), # streamin.to
+ webpage, 'title', default=None) or self._og_search_title(
+ webpage, default=None) or video_id).strip()
def extract_video_url(default=NO_DEFAULT):
return self._search_regex(