Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def prepare_list(self):
html = get_content(self.url)
eplist = matchall(html, ['"epList":(\[.*?\])'])
if eplist:
eplist = sum(map(matchall, eplist, [['"(?:ep_)?id":(\d+),']] * len(eplist)), [])
return ['https://www.bilibili.com/bangumi/play/ep{}'.format(eid) for eid in eplist]
def get_path_list(self):
html = get_content(self.url)
videos = matchall(html, ['href=[\'"](/bangumi/aa\d+_\d+_\d+)[\'"] data-title=[\'"]'])
return videos
def prepare_list(self):
av_id = match1(self.url, '/av(\d+)')
html = get_content(self.url)
video_list = matchall(html, ['"page":(\d+),'])
if video_list:
return ['https://www.bilibili.com/av{}/?p={}'.format(av_id, p) for p in video_list]
def get_path_list(self):
html = get_content(self.url)
videos = matchall(html, ['href=[\'"](/v/[a-zA-Z0-9_]+)[\'"] title=[\'"]'])
return videos
def prepare_list(self):
html = get_content(self.url, headers={})
return matchall(html, ['"a-pic-play" href="([^"]+)"'])
def prepare_list(self):
html = get_content(self.url)
return matchall(html, ['data-tvid=\"([^\"]+)\" data-vid=\"([^\"]+)\"'])
def prepare(self):
info = VideoInfo(self.name)
if self.url and not self.vid:
vid = matchall(self.url, ['curid=([^_]+)_([\w]+)'])
if vid:
self.vid = vid[0]
info_u = 'http://pcw-api.iqiyi.com/video/video/playervideoinfo?tvid=' + self.vid[0]
try:
info_json = json.loads(get_content(info_u))
info.title = info_json['data']['vn']
except:
self.vid = None
def get_vid():
html = get_content(self.url)
video_info = match1(html, ":video-info='(.+?)'")
if video_info:
video_info = json.loads(video_info)
self.vid = str(video_info['tvId']), str(video_info['vid'])
def prepare_list(self):
html = get_content(self.url)
eplist = matchall(html, ['"epList":(\[.*?\])'])
if eplist:
eplist = sum(map(matchall, eplist, [['"(?:ep_)?id":(\d+),']] * len(eplist)), [])
return ['https://www.bilibili.com/bangumi/play/ep{}'.format(eid) for eid in eplist]
def prepare_list(self):
html = get_content(self.url)
return matchall(html, douyu_match_pattern)