projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[spankwire] Fixed uploader_id field extraction so that test case passes
[youtube-dl]
/
youtube_dl
/
extractor
/
spankwire.py
diff --git
a/youtube_dl/extractor/spankwire.py
b/youtube_dl/extractor/spankwire.py
index bff75d6b2945584e0193b50ff8915b91fec26f1f..0a35c2b3b5b97f32b11c6022aad7033a6193a2b3 100644
(file)
--- a/
youtube_dl/extractor/spankwire.py
+++ b/
youtube_dl/extractor/spankwire.py
@@
-4,7
+4,7
@@
import re
from .common import InfoExtractor
from ..compat import (
from .common import InfoExtractor
from ..compat import (
- compat_urllib_parse,
+ compat_urllib_parse
_unquote
,
compat_urllib_parse_urlparse,
compat_urllib_request,
)
compat_urllib_parse_urlparse,
compat_urllib_request,
)
@@
-54,7
+54,7
@@
class SpankwireIE(InfoExtractor):
r'by:\s*<a [^>]*>(.+?)</a>',
webpage, 'uploader', fatal=False)
uploader_id = self._html_search_regex(
r'by:\s*<a [^>]*>(.+?)</a>',
webpage, 'uploader', fatal=False)
uploader_id = self._html_search_regex(
- r'by:\s*<a href="/
Profile\.aspx
\?.*?UserId=(\d+).*?"',
+ r'by:\s*<a href="/
user/viewProfile
\?.*?UserId=(\d+).*?"',
webpage, 'uploader id', fatal=False)
upload_date = unified_strdate(self._html_search_regex(
r'</a> on (.+?) at \d+:\d+',
webpage, 'uploader id', fatal=False)
upload_date = unified_strdate(self._html_search_regex(
r'</a> on (.+?) at \d+:\d+',
@@
-68,7
+68,7
@@
class SpankwireIE(InfoExtractor):
webpage, 'comment count', fatal=False))
video_urls = list(map(
webpage, 'comment count', fatal=False))
video_urls = list(map(
- compat_urllib_parse
.
unquote,
+ compat_urllib_parse
_
unquote,
re.findall(r'playerData\.cdnPath[0-9]{3,}\s*=\s*(?:encodeURIComponent\()?["\']([^"\']+)["\']', webpage)))
if webpage.find('flashvars\.encrypted = "true"') != -1:
password = self._search_regex(
re.findall(r'playerData\.cdnPath[0-9]{3,}\s*=\s*(?:encodeURIComponent\()?["\']([^"\']+)["\']', webpage)))
if webpage.find('flashvars\.encrypted = "true"') != -1:
password = self._search_regex(