bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def download_api_data(self, n=0): url = self.url id_regex = re.compile("http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)") match = id_regex.search(url) if match: apiurl = "http://netload.in/share/fileinfos2.php" src = self.load(apiurl, cookies=False, get={"file_id": match.group(1)}).strip() if no... | def download_api_data(self, n=0): url = self.url id_regex = re.compile("http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)") match = id_regex.search(url) if match: apiurl = "http://netload.in/share/fileinfos2.php" src = self.load(apiurl, cookies=False, get={"file_id": match.group(1)}).strip() if no... | 450,200 |
def download_api_data(self, n=0): url = self.url id_regex = re.compile("http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)") match = id_regex.search(url) if match: apiurl = "http://netload.in/share/fileinfos2.php" src = self.load(apiurl, cookies=False, get={"file_id": match.group(1)}).strip() if no... | def download_api_data(self, n=0): url = self.url id_regex = re.compile("http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)") match = id_regex.search(url) if match: apiurl = "http://netload.in/share/fileinfos2.php" src = self.load(apiurl, cookies=False, get={"file_id": match.group(1)}).strip() if no... | 450,201 |
def work(self): while True: try: t, j = self.queue.get() except IndexError: break else: if t <= time(): j.start() else: self.queue.put((t, j)) break | def work(self): while True: t, j = self.queue.get() if not j: break else: if t <= time(): j.start() else: self.queue.put((t, j)) break | 450,202 |
def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True ): self.logger.debug("create tmp tif") tmp = tempfile.NamedTemporaryFile(suffix=".tif") self.logger.debug("create tmp txt") tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt") self.logger.debug("save tiff") self.image.save(tmp.name, 'TIFF') | def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True): self.logger.debug("create tmp tif") tmp = tempfile.NamedTemporaryFile(suffix=".tif") self.logger.debug("create tmp txt") tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt") self.logger.debug("save tiff") self.image.save(tmp.name, 'TIFF') | 450,203 |
def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True ): self.logger.debug("create tmp tif") tmp = tempfile.NamedTemporaryFile(suffix=".tif") self.logger.debug("create tmp txt") tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt") self.logger.debug("save tiff") self.image.save(tmp.name, 'TIFF') | def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True ): self.logger.debug("create tmp tif") tmp = tempfile.NamedTemporaryFile(suffix=".tif") self.logger.debug("create tmp txt") tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt") self.logger.debug("save tiff") self.image.save(tmp.name, 'TIFF') | 450,204 |
def handle_events(self, msg): if msg["origin"].split("!", 1)[0] != self.owner: return if msg["target"].split("!", 1)[0] != self.nick: return if msg["action"] != "PRIVMSG": return # HANDLE CTCP ANTI FLOOD/BOT PROTECTION if msg["text"] == "\x01VERSION\x01": self.log.debug("Sending CTCP VERSION.") self.sock.send("NOTIC... | def handle_events(self, msg): if msg["origin"].split("!", 1)[0] != self.owner: return if msg["target"].split("!", 1)[0] != self.nick: return if msg["action"] != "PRIVMSG": return # HANDLE CTCP ANTI FLOOD/BOT PROTECTION if msg["text"] == "\x01VERSION\x01": self.log.debug("Sending CTCP VERSION.") self.sock.send("NOTIC... | 450,205 |
def response(self, msg): for t in self.getConf("owner").split(): self.sock.send("PRIVMSG %s :%s\r\n" % (t.strip(), msg)) | def response(self, msg, origin=""): if origin == "": for t in self.getConf("owner").split(): self.sock.send("PRIVMSG %s :%s\r\n" % (t.strip(), msg)) else: self.sock.send("PRIVMSG %s :%s\r\n" % (origin.split("!", 1)[0], msg)) | 450,206 |
def start(self): """ starts the machine""" | def start(self): """ starts the machine""" | 450,207 |
def freeSpace(self): folder = self.make_path(self.config['general']['download_folder']) if platform == 'nt': free_bytes = ctypes.c_ulonglong(0) __import__("ctypes").windll.kernel32.GetDiskFreeSpaceExW(ctypes.c_wchar_p(folder), None, None, ctypes.pointer(free_bytes)) return free_bytes.value / 1024 / 1024 #megabyte else:... | def freeSpace(self): folder = self.make_path(self.config['general']['download_folder']) if platform == 'nt': free_bytes = ctypes.c_ulonglong(0) ctypes.windll.kernel32.GetDiskFreeSpaceExW(ctypes.c_wchar_p(folder), None, None, ctypes.pointer(free_bytes)) return free_bytes.value / 1024 / 1024 #megabyte else: from os impor... | 450,208 |
def download_api_data(self): """ http://images.rapidshare.com/apidoc.txt """ api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" api_param_file = {"sub": "checkfiles_v1", "files": "", "filenames": "", "incmd5": "1"} m = re.compile(self.props['pattern']).search(self.url) if m: api_param_file["files"] = m.group(... | def download_api_data(self): """ http://images.rapidshare.com/apidoc.txt """ api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" api_param_file = {"sub": "checkfiles_v1", "files": "", "filenames": "", "incmd5": "1"} m = re.compile(self.props['pattern']).search(self.url) if m: api_param_file["files"] = m.group(... | 450,209 |
def slotConnect(self, data): """ connect to a core if connection is local, parse the core config file for data set up connector, show main window """ self.connWindow.hide() if not data["type"] == "remote": | def slotConnect(self, data): """ connect to a core if connection is local, parse the core config file for data set up connector, show main window """ self.connWindow.hide() if not data["type"] == "remote": | 450,210 |
def compare_time(self, start, end): start = map(int, start) end = map(int, end) if start == end: return True | def compare_time(self, start, end): start = map(int, start) end = map(int, end) if start == end: return True | 450,211 |
def run(self): """run method""" | def run(self): """run method""" | 450,212 |
def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | 450,213 |
def slotClipboardChange(self): """ called if clipboard changes """ if self.checkClipboard: text = self.clipboard.text() pattern = re.compile(r"(http|https|ftp)://[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?/.*)?") matches = pattern.finditer(text) for match in matches: self.slotAddLinks([str(match.group(0))]... | def slotClipboardChange(self): """ called if clipboard changes """ if self.checkClipboard: text = self.clipboard.text() pattern = re.compile(r"(http|https|ftp)://[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?/.*)?") matches = pattern.finditer(text) for match in matches: self.slotAddLinks([str(match.group(0))]... | 450,214 |
def __init__(self): self.doDebug = False self.arg_links = [] self.path = abspath(dirname(__file__)) chdir(self.path) self.homedir = self.getHomeDir() | def __init__(self): self.doDebug = False self.arg_links = [] self.path = abspath(dirname(__file__)) chdir(self.path) self.homedir = self.getHomeDir() | 450,215 |
def download_html(self): if self.config['premium']: post_vars = {"act": "login", "location": "service.php", "dieseid": "", "user": self.config['username'], "pass": self.config['password'], "login":"Log+me+in", "folder_autologin":"1"} self.load("http://www.share-online.biz/login.php", cookies=True, post=post_vars) url =... | def download_html(self): if self.config['premium']: post_vars = {"act": "login", "location": "service.php", "dieseid": "", "user": self.config['username'], "pass": self.config['password'], "login":"Log+me+in", "folder_autologin":"1"} self.load("http://www.share-online.biz/login.php", cookies=True, post=post_vars) url =... | 450,216 |
def download_html(self): if self.config['premium']: post_vars = {"act": "login", "location": "service.php", "dieseid": "", "user": self.config['username'], "pass": self.config['password'], "login":"Log+me+in", "folder_autologin":"1"} self.load("http://www.share-online.biz/login.php", cookies=True, post=post_vars) url =... | def download_html(self): if self.config['premium']: post_vars = {"act": "login", "location": "service.php", "dieseid": "", "user": self.config['username'], "pass": self.config['password'], "login":"Log+me+in", "folder_autologin":"1"} self.load("http://www.share-online.biz/login.php", cookies=True, post=post_vars) url =... | 450,217 |
def download(self, url, get={}, post={}, ref=True, cookies=True): """ downloads the url content to disk """ | def download(self, url, get={}, post={}, ref=True, cookies=True): """ downloads the url content to disk """ | 450,218 |
def parseConfig(self, config): """parses a given configfile""" f = open(config) config = f.read() | def parseConfig(self, config): """parses a given configfile""" f = open(config) config = f.read() | 450,219 |
def parseConfig(self, config): """parses a given configfile""" f = open(config) config = f.read() | def parseConfig(self, config): """parses a given configfile""" f = open(config) config = f.read() | 450,220 |
def parseConfig(self, config): """parses a given configfile""" f = open(config) config = f.read() | def parseConfig(self, config): """parses a given configfile""" f = open(config) config = f.read() | 450,221 |
def start(self): """ starts the machine""" | def start(self): """ starts the machine""" | 450,222 |
def download_html(self): self.log.debug("Netload: Entering download_html") page = self.load(self.url) t = time() + 30 | def download_html(self): self.log.debug("Netload: Entering download_html") page = self.load(self.url) t = time() + 30 | 450,223 |
def loadAccounts(self): """loads all accounts available""" if not exists("accounts.conf"): f = open("accounts.conf", "wb") f.write("version: " + str(ACC_VERSION)) f.close() f = open("accounts.conf", "rb") content = f.readlines() version = content.pop(0) version = version.split(":")[1].strip() | def loadAccounts(self): """loads all accounts available""" if not exists("accounts.conf"): f = open("accounts.conf", "wb") f.write("version: " + str(ACC_VERSION)) f.close() f = open("accounts.conf", "rb") content = f.readlines() version = content.pop(0) version = version.split(":")[1].strip() | 450,224 |
def config(request): conf = settings.PYLOAD.get_config() plugin = settings.PYLOAD.get_plugin_config() accs = settings.PYLOAD.get_accounts() messages = [] for section in chain(conf.itervalues(), plugin.itervalues()): for key, option in section.iteritems(): if key == "desc": continue if ";" in option["type"]: option["l... | def config(request): conf = settings.PYLOAD.get_config() plugin = settings.PYLOAD.get_plugin_config() accs = settings.PYLOAD.get_accounts() messages = [] for section in chain(conf.itervalues(), plugin.itervalues()): for key, option in section.iteritems(): if key == "desc": continue if ";" in option["type"]: option["l... | 450,225 |
def handleFree(self): tmp_url = self.pyfile.url match = re.search(r"depositfiles.com/(?:(?P<lang>[\w]{1,3})/)?files/(?P<id>[\w]+)", tmp_url) if match: if match.group("id"): tmp_url = "http://depositfiles.com/en/files/" + match.group("id") | def handleFree(self): tmp_url = self.pyfile.url match = re.search(r"depositfiles.com/(?:(?P<lang>[\w]{1,3})/)?files/(?P<id>[\w]+)", tmp_url) if match: if match.group("id"): tmp_url = "http://depositfiles.com/en/files/" + match.group("id") | 450,226 |
def handleFree(self): tmp_url = self.pyfile.url match = re.search(r"depositfiles.com/(?:(?P<lang>[\w]{1,3})/)?files/(?P<id>[\w]+)", tmp_url) if match: if match.group("id"): tmp_url = "http://depositfiles.com/en/files/" + match.group("id") | def handleFree(self): tmp_url = self.pyfile.url match = re.search(r"depositfiles.com/(?:(?P<lang>[\w]{1,3})/)?files/(?P<id>[\w]+)", tmp_url) if match: if match.group("id"): tmp_url = "http://depositfiles.com/en/files/" + match.group("id") | 450,227 |
def downloadHTML(self): self.html = self.load(self.pyfile.url, cookies=True) if not self.account: html = self.load("%s/free/" % self.pyfile.url, post={"dl_free":"1"}, cookies=True) if re.search(r"/failure/full/1", self.req.lastEffectiveURL): self.setWait(120) self.log.info("%s: no free slots, waiting 120 seconds" % (se... | def downloadHTML(self): self.html = self.load(self.pyfile.url, cookies=True) if not self.account: html = self.load("%s/free/" % self.pyfile.url, post={"dl_free":"1"}, cookies=True) if re.search(r"/failure/full/1", self.req.lastEffectiveURL): self.setWait(120) self.log.info("%s: no free slots, waiting 120 seconds" % (se... | 450,228 |
def callback(self, *args, **kwargs): if self.result: raise AlreadyCalled self.result = (args, kwargs) for f, cargs, ckwargs in self.call: args.extend(cargs) kwargs.update(ckwargs) callInThread(f, *args, **kwargs) | def callback(self, *args, **kwargs): if self.result: raise AlreadyCalled self.result = (args, kwargs) for f, cargs, ckwargs in self.call: args+=tuple(cargs) kwargs.update(ckwargs) callInThread(f, *args, **kwargs) | 450,229 |
def handleFree(self): | def handleFree(self): | 450,230 |
def postCheck(self, dl): | def postCheck(self, dl): | 450,231 |
def postCheck(self, dl): | def postCheck(self, dl): | 450,232 |
def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | 450,233 |
def run(self): """run method""" | def run(self): """run method""" | 450,234 |
def run(self): """run method""" | def run(self): """run method""" | 450,235 |
def freeWait(self): """downloads html with the important informations """ self.html[1] = self.load(self.pyfile.url) self.no_download = True | def freeWait(self): """downloads html with the important informations """ self.html[1] = self.load(self.pyfile.url) self.no_download = True | 450,236 |
def freeWait(self): """downloads html with the important informations """ self.html[1] = self.load(self.pyfile.url) self.no_download = True | def freeWait(self): """downloads html with the important informations """ self.html[1] = self.load(self.pyfile.url) self.no_download = True | 450,237 |
def compare_time(self, start, end): start = map(int, start) end = map(int, end) if start == end: return True | def compare_time(self, start, end): start = map(int, start) end = map(int, end) if start == end: return True | 450,238 |
def download_html(self): self.log.debug("Netload: Entering download_html") page = self.load(self.url) | def download_html(self): self.log.debug("Netload: Entering download_html") page = self.load(self.url) | 450,239 |
def download_html(self): self.log.debug("Netload: Entering download_html") page = self.load(self.url) | def download_html(self): self.log.debug("Netload: Entering download_html") page = self.load(self.url) | 450,240 |
def getInputValues(self, section, option): if not self.data[section]["options"][option]["input"]: return [] return self.data[section]["options"][option]["input"].split(";") | def getInputValues(self, section, option): try: if not self.data[section]["options"][option]["input"]: return [] return self.data[section]["options"][option]["input"].split(";") except: return [] return self.data[section]["options"][option]["input"].split(";") | 450,241 |
def getInputValues(self, section, option): if not self.data[section]["options"][option]["input"]: return [] return self.data[section]["options"][option]["input"].split(";") | def getInputValues(self, section, option): if not self.data[section]["options"][option]["input"]: return [] | 450,242 |
def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | 450,243 |
def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | 450,244 |
def config(request): conf = settings.PYLOAD.get_config() plugin = settings.PYLOAD.get_plugin_config() accs = settings.PYLOAD.get_accounts() messages = [] for section in chain(conf.itervalues(), plugin.itervalues()): for key, option in section.iteritems(): if key == "desc": continue if ";" in option["type"]: option["l... | def config(request): conf = settings.PYLOAD.get_config() plugin = settings.PYLOAD.get_plugin_config() accs = settings.PYLOAD.get_accounts() messages = [] for section in chain(conf.itervalues(), plugin.itervalues()): for key, option in section.iteritems(): if key == "desc": continue if ";" in option["type"]: option["l... | 450,245 |
def get_file_url(self): self.log.debug("OneFichierCom: Getting file URL") file_url_pattern = r"<br/>\ <br/>\ <br/>\ [\t\n\r ]+<a href=\"(http://.*?)\"" m = re.search(file_url_pattern, self.html) if m is not None: url = m.group(1) self.log.debug("OneFichierCom: File URL [%s]" % url) return url | def get_file_url(self): self.log.debug("OneFichierCom: Getting file URL") file_url_pattern = r"<br/>\ <br/>\ <br/>\ [\t\n\r ]+<a href=\"(?P<url>http://.*?)\"" m = re.search(file_url_pattern, self.html) if m is not None: url = m.group(1) self.log.debug("OneFichierCom: File URL [%s]" % url) return url | 450,246 |
def get_file_url(self): self.log.debug("OneFichierCom: Getting file URL") file_url_pattern = r"<br/>\ <br/>\ <br/>\ [\t\n\r ]+<a href=\"(http://.*?)\"" m = re.search(file_url_pattern, self.html) if m is not None: url = m.group(1) self.log.debug("OneFichierCom: File URL [%s]" % url) return url | def get_file_url(self): self.log.debug("OneFichierCom: Getting file URL") file_url_pattern = r"<br/>\ <br/>\ <br/>\ [\t\n\r ]+<a href=\"(http://.*?)\"" m = re.search(file_url_pattern, self.html) if m is not None: url = m.group('url') self.log.debug("OneFichierCom: File URL [%s]" % url) return url | 450,247 |
def get_file_name(self): self.log.debug("OneFichierCom: Getting file name") file_name_patterns = ( r"content=\"Téléchargement du fichier (.*?)\">", r"(>Cliquez ici pour télécharger|>Click here to download) (.*?)</a>", r"\">(Nom du fichier :|File name :)</th>[\t\r\n ]+<td>(.*?)</td>", r"<title>Download of (.*?)</title>"... | def get_file_name(self): self.log.debug("OneFichierCom: Getting file name") file_name_patterns = ( r"\">(Nom du fichier :|File name :)</th>[\t\r\n ]+<td>(?P<name>.*?)</td>", r"(>Cliquez ici pour télécharger|>Click here to download) (?P<name>.*?)</a>", r"content=\"(Téléchargement du fichier |Download the file named )(?P... | 450,248 |
def get_file_name(self): self.log.debug("OneFichierCom: Getting file name") file_name_patterns = ( r"content=\"Téléchargement du fichier (.*?)\">", r"(>Cliquez ici pour télécharger|>Click here to download) (.*?)</a>", r"\">(Nom du fichier :|File name :)</th>[\t\r\n ]+<td>(.*?)</td>", r"<title>Download of (.*?)</title>"... | def get_file_name(self): self.log.debug("OneFichierCom: Getting file name") file_name_patterns = ( r"content=\"Téléchargement du fichier (.*?)\">", r"(>Cliquez ici pour télécharger|>Click here to download) (.*?)</a>", r"\">(Nom du fichier :|File name :)</th>[\t\r\n ]+<td>(.*?)</td>", r"<title>Download of (.*?)</title>"... | 450,249 |
def handleFree(self): if r'<div id="captchaArea" style="display:none;">' in self.html or \ r'/showCaptcha\(\);' in self.html: # we got a captcha id = re.search(r"var reCAPTCHA_publickey='(.*?)';", self.html).group(1) recaptcha = ReCaptcha(self) challenge, code = recaptcha.challenge(id) shortencode = re.search(r'name=... | def handleFree(self): if r'<div id="captchaArea" style="display:none;">' in self.html or \ r'/showCaptcha\(\);' in self.html: # we got a captcha id = re.search(r"var reCAPTCHA_publickey='(.*?)';", self.html).group(1) recaptcha = ReCaptcha(self) challenge, code = recaptcha.challenge(id) shortencode = re.search(r'name=... | 450,250 |
def handleFree(self): if r'<div id="captchaArea" style="display:none;">' in self.html or \ r'/showCaptcha\(\);' in self.html: # we got a captcha id = re.search(r"var reCAPTCHA_publickey='(.*?)';", self.html).group(1) recaptcha = ReCaptcha(self) challenge, code = recaptcha.challenge(id) shortencode = re.search(r'name=... | def handleFree(self): if r'<div id="captchaArea" style="display:none;">' in self.html or \ r'/showCaptcha\(\);' in self.html: # we got a captcha id = re.search(r"var reCAPTCHA_publickey='(.*?)';", self.html).group(1) recaptcha = ReCaptcha(self) challenge, code = recaptcha.challenge(id) shortencode = re.search(r'name=... | 450,251 |
def event_status(self, args): downloads = self.core.status_downloads() if len(downloads) < 1: return ["INFO: There are no active downloads currently."] lines = [] lines.append("ID - Name - Status - Speed - ETA - Progress") for data in downloads: lines.append("#%d - %s - %s - %s - %s - %s" % ( data['id'], data['name'],... | def event_status(self, args): downloads = self.sm.status_downloads() if len(downloads) < 1: return ["INFO: There are no active downloads currently."] lines = [] lines.append("ID - Name - Status - Speed - ETA - Progress") for data in downloads: lines.append("#%d - %s - %s - %s - %s - %s" % ( data['id'], data['name'], d... | 450,252 |
def event_collector(self, args): ps = self.core.get_collector() if len(ps) == 0: return ["INFO: No packages in collector!"] lines = [] for packdata in ps: lines.append('PACKAGE: Package "%s" with id #%d' % (packdata['package_name'], packdata['id'])) for fileid in self.core.get_package_files(packdata['id']): fileinfo =... | def event_collector(self, args): ps = self.sm.get_collector() if len(ps) == 0: return ["INFO: No packages in collector!"] lines = [] for packdata in ps: lines.append('PACKAGE: Package "%s" with id #%d' % (packdata['package_name'], packdata['id'])) for fileid in self.core.get_package_files(packdata['id']): fileinfo = s... | 450,253 |
def event_collector(self, args): ps = self.core.get_collector() if len(ps) == 0: return ["INFO: No packages in collector!"] lines = [] for packdata in ps: lines.append('PACKAGE: Package "%s" with id #%d' % (packdata['package_name'], packdata['id'])) for fileid in self.core.get_package_files(packdata['id']): fileinfo =... | def event_collector(self, args): ps = self.core.get_collector() if len(ps) == 0: return ["INFO: No packages in collector!"] lines = [] for packdata in ps: lines.append('PACKAGE: Package "%s" with id #%d' % (packdata['package_name'], packdata['id'])) for fileid in self.sm.get_package_files(packdata['id']): fileinfo = s... | 450,254 |
def event_links(self, args): fids = self.core.get_files() if len(fids) == 0: return ["INFO: No links."] lines = [] for fid in fids: info = self.core.get_file_info(fid) lines.append('LINK #%d: %s [%s]' % (fid, info["filename"], info["status_type"])) return lines | def event_links(self, args): fids = self.sm.get_files() if len(fids) == 0: return ["INFO: No links."] lines = [] for fid in fids: info = self.core.get_file_info(fid) lines.append('LINK #%d: %s [%s]' % (fid, info["filename"], info["status_type"])) return lines | 450,255 |
def event_links(self, args): fids = self.core.get_files() if len(fids) == 0: return ["INFO: No links."] lines = [] for fid in fids: info = self.core.get_file_info(fid) lines.append('LINK #%d: %s [%s]' % (fid, info["filename"], info["status_type"])) return lines | def event_links(self, args): fids = self.core.get_files() if len(fids) == 0: return ["INFO: No links."] lines = [] for fid in fids: info = self.sm.get_file_info(fid) lines.append('LINK #%d: %s [%s]' % (fid, info["filename"], info["status_type"])) return lines | 450,256 |
def event_packages(self, args): pids = self.core.get_packages() if len(pids) == 0: return ["INFO: No packages."] lines = [] for pid in pids: data = self.core.get_package_data(pid) lines.append('PACKAGE #%d: %s (%d links)' % (pid, data["package_name"], len(self.core.get_package_files(pid)))) return lines | def event_packages(self, args): pids = self.sm.get_packages() if len(pids) == 0: return ["INFO: No packages."] lines = [] for pid in pids: data = self.core.get_package_data(pid) lines.append('PACKAGE #%d: %s (%d links)' % (pid, data["package_name"], len(self.core.get_package_files(pid)))) return lines | 450,257 |
def event_packages(self, args): pids = self.core.get_packages() if len(pids) == 0: return ["INFO: No packages."] lines = [] for pid in pids: data = self.core.get_package_data(pid) lines.append('PACKAGE #%d: %s (%d links)' % (pid, data["package_name"], len(self.core.get_package_files(pid)))) return lines | def event_packages(self, args): pids = self.core.get_packages() if len(pids) == 0: return ["INFO: No packages."] lines = [] for pid in pids: data = self.sm.get_package_data(pid) lines.append('PACKAGE #%d: %s (%d links)' % (pid, data["package_name"], len(self.core.get_package_files(pid)))) return lines | 450,258 |
def event_info(self, args): if not args: return ['ERROR: Use info like this: info <id>'] info = self.core.get_file_info(int(args[0])) return ['LINK #%d: %s (%d) [%s bytes]' % (info['id'], info['filename'], info['size'], info['status_type'])] | def event_info(self, args): if not args: return ['ERROR: Use info like this: info <id>'] info = self.sm.get_file_info(int(args[0])) return ['LINK #%d: %s (%d) [%s bytes]' % (info['id'], info['filename'], info['size'], info['status_type'])] | 450,259 |
def event_packinfo(self, args): if not args: return ['ERROR: Use packinfo like this: packinfo <id>'] lines = [] packdata = self.core.get_package_data(int(args[0])) lines.append('PACKAGE: Package "%s" with id #%d' % (packdata['package_name'], packdata['id'])) for fileid in self.core.get_package_files(packdata['id']): f... | def event_packinfo(self, args): if not args: return ['ERROR: Use packinfo like this: packinfo <id>'] lines = [] packdata = self.sm.get_package_data(int(args[0])) lines.append('PACKAGE: Package "%s" with id #%d' % (packdata['package_name'], packdata['id'])) for fileid in self.core.get_package_files(packdata['id']): fil... | 450,260 |
def event_packinfo(self, args): if not args: return ['ERROR: Use packinfo like this: packinfo <id>'] lines = [] packdata = self.core.get_package_data(int(args[0])) lines.append('PACKAGE: Package "%s" with id #%d' % (packdata['package_name'], packdata['id'])) for fileid in self.core.get_package_files(packdata['id']): f... | def event_packinfo(self, args): if not args: return ['ERROR: Use packinfo like this: packinfo <id>'] lines = [] packdata = self.core.get_package_data(int(args[0])) lines.append('PACKAGE: Package "%s" with id #%d' % (packdata['package_name'], packdata['id'])) for fileid in self.sm.get_package_files(packdata['id']): fil... | 450,261 |
def event_start(self, args): if not args: count = 0 for packdata in self.core.get_collector_packages(): self.core.push_package_2_queue(packdata['id']) count += 1 | def event_start(self, args): if not args: count = 0 for packdata in self.sm.get_collector_packages(): self.sm.push_package_2_queue(packdata['id']) count += 1 | 450,262 |
def event_start(self, args): if not args: count = 0 for packdata in self.core.get_collector_packages(): self.core.push_package_2_queue(packdata['id']) count += 1 | def event_start(self, args): if not args: count = 0 for packdata in self.core.get_collector_packages(): self.core.push_package_2_queue(packdata['id']) count += 1 | 450,263 |
def event_stop(self, args): if not args: self.core.stop_downloads() return ["INFO: All downloads stopped."] lines = [] for val in args: id = int(val.strip()) self.core.stop_download("", id) lines.append("INFO: Download #%d stopped." % id) return lines | def event_stop(self, args): if not args: self.sm.stop_downloads() return ["INFO: All downloads stopped."] lines = [] for val in args: id = int(val.strip()) self.core.stop_download("", id) lines.append("INFO: Download #%d stopped." % id) return lines | 450,264 |
def event_stop(self, args): if not args: self.core.stop_downloads() return ["INFO: All downloads stopped."] lines = [] for val in args: id = int(val.strip()) self.core.stop_download("", id) lines.append("INFO: Download #%d stopped." % id) return lines | def event_stop(self, args): if not args: self.core.stop_downloads() return ["INFO: All downloads stopped."] lines = [] for val in args: id = int(val.strip()) self.sm.stop_download("", id) lines.append("INFO: Download #%d stopped." % id) return lines | 450,265 |
def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.core.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.core.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.sm.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.sm.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | 450,266 |
def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.core.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.core.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.sm.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.sm.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | 450,267 |
def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.core.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.core.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.core.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.core.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | 450,268 |
def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.core.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.core.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.core.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.core.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | 450,269 |
def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.core.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.core.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | def get_pack_id(pack): if pack.isdigit(): pack = int(pack) for packdata in self.core.get_collector_packages(): if packdata['id'] == pack: return pack return -1 for packdata in self.core.get_collector_packages(): if packdata['package_name'] == pack: return packdata['id'] return -1 | 450,270 |
def event_del(self, args): if len(args) < 2: return ["ERROR: Use del command like this: del -p|-l <id> [...] (-p indicates that the ids are from packages, -l indicates that the ids are from links)"] if args[0] == "-p": ret = self.core.del_packages(map(int, args[1:])) return ["INFO: Deleted %d packages!" % ret] elif a... | def event_del(self, args): if len(args) < 2: return ["ERROR: Use del command like this: del -p|-l <id> [...] (-p indicates that the ids are from packages, -l indicates that the ids are from links)"] if args[0] == "-p": ret = self.sm.del_packages(map(int, args[1:])) return ["INFO: Deleted %d packages!" % ret] elif arg... | 450,271 |
def event_del(self, args): if len(args) < 2: return ["ERROR: Use del command like this: del -p|-l <id> [...] (-p indicates that the ids are from packages, -l indicates that the ids are from links)"] if args[0] == "-p": ret = self.core.del_packages(map(int, args[1:])) return ["INFO: Deleted %d packages!" % ret] elif a... | def event_del(self, args): if len(args) < 2: return ["ERROR: Use del command like this: del -p|-l <id> [...] (-p indicates that the ids are from packages, -l indicates that the ids are from links)"] if args[0] == "-p": ret = self.core.del_packages(map(int, args[1:])) return ["INFO: Deleted %d packages!" % ret] elif a... | 450,272 |
def http_error_302(self, req, fp, code, msg, headers): resp = addinfourl(fp, headers, req.get_full_url()) resp.code = code resp.msg = msg self.cookiejar.extract_cookies(resp, req) if not self.follow: return resp # Some servers (incorrectly) return multiple Location headers # (so probably same goes for URI). Use firs... | def http_error_302(self, req, fp, code, msg, headers): resp = addinfourl(fp, headers, req.get_full_url()) resp.code = code resp.msg = msg self.cookiejar.extract_cookies(resp, req) if not self.follow: return resp # Some servers (incorrectly) return multiple Location headers # (so probably same goes for URI). Use firs... | 450,273 |
def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | def jobFinished(self, pyfile): """manage completing download""" self.lock.acquire() | 450,274 |
def getInfo(urls): api_url = "http://www.share.cx/uapi?do=check&links=" for chunk in chunks(urls, 90): get = "" for url in chunk: get += ";"+url api = getURL(api_url+get[1:]) result = [] for i, link in enumerate(api.split()): url,name,size = link.split(";") if name and size: status = 2 else: status = 1 if not name:... | def getInfo(urls): api_url = "http://www.share.cx/uapi?do=check&links=" for chunk in chunks(urls, 90): get = "" for url in chunk: get += ";"+url api = getURL(api_url+get[1:]) result = [] for i, link in enumerate(api.split()): url,name,size = link.split(";") if name and size: status = 2 else: status = 1 if not name:... | 450,275 |
def doDownload(self): """ returns the absolute downloadable filepath """ if self.html is None: self.download_html() | def doDownload(self): """ returns the absolute downloadable filepath """ if self.html is None: self.download_html() | 450,276 |
def doDownload(self): """ returns the absolute downloadable filepath """ if self.html is None: self.download_html() | def doDownload(self): """ returns the absolute downloadable filepath """ if self.html is None: self.download_html() | 450,277 |
def get_file_name(self): if self.html is None: self.download_html() name = re.search(r'<title>Download: (.*?)</title>', self.html).group(1) return name | def get_file_name(self): if self.html is None: self.download_html() name = re.search(r'<title>Download: (.*?) at Share.cx</title>', self.html).group(1) return name | 450,278 |
def white(string): return "\033[1;37m" + string + "\033[0m" | def white(string): return "\033[1;37m" + string + "\033[0m" | 450,279 |
def __init__(self, parent): Plugin.__init__(self, parent) props = {} props['name'] = "HotfileCom" props['type'] = "hoster" props['pattern'] = r"http://hotfile.com/dl/" props['version'] = "0.1" props['description'] = """Hotfile.com Download Plugin""" props['author_name'] = ("sitacuisses","spoob","mkaay") props['author_m... | def __init__(self, parent): Plugin.__init__(self, parent) props = {} props['name'] = "HotfileCom" props['type'] = "hoster" props['pattern'] = r"http://hotfile.com/dl/" props['version'] = "0.1" props['description'] = """Hotfile.com Download Plugin""" props['author_name'] = ("sitacuisses","spoob","mkaay") props['author_m... | 450,280 |
def __init__(self, parent): Plugin.__init__(self, parent) props = {} props['name'] = "HotfileCom" props['type'] = "hoster" props['pattern'] = r"http://hotfile.com/dl/" props['version'] = "0.1" props['description'] = """Hotfile.com Download Plugin""" props['author_name'] = ("sitacuisses","spoob","mkaay") props['author_m... | def __init__(self, parent): Plugin.__init__(self, parent) props = {} props['name'] = "HotfileCom" props['type'] = "hoster" props['pattern'] = r"http://hotfile.com/dl/" props['version'] = "0.1" props['description'] = """Hotfile.com Download Plugin""" props['author_name'] = ("sitacuisses","spoob","mkaay") props['author_m... | 450,281 |
def prepare(self, thread): pyfile = self.parent | def self.download_html() prepare(self, self.download_html() thread): self.download_html() pyfile self.download_html() = self.download_html() self.parent | 450,282 |
def prepare(self, thread): pyfile = self.parent | defprepare(self,thread):pyfile=self.parent | 450,283 |
def download_html(self): self.url = self.parent.url self.html = self.req.load(self.url) | def download_html(self): self.url = self.parent.url self.html = self.req.load(self.url) | 450,284 |
def get_file_url(self): """ returns the absolute downloadable filepath """ if self.html == None: self.download_html() if not self.want_reconnect: self.get_download_page() file_url = re.search("a href=\"(http://hotfile\.com/get/\S*?)\"", self.htmlwithlink).group(1) return file_url else: return False | def get_file_url(self): """ returns the absolute downloadable filepath """ if self.html == None: self.download_html() if not self.want_reconnect: self.get_download_page() file_url = re.search("a href=\"(http://hotfile\.com/get/\S*?)\"", self.htmlwithlink).group(1) return file_url else: return False | 450,285 |
def get_file_name(self): if self.html == None: self.download_html() if not self.want_reconnect: file_name = re.search('Downloading\s<b>(.*?)</b>', self.html).group(1) return file_name else: return self.parent.url | def get_file_name(self): if self.html == None: self.download_html() if not self.want_reconnect: file_name = re.search('Downloading\s<b>(.*?)</b>', self.html).group(1) return file_name else: return self.parent.url | 450,286 |
def file_exists(self): """ returns True or False """ if self.html == None: self.download_html() if re.search(r"Such file does not exist or it has been removed for infringement of copyrights.", self.html) != None: return False else: return True | def file_exists(self): if re.search(r"Such file does not exist or it has been removed for infringement of copyrights.", self.html[0]) != None: return False else: return True | 450,287 |
def file_exists(self): """ returns True or False """ if self.html == None: self.download_html() if re.search(r"Such file does not exist or it has been removed for infringement of copyrights.", self.html) != None: return False else: return True | def file_exists(self): """ returns True or False """ if self.html == None: self.download_html() if re.search(r"Such file does not exist or it has been removed for infringement of copyrights.", self.html) != None: return False return True | 450,288 |
def get_wait_time(self): free_limit_pattern = re.compile(r"timerend=d\.getTime\(\)\+(\d+);") matches = free_limit_pattern.findall(self.html) if matches: for match in matches: if int(match) == 60000: continue if int(match) == 0: continue else: self.time_plus_wait = time() + int(match)/1000 + 65 self.want_reconnect = Tru... | def get_wait_time(self): free_limit_pattern = re.compile(r"timerend=d\.getTime\(\)\+(\d+);") matches = free_limit_pattern.findall(self.html[0]) if matches: for match in matches: if int(match) == 60000: continue if int(match) == 0: continue else: self.time_plus_wait = time() + int(match)/1000 + 65 self.want_reconnect = ... | 450,289 |
def get_wait_time(self): free_limit_pattern = re.compile(r"timerend=d\.getTime\(\)\+(\d+);") matches = free_limit_pattern.findall(self.html) if matches: for match in matches: if int(match) == 60000: continue if int(match) == 0: continue else: self.time_plus_wait = time() + int(match)/1000 + 65 self.want_reconnect = Tru... | def get_wait_time(self): free_limit_pattern = re.compile(r"timerend=d\.getTime\(\)\+(\d+);") matches = free_limit_pattern.findall(self.html) if matches: for match in matches: if int(match) == 60000: continue if int(match) == 0: continue else: self.time_plus_wait = time() + int(match)/1000 + 65 self.want_reconnect = Tru... | 450,290 |
def getRequest(pluginName, account=None): iface = self.bestInterface(pluginName, account) if iface: iface.useFor(pluginName, account) requestFactory.iface = lambda self: iface.adress self.log.debug("Multihome: using address: "+iface.adress) return oldGetRequest(pluginName, account) | def getRequest(pluginName, account=None): iface = self.bestInterface(pluginName, account) if iface: iface.useFor(pluginName, account) requestFactory.iface = lambda: iface.adress self.log.debug("Multihome: using address: "+iface.adress) return oldGetRequest(pluginName, account) | 450,291 |
def announce(self, message): """ send message to all owners""" for user in self.getConfig("owners").split(";"): | def def beforeReconnecting(self, ip): self.disconnect() def afterReconnecting(self, ip): self.connect() announce(self, def beforeReconnecting(self, ip): self.disconnect() def afterReconnecting(self, ip): self.connect() message): def beforeReconnecting(self, ip): self.disconnect() def afterReconnecting(self, ip): sel... | 450,292 |
def getDecryptJob(self): """return job for decrypting""" if self.jobCache.has_key("decrypt"): return None | def getDecryptJob(self): """return job for decrypting""" if self.jobCache.has_key("decrypt"): return None | 450,293 |
def __init__(self): self.doDebug = False self.arg_links = [] self.path = abspath(dirname(__file__)) chdir(self.path) | def __init__(self): self.doDebug = False self.arg_links = [] self.path = abspath(dirname(__file__)) chdir(self.path) | 450,294 |
def print_help(self): print "" print "pyLoad %s Copyright (c) 2008-2010 the pyLoad Team" % CURRENT_VERSION print "" print "Usage: [python] pyLoadCore.py [options]" print "" print "<Options>" print " -v, --version", " " * 4, "Print version to terminal" print " -c, --clear", " " * 6, "Delete the saved linklist" print ... | def print_help(self): print "" print "pyLoad %s Copyright (c) 2008-2010 the pyLoad Team" % CURRENT_VERSION print "" print "Usage: [python] pyLoadCore.py [options]" print "" print "<Options>" print " -v, --version", " " * 9, "Print version to terminal" print " -c, --clear", " " * 11, "Delete the saved linklist" print... | 450,295 |
def start(self): """ starts the machine""" | defstart(self):"""startsthemachine""" | 450,296 |
def start(self): """ starts the machine""" | def start(self): """ starts the machine""" | 450,297 |
def reloadData(self, force=True): data = self.connector.proxy.get_accounts(False, force) self.beginRemoveRows(QModelIndex(), 0, len(self._data)) self._data = [] self.endRemoveRows() accounts = [] for li in data.values(): accounts += li self.beginInsertRows(QModelIndex(), 0, len(accounts)) self._data = accounts self.end... | def reloadData(self, force=True): data = self.connector.proxy.get_accounts(False, force) if len(self._data) > 0: self.beginRemoveRows(QModelIndex(), 0, len(self._data)-1) self._data = [] self.endRemoveRows() accounts = [] for li in data.values(): accounts += li self.beginInsertRows(QModelIndex(), 0, len(accounts)) se... | 450,298 |
def reloadData(self, force=True): data = self.connector.proxy.get_accounts(False, force) self.beginRemoveRows(QModelIndex(), 0, len(self._data)) self._data = [] self.endRemoveRows() accounts = [] for li in data.values(): accounts += li self.beginInsertRows(QModelIndex(), 0, len(accounts)) self._data = accounts self.end... | def reloadData(self, force=True): data = self.connector.proxy.get_accounts(False, force) self.beginRemoveRows(QModelIndex(), 0, len(self._data)) self._data = [] self.endRemoveRows() accounts = [] for li in data.values(): accounts += li if len(accounts) > 0: self.beginInsertRows(QModelIndex(), 0, len(accounts)-1) self.... | 450,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.