def search_by_code(mcs, code): url = "https://www.youav.com/search/videos/" + code response = requests.get(url, proxies=proxy) bs = bs4.BeautifulSoup(response.text, "lxml") try: divs = bs.find_all(name="div", attrs={"class": "content-row"})[-1].find_all(name='div') if not divs: return None div = divs[0] img = div.find(name='img').attrs['src'] except (AttributeError, IndexError): return None url = "https://www.youav.com" + div.a.attrs["href"] av = AV() av.code = code av.video_url = url av.preview_img_url = img return av
def search_by_code(cls, code): url = "https://www.xopenload.video/search.php?s=" + code rsp = requests.get(url) bs = bs4.BeautifulSoup(rsp.text, "lxml") try: div = bs.find(name='div', attrs={'class': 'poster'}) img = div.a.img.attrs['src'] url = div.a.attrs['href'] except AttributeError: return None rsp = requests.get(url) _hash = re.search(r"https://www\.xopenload\.video/links\.php\?hash=(.+?)\"", rsp.text).group(1) url = "https://www.xopenload.video/links.php?hash=" + _hash rsp = requests.get(url) js = re.search(r"<script language=\"javascript\">(.+?)</script>", rsp.text, re.S).group(1)\ .replace("document", "console")\ .replace("write", "log") response = subprocess.Popen(["node", "-e", "%s" % js], stdout=subprocess.PIPE).stdout.read().decode() url = re.findall(r"https://.+?\"", response)[0][:-1] av = AV() av.code = code av.preview_img_url = img av.video_url = url return av
def search_by_code(mcs, code): url = "https://api.avgle.com/v1/search/" + code + "/0?limit=1" rsp = json.loads(requests.get(url, proxies=proxy).text) av = AV() av.title = rsp["response"]["videos"][0]["title"] av.video_url = rsp["response"]["videos"][0]["video_url"] av.code = code av.preview_img_url = rsp["response"]["videos"][0]["preview_url"] return av
def search_by_code(cls, code): url = "https://api.avgle.com/v1/search/" + code + "/0?limit=1" rsp = json.loads(requests.get(url).text) av = AV() av.title = rsp['response']['videos'][0]['title'] av.video_url = rsp['response']['videos'][0]['video_url'] av.code = code av.preview_img_url = rsp['response']['videos'][0]['preview_url'] return av
def search_by_code(cls, code): url = "https://javfull.net/?s=" + code html = requests.get(url).text bs = bs4.BeautifulSoup(html, "lxml") item = bs.select(".item")[0] av = AV() av.code = code av.preview_img_url = item.find(name="img").attrs["src"] av.video_url = item.find(name="a").attrs["href"] return av
def parse_major_info(rsp): items = re.findall("<div class=\"video\".+?</div></div>", rsp.text, re.S) res = [] for item in items: av = AV() img_url = re.search("<img src=\"(.+?)\"", item).group(1).replace("ps.jpg", "pl.jpg") if not img_url.startswith("http"): img_url = "http:" + img_url av.preview_img_url = img_url av.code = re.search("<div class=\"id\">(.+?)</div>", item).group(1) av.title = re.search("<div class=\"title\" >(.+?)</div>", item).group(1) res.append(av) return res
def search_by_code(mcs, code): url = "https://highporn.net/search/videos?search_query=" + code.lower() rsp = requests.get(url, proxies=proxy) if "No Videos Found." in rsp.text: return None bs = bs4.BeautifulSoup(rsp.text, "lxml") div = bs.select(".well-sm")[0] av = AV() av.code = code av.preview_img_url = div.find(name="img").attrs["src"] if not av.preview_img_url.startswith("http"): av.preview_img_url = "http:" + av.preview_img_url av.video_url = div.a.attrs["href"] return av
def search_by_code(mcs, code): url = "https://xfantasy.tv/search/" + code rsp = requests.get(url, proxies=proxy) html = rsp.text bs = bs4.BeautifulSoup(html, "lxml") card = bs.select(".MuiGrid-item") if not card: return None card = card[0].a title = card.text if code in title: av = AV() av.code = code av.preview_img_url = card.img.attrs['src'] av.video_url = "https://xfantasy.tv" + card.attrs["href"] return av return None
def search_by_code(mcs, code): url = "http://www5.javmost.com/" + code + "/" main_rsp = mcs.__client.get(url, proxies=proxy) if main_rsp.status_code != 200: return None img = noexcept( lambda: re.search(r"<meta property=\"og:image\" content=\"(.+?)\"", main_rsp.text).group(1)) if not img: return None # Nov. 13 adding: https://www5.javmost.com/IENE-623/ if not img.startswith("http:"): img = "http:" + img bs = bs4.BeautifulSoup(main_rsp.text, "lxml") buttons = bs.select(".tab-overflow")[0].find_all(name="li")[1:-1] var_value = re.search("'value':(.+?),", main_rsp.text).group(1) value = re.search("var %s = '(.+?)'" % var_value, main_rsp.text).group(1) url = wait_until([ submit(mcs.__try_one_button, button, value, main_rsp) for button in buttons ]) if not url: return None av = AV() av.preview_img_url = img av.video_url = url av.code = code return av
def search_by_code(cls, code): url = "https://www.youav.com/search/videos?search_query=" + code response = requests.request("GET", url) bs = bs4.BeautifulSoup(response.text, "lxml") try: div = bs.find_all(name="div", attrs={"class": "well-sm"})[1] img = "" # div.find(name='img').attrs['src'] except (AttributeError, IndexError): return None url = "https://www.youav.com" + div.a.attrs["href"] av = AV() av.code = code av.video_url = url av.preview_img_url = img return av
def search_by_code(cls, code): url = "http://www5.javmost.com/" + code + "/" main_rsp = cls.__client.get(url, proxies=proxy) if main_rsp.status_code != 200: return None img, _ = try_evaluate( lambda: re.search(r"<meta property=\"og:image\" content=\"(.+?)\"", main_rsp.text).group(1)) if not img: return None # Nov. 13 adding: https://www5.javmost.com/IENE-623/ if not img.startswith("http:"): img = "http:" + img bs = bs4.BeautifulSoup(main_rsp.text, "lxml") buttons = bs.select(".tab-overflow")[0].find_all(name="li")[1:-1] success = False var_value = re.search("'value':(.+?),", main_rsp.text).group(1) value = re.search("var %s = '(.+?)'" % var_value, main_rsp.text).group(1) for button in buttons: params = re.search(r"select_part\((.+?)\)", button.a.attrs["onclick"]).group(1) tokens = params.split(",") group = tokens[1].replace("'", "") part = tokens[0].replace("'", "") _code = tokens[4].replace("'", "") code2 = tokens[5].replace("'", "") code3 = tokens[6].replace("'", "") sound = re.search("'sound':'(.+?)'", main_rsp.text).group(1) data = urlencode( { 'group': group, 'part': part, 'code': _code, 'code2': code2, 'code3': code3, 'value': value, 'sound': sound }, quote_via=quote_plus) rsp = cls.__client.post( "https://www5.javmost.com/get_movie_source/", headers={ 'content-type': "application/x-www-form-urlencoded; charset=UTF-8" }, data=data, proxies=proxy) json_obj = json.loads(rsp.text) url = json_obj["data"][0] url = decode(url) if not url: continue if cls.__client.get(url, proxies=proxy).status_code == 200: success = True break if not success: return None av = AV() av.preview_img_url = img av.video_url = url av.code = code return av
def search_by_code(cls, code): url = "http://www5.javmost.com/" + code main_rsp = cls.__client.get(url) if main_rsp.status_code != 200: return None img, _ = try_evaluate( lambda: re.search(r"<meta property=\"og:image\" content=\"(.+?)\"", main_rsp.text).group(1)) if not img: return None # Nov. 13 adding: https://www5.javmost.com/IENE-623/ if not img.startswith("http:"): img = "http:" + img bs = bs4.BeautifulSoup(main_rsp.text, "lxml") buttons = bs.select('.tab-overflow')[0].find_all(name='li')[1:-1] success = False for button in buttons: params = re.search(r"select_part\((.+?)\)", button.a.attrs['onclick']).group(1) e, t, a, o, l, r, d = [ x.replace("\'", "") for x in params.split(",") ] data = re.search(r"get_source/\",(.+?)\}", main_rsp.text, re.S).group(1) value = re.search(r"value: \"(.+?)\",", data).group(1) sound = re.search(r"sound: \"(.+?)\",", data).group(1) url = "https://www5.javmost.com/get_code/" rsp = cls.__client.post(url, data={"code": value}) _code = rsp.text url = "https://www5.javmost.com/get_source/" rsp = cls.__client.post(url, data={ "group": t, "part": e, "code": l, "code2": r, "code3": d, "value": value, "sound": sound, "code4": _code }) json_obj = json.loads(rsp.text) url = json_obj["data"][0] url = decode(url) if cls.__client.get(url).status_code == 200: success = True break if not success: return None av = AV() av.preview_img_url = img av.video_url = url av.code = code return av