or self._parse_json(
self._html_search_regex(
'data-api-data="([^"]+)"',
- self._download_webpage('http://www.nicovideo.jp/watch/' + video_id, video_id),
+ self._download_webpage('https://www.nicovideo.jp/watch/' + video_id, video_id),
'API data', default='{}'),
video_id))
try:
webpage, handle = self._download_webpage_handle(
- 'http://www.nicovideo.jp/watch/' + video_id, video_id)
+ 'https://www.nicovideo.jp/watch/' + video_id, video_id)
if video_id.startswith('so'):
video_id = self._match_id(handle.geturl())
if fmt:
formats.append(fmt)
- self._sort_formats(formats)
-
# Start extracting information
tags = None
if webpage:
}
def _call_api(self, list_id, resource, query):
- "Implement this in child class"
- pass
+ raise NotImplementedError('Must be implemented in subclasses')
@staticmethod
def _parse_owner(item):
webpage = self._download_webpage(url, item_id, query=query, note=note % {'page': page_num})
results = re.findall(r'(?<=data-video-id=)["\']?(?P<videoid>.*?)(?=["\'])', webpage)
for item in results:
- yield self.url_result(f'http://www.nicovideo.jp/watch/{item}', 'Niconico', item)
+ yield self.url_result(f'https://www.nicovideo.jp/watch/{item}', 'Niconico', item)
if not results:
break