def is_video(self, p): regx1 = '//video[@id="example_video_1"]/@poster' regx2 = '//video[@id="example_video_1"]/source/@src' image_url = tools.xpath_parser(p._html, regx1, fetch_one=True) result = tools.xpath_parser(p._html, regx2, fetch_one=True) if result: return result
def get_video_info(html): regx1 = '//video/@src' regx2 = '//video/@poster' result = tools.xpath_parser(html, regx1, fetch_one=True) image_url = tools.xpath_parser(html, regx2, fetch_one=True) if result: return True
def is_video(self, p): regx1 = '//video/@src' regx2 = '//video/@poster' result = tools.xpath_parser(p._html, regx1, fetch_one=True) image_url = tools.xpath_parser(p._html, regx2, fetch_one=True) if result: return True
def is_video(self, p): regx1 = '//iframe/@src' regx2 = '//embed/@src' result1 = tools.xpath_parser(p._html, regx1, fetch_one=True) if result1: return True result2 = tools.xpath_parser(p._html, regx2, fetch_one=True) if result2: return True
def get_video_info(html): regx1 = '//iframe/@src' regx2 = '//embed/@src' result1 = tools.xpath_parser(html, regx1, fetch_one=True) if result1: return True result2 = tools.xpath_parser(html, regx2, fetch_one=True) if result2: return True
def get_video_info(html): regx1 = '//iframe[@id="playerFrame"]/@src' info = tools.xpath_parser(html, regx1, fetch_one=True) regx2 = 'src=(.*?)&' result = "http:" + tools.get_info(info, regx2, fetch_one=True) image_url = tools.xpath_parser(html, '//meta[@name="shareImg"]/@content', fetch_one=True) if result: return True
def get_video_info(html): regx1 = '//div[@id="vt-video"]/video/@src' regx2 = '//div[@id="vt-video"]/video/@poster' result = tools.xpath_parser(html, regx1, fetch_one=True) image_url = tools.xpath_parser(html, regx2, fetch_one=True) if result: return True regx = 'name="mvFlash" pluginspage=".*?" src="(.*?)"' flash_url = tools.get_info(html, regx, fetch_one=True) if flash_url: return True
def is_video(self, p): regx1 = ' //div[@class="video_content"]//embed/@flashvars' result = tools.xpath_parser(p._html, regx1, fetch_one=True) if result: return True regx2 = '//source[@id="youth_video_src_1"]/@src' video_url = tools.xpath_parser(p._html, regx2, fetch_one=True) if video_url: return True regx3 = '//video/@src' video_url2 = tools.xpath_parser(p._html, regx3, fetch_one=True) if video_url2: return True
def is_video(self, p): char = r'addltype:"video"' regx1 = '//div[@id="vt-video"]/video/@src' regx2 = '//div[@id="vt-video"]/video/@poster' result = tools.xpath_parser(p._html, regx1, fetch_one=True) image_url = tools.xpath_parser(p._html, regx2, fetch_one=True) if result: return True regx = 'name="mvFlash" pluginspage=".*?" src="(.*?)"' flash_url = tools.get_info(p._html, regx, fetch_one=True) if flash_url: return True if char in p._html: return True
def get_video_info(html): regx1 = '//div[@id="MultiAttachPh"]/text()' regx2 = '//div[@id="PicUrlPh"]/img/@src' result = tools.xpath_parser(html, regx1, fetch_one=True) if result: video_url = result.replace("\r\n", '').strip() return True
def get_video_info(html): regx1 = '//video[@id="my_video_1"]/source/@src' result = tools.xpath_parser(html, regx1, fetch_one=True) print(result) image_url = 'http://www.legaldaily.com.cn/templateRes/201611/10/33946/33946/images/2016-zy-002.gif' if result: return result
def is_video(self, p): regx1 = '//div[@name="video_bravo_vms"]/span/@name' regx2 = 'window=(.*?)&' result = tools.xpath_parser(p._html, regx1, fetch_one=True) image_url = tools.get_info(p._html, regx2, fetch_one=True) if result: return True
def get_video_info(root_url, html): id = re.search('\d+', root_url).group() regx = '//video[@id="video{}"]/source/@src'.format(id) regx2 = '"poster": "(.*?)"' result = tools.xpath_parser(html, regx, fetch_one=True) image_url = tools.get_info(html, regx2, fetch_one=True) if result: return True
def get_video_info(html): regx1 = '//div[@name="video_bravo_vms"]/span/@name' regx2 = 'window=(.*?)&' result = tools.xpath_parser(html, regx1, fetch_one=True) image_url = tools.get_info(html, regx2, fetch_one=True) if result: print(result) return True
def get_video_info(html): node = execjs.get() jqury = '"jQuery" + ("1.11.3" + Math.random()).replace(/\D/g, "")' para = node.eval(jqury) ts = int(time.time() * 1000) regx = '//div[@id="cmplayer"]/@data-media' url1 = xpath_parser(html, regx, fetch_one=True) id = re.search(r'id=(.*?)&', url1).group(1) o_url = 'http://yspmvms.81.cn/?id={}&callbackparam={}_{}&ctype=sd&ttype=pc&_={}'.format( id, para, ts, ts) video_info = requests.get(o_url).text regx2 = '"(.*)"' video_url = tools.get_info(video_info, regx2, fetch_one=True) if video_url: print(video_url)
def get_video_info(html): regx = '//p[@id="video"]//a/@href' result = tools.xpath_parser(html, regx, fetch_one=True) image_url = "http://img.tbnimg.com/icon/bjnews_114.png" if result: return True
def get_video_info(html): regx = '//iframe[@name="videoiframe"]/@src' result = tools.xpath_parser(html, regx, fetch_one=True) image_url = "https://www.guancha.cn/images/mian-logo.png" if result: return result
def is_video(self, p): regx = '//span[@id="videofile"]/@src' result = tools.xpath_parser(p._html, regx, fetch_one=True) image_url = "http://images.china.cn/images1/ch/2017video/2017video/logo.jpg" if result: return True
def is_video(self, p): regx = '//iframe/@src' result = tools.xpath_parser(p._html, regx, fetch_one=True) image_url = 'http://www.farmer.com.cn/images/%E4%B8%AD%E5%9B%BD%E5%86%9C%E4%B8%9A%E6%96%B0%E9%97%BB%E7%BD%91%E7%BA%A2%E8%89%B2LOGO.png' if result: return True
def is_video(self, p): regx = '//iframe[@name="flashimedia"]/@src' result = tools.xpath_parser(p._html, regx, fetch_one=True) image_url = "http://ej.eastday.com/images/2013newlogo/title_video.jpg" if result: return True