projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
65c2b21
)
[vice] Modernize
author
Sergey M․
<dstftw@gmail.com>
Sun, 19 Jul 2015 18:42:25 +0000
(
00:42
+0600)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 19 Jul 2015 18:42:25 +0000
(
00:42
+0600)
youtube_dl/extractor/vice.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vice.py
b/youtube_dl/extractor/vice.py
index ae1faca1cd6ece5d33a7950b858ec078b55b29e7..01af7a99574401b38e487b01dd5104e674740bbc 100644
(file)
--- a/
youtube_dl/extractor/vice.py
+++ b/
youtube_dl/extractor/vice.py
@@
-1,5
+1,4
@@
from __future__ import unicode_literals
from __future__ import unicode_literals
-import re
from .common import InfoExtractor
from .ooyala import OoyalaIE
from .common import InfoExtractor
from .ooyala import OoyalaIE
@@
-7,7
+6,7
@@
from ..utils import ExtractorError
class ViceIE(InfoExtractor):
class ViceIE(InfoExtractor):
- _VALID_URL = r'https?://(?:.+?\.)?vice\.com/
.*?/(?P<name
>.+)'
+ _VALID_URL = r'https?://(?:.+?\.)?vice\.com/
(?:[^/]+/)+(?P<id
>.+)'
_TESTS = [
{
_TESTS = [
{
@@
-28,9
+27,8
@@
class ViceIE(InfoExtractor):
]
def _real_extract(self, url):
]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- name = mobj.group('name')
- webpage = self._download_webpage(url, name)
+ video_id = self._match_id(url)
+ webpage = self._download_webpage(url, video_id)
try:
embed_code = self._search_regex(
r'embedCode=([^&\'"]+)', webpage,
try:
embed_code = self._search_regex(
r'embedCode=([^&\'"]+)', webpage,