2015-12-02 05:00:47 +01:00
|
|
|
# encoding: utf-8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
import re
|
|
|
|
|
2016-01-22 19:04:33 +01:00
|
|
|
from .nuevo import NuevoBaseIE
|
|
|
|
|
2015-12-02 05:00:47 +01:00
|
|
|
|
|
|
|
class TrollvidsIE(NuevoBaseIE):
|
2016-03-21 16:36:32 +01:00
|
|
|
_VALID_URL = r'https?://(?:www\.)?trollvids\.com/video/(?P<id>\d+)/(?P<display_id>[^/?#&]+)'
|
2015-12-02 05:00:47 +01:00
|
|
|
IE_NAME = 'trollvids'
|
2016-01-22 19:04:33 +01:00
|
|
|
_TEST = {
|
|
|
|
'url': 'http://trollvids.com/video/2349002/%E3%80%90MMD-R-18%E3%80%91%E3%82%AC%E3%83%BC%E3%83%AB%E3%83%95%E3%83%AC%E3%83%B3%E3%83%89-carrymeoff',
|
|
|
|
'md5': '1d53866b2c514b23ed69e4352fdc9839',
|
|
|
|
'info_dict': {
|
|
|
|
'id': '2349002',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': '【MMD R-18】ガールフレンド carry_me_off',
|
|
|
|
'age_limit': 18,
|
|
|
|
'duration': 216.78,
|
|
|
|
},
|
|
|
|
}
|
2015-12-02 05:00:47 +01:00
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2016-01-22 19:04:33 +01:00
|
|
|
mobj = re.match(self._VALID_URL, url)
|
|
|
|
video_id = mobj.group('id')
|
|
|
|
display_id = mobj.group('display_id')
|
2015-12-02 05:00:47 +01:00
|
|
|
|
2016-01-22 19:04:33 +01:00
|
|
|
info = self._extract_nuevo(
|
|
|
|
'http://trollvids.com/nuevo/player/config.php?v=%s' % video_id,
|
|
|
|
video_id)
|
2015-12-02 05:00:47 +01:00
|
|
|
info.update({
|
2016-01-22 19:04:33 +01:00
|
|
|
'display_id': display_id,
|
2015-12-02 05:00:47 +01:00
|
|
|
'age_limit': 18
|
|
|
|
})
|
|
|
|
return info
|