def query_info(self, url): #url = 'http://vmus.online/The-Outpost-S01EP01.html' hutf = self.get_hutf(url) #echo(hutf) ol = OpenLoad() ret = SelStr("title", hutf) ol.title = ret[0].text ret = SelStr("div.entry-content>p iframe", hutf) #url = [ret[0]['src']] return ol.query_info(ret[0]['src'])
def hindilink4u_to_openload(): url = "" if len(argv) == 2: url = argv[1] else: print("ERROR") #open with GET method resp = requests.get(url) #http_respone 200 means OK status if resp.status_code == 200: soup = BeautifulSoup(resp.text, 'html.parser') n = soup.text.find("openload.co/f/") + 14 file_id = soup.text[n:n + 11] username = '******' key = '_fi7pPg3' ol = OpenLoad(username, key) # Get a download ticket and captcha url. preparation_resp = ol.prepare_download(file_id) ticket = preparation_resp.get('ticket') # print(ticket) # Sometimes no captcha is sent in openload.co API response. captcha_url = preparation_resp.get('captcha_url') # print(captcha_url) if captcha_url: # Solve captcha. captcha_response = solve_captcha(captcha_url) else: captcha_response = '' download_resp = ol.get_download_link(file_id, ticket, captcha_response) # print(download_resp.get('url')) # try: direct_download_url = download_resp.get('url') # # except PermissionDeniedException: # print("Error") webbrowser.open(direct_download_url, new=0, autoraise=True) else: print("Error")
def query_info1(self, url): hutf = self.login_hutf(url) #<meta name="og:url" content="https://openload.co/embed/isCWWnlsZLE/"> #<iframe src="https://openload.co/embed/isCWWnlsZLE/" urls = match1( hutf, '\<iframe src="(https://openload.(c|i)o/embed/\S+)" ', '\<meta name="og:url" ' 'content="(https://openload.(c|i)o/embed/\S+)"\>') echo(urls) title = match1(hutf, '<meta property="og:title" content="([^<>]+)"') echo("vmus query_info title=", title) if not urls: echo(SelStr("div.clearfix > p > strong", hutf)[0].text) return None, None, urls, None ol = OpenLoad() ol.title = title return ol.query_info(urls[0])
def openloadfetch(fileid): ol = OpenLoad(apikey.userkey, apikey.passkey) file_id = fileid preparation_resp = ol.prepare_download(file_id) ticket = preparation_resp.get('ticket') # Sometimes no captcha is sent in openload.co API response. captcha_url = preparation_resp.get('captcha_url') if captcha_url: # Solve captcha. pass else: captcha_response = '' download_resp = ol.get_download_link(file_id, ticket, captcha_response) direct_download_url = download_resp.get('url') # Process download url. return direct_download_url
if captcha_url: # Solve captcha. captcha_response = '' # solve_captcha(captcha_url) else: captcha_response = '' download_resp = ol.get_download_link(file_id, ticket, captcha_response) direct_download_url = download_resp.get('url') # Process download url. print(direct_download_url) # Data Part ol = OpenLoad('bf97043b1e26e3aa', 'FTDZRy_v') account_info = ol.account_info() print(account_info) # Instr. Set i = 0 while i >= 0: try: sleep(360) download('9ZZOeA1yYzI') i = -1 except Exception as e: i = i + 1 print(e) print('Retry... #', i)
from openload import OpenLoad import webbrowser from sys import argv username = '******' key = '_fi7pPg3' ol = OpenLoad(username, key) url = "https://www.google.com" if len(argv) == 2: url = argv[1] else: print("ERROR") file_id = url[22:33] print(file_id) # Get a download ticket and captcha url. preparation_resp = ol.prepare_download(file_id) ticket = preparation_resp.get('ticket') # Sometimes no captcha is sent in openload.co API response. captcha_url = preparation_resp.get('captcha_url') if captcha_url: # Solve captcha. captcha_response = solve_captcha(captcha_url) else: captcha_response = '' download_resp = ol.get_download_link(file_id, ticket, captcha_response)
import os from openload import OpenLoad login = os.environ.get('OPENLOAD_LOGIN') key = os.environ.get('OPENLOAD_KEY') ol = OpenLoad('login', 'key') uploaded_file_info = ol.upload_file('/usr/movie/92958.jpg') print(uploaded_file_info)
def upload(file, idx='e0c48fed98989cd0', key='FeNfWADI'): ol = OpenLoad() uploaded_file_info = ol.upload_file(file) return uploaded_file_info
from __future__ import print_function from openload import OpenLoad username = '******' key = 'FTP Password/API Key' ol = OpenLoad(username, key)
import csv import random line = [ "Title", "EmbedCod", "Video Duration", "Thumbnail", "Categories", "Tags" ] output = "openload_out.csv" with open(output, 'w', newline='') as file1: writer = csv.writer(file1, delimiter=',') writer.writerow(line) user_folder = input("please input folder name : ") username = '******' key = 'key' ol = OpenLoad(username, key) tree_result = [] fold_tree = ol.list_folder() folders = fold_tree["folders"] for folder in folders: tree_result.append(folder) tree = ol.list_folder(folder["id"]) treelen = tree["folders"] for tree3 in treelen: tree_result.append(tree3) tree1 = ol.list_folder(tree3["id"]) tree2en = tree1["folders"] for tree4 in tree2en: tree_result.append(tree4) tree2 = ol.list_folder(tree4["id"]) tree5en = tree2["folders"]