summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/crypter
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/crypter')
-rw-r--r--pyload/plugins/crypter/ChipDe.py2
-rw-r--r--pyload/plugins/crypter/DataHuFolder.py4
-rw-r--r--pyload/plugins/crypter/DuckCryptInfo.py2
-rw-r--r--pyload/plugins/crypter/EasybytezComFolder.py5
-rw-r--r--pyload/plugins/crypter/FilefactoryComFolder.py2
-rw-r--r--pyload/plugins/crypter/GooGl.py2
-rw-r--r--pyload/plugins/crypter/LinkSaveIn.py6
-rw-r--r--pyload/plugins/crypter/LinkdecrypterCom.py2
-rw-r--r--pyload/plugins/crypter/LixIn.py4
-rw-r--r--pyload/plugins/crypter/MediafireComFolder.py2
-rw-r--r--pyload/plugins/crypter/MultiuploadCom.py59
-rw-r--r--pyload/plugins/crypter/NCryptIn.py2
-rw-r--r--pyload/plugins/crypter/RelinkUs.py4
-rw-r--r--pyload/plugins/crypter/SerienjunkiesOrg.py324
-rw-r--r--pyload/plugins/crypter/ShareLinksBiz.py2
-rw-r--r--pyload/plugins/crypter/UploadedToFolder.py2
16 files changed, 27 insertions, 397 deletions
diff --git a/pyload/plugins/crypter/ChipDe.py b/pyload/plugins/crypter/ChipDe.py
index 29a248693..0ee6adfd3 100644
--- a/pyload/plugins/crypter/ChipDe.py
+++ b/pyload/plugins/crypter/ChipDe.py
@@ -24,4 +24,4 @@ class ChipDe(Crypter):
self.fail('Failed to find the URL')
else:
self.urls = [f.group(1)]
- self.logDebug('The file URL is %s' % self.urls[0])
+ self.logDebug("The file URL is %s" % self.urls[0])
diff --git a/pyload/plugins/crypter/DataHuFolder.py b/pyload/plugins/crypter/DataHuFolder.py
index 49dab9159..aafcf0def 100644
--- a/pyload/plugins/crypter/DataHuFolder.py
+++ b/pyload/plugins/crypter/DataHuFolder.py
@@ -27,7 +27,7 @@ class DataHuFolder(SimpleCrypter):
password = self.getPassword()
if password is '':
self.fail("No password specified, please set right password on Add package form and retry")
- self.logDebug('The folder is password protected', 'Using password: ' + password)
+ self.logDebug("The folder is password protected', 'Using password: " + password)
self.html = self.load(pyfile.url, post={'mappa_pass': password}, decode=True)
if u'Hib\xe1s jelsz\xf3' in self.html: # Wrong password
self.fail("Incorrect password, please set right password on Add package form and retry")
@@ -35,7 +35,7 @@ class DataHuFolder(SimpleCrypter):
package_name, folder_name = self.getPackageNameAndFolder()
package_links = re.findall(self.LINK_PATTERN, self.html)
- self.logDebug('Package has %d links' % len(package_links))
+ self.logDebug("Package has %d links" % len(package_links))
if package_links:
self.packages = [(package_name, package_links, folder_name)]
diff --git a/pyload/plugins/crypter/DuckCryptInfo.py b/pyload/plugins/crypter/DuckCryptInfo.py
index 63340f2ed..6c720297d 100644
--- a/pyload/plugins/crypter/DuckCryptInfo.py
+++ b/pyload/plugins/crypter/DuckCryptInfo.py
@@ -56,4 +56,4 @@ class DuckCryptInfo(Crypter):
soup = BeautifulSoup(src)
self.urls = [soup.find("iframe")['src']]
if not self.urls:
- self.logDebug('no links m - (Plugin out of date?)')
+ self.logDebug("No link found - (Plugin out of date?)")
diff --git a/pyload/plugins/crypter/EasybytezComFolder.py b/pyload/plugins/crypter/EasybytezComFolder.py
index 163f2bdf3..c9575db96 100644
--- a/pyload/plugins/crypter/EasybytezComFolder.py
+++ b/pyload/plugins/crypter/EasybytezComFolder.py
@@ -6,7 +6,7 @@ from pyload.plugins.internal.SimpleCrypter import SimpleCrypter
class EasybytezComFolder(SimpleCrypter):
__name__ = "EasybytezComFolder"
__type__ = "crypter"
- __version__ = "0.06"
+ __version__ = "0.07"
__pattern__ = r'http://(?:www\.)?easybytez\.com/users/(?P<ID>\d+/\d+)'
@@ -14,7 +14,10 @@ class EasybytezComFolder(SimpleCrypter):
__author_name__ = "stickell"
__author_mail__ = "l.stickell@yahoo.it"
+
URL_REPLACEMENTS = [(__pattern__, r"http://www.easybytez.com/users/\g<ID>?per_page=10000")]
LINK_PATTERN = r'<td><a href="(http://www\.easybytez\.com/\w+)" target="_blank">.+(?:</a>)?</td>'
TITLE_PATTERN = r'<Title>Files of \d+: (?P<title>.+) folder</Title>'
+
+ LOGIN_ACCOUNT = True
diff --git a/pyload/plugins/crypter/FilefactoryComFolder.py b/pyload/plugins/crypter/FilefactoryComFolder.py
index 6886fa5b1..c624b4fc5 100644
--- a/pyload/plugins/crypter/FilefactoryComFolder.py
+++ b/pyload/plugins/crypter/FilefactoryComFolder.py
@@ -18,7 +18,7 @@ class FilefactoryComFolder(SimpleCrypter):
TITLE_PATTERN = r'<h1>Files in <span>(?P<title>.+)</span></h1>'
PAGES_PATTERN = r'data-paginator-totalPages="(?P<pages>\d+)"'
- SH_COOKIES = [('.filefactory.com', 'locale', 'en_US.utf8')]
+ COOKIES = [('.filefactory.com', 'locale', 'en_US.utf8')]
def loadPage(self, page_n):
diff --git a/pyload/plugins/crypter/GooGl.py b/pyload/plugins/crypter/GooGl.py
index 93f3456cc..7ede17563 100644
--- a/pyload/plugins/crypter/GooGl.py
+++ b/pyload/plugins/crypter/GooGl.py
@@ -20,7 +20,7 @@ class GooGl(Crypter):
def decrypt(self, pyfile):
rep = self.load(self.API_URL, get={'shortUrl': pyfile.url})
- self.logDebug('JSON data: ' + rep)
+ self.logDebug("JSON data: " + rep)
rep = json_loads(rep)
if 'longUrl' in rep:
diff --git a/pyload/plugins/crypter/LinkSaveIn.py b/pyload/plugins/crypter/LinkSaveIn.py
index 4a56606c8..7aac1475b 100644
--- a/pyload/plugins/crypter/LinkSaveIn.py
+++ b/pyload/plugins/crypter/LinkSaveIn.py
@@ -136,7 +136,7 @@ class LinkSaveIn(Crypter):
package_links = []
self.logDebug("Search for Web links")
if not self.js:
- self.logDebug("no JS -> skip Web links")
+ self.logDebug("No JS -> skip Web links")
else:
#@TODO: Gather paginated web links
pattern = r'<a href="http://linksave\.in/(\w{43})"'
@@ -162,7 +162,7 @@ class LinkSaveIn(Crypter):
def handleContainer(self, type_):
package_links = []
type_ = type_.lower()
- self.logDebug('Seach for %s Container links' % type_.upper())
+ self.logDebug("Seach for %s Container links" % type_.upper())
if not type_.isalnum(): # check to prevent broken re-pattern (cnl2,rsdf,ccf,dlc,web are all alpha-numeric)
self.fail('unknown container type "%s" (this is probably a bug)' % type_)
pattern = r"\('%s_link'\).href=unescape\('(.*?\.%s)'\)" % (type_, type_)
@@ -177,7 +177,7 @@ class LinkSaveIn(Crypter):
package_links = []
self.logDebug("Search for CNL2 links")
if not self.js:
- self.logDebug("no JS -> skip CNL2 links")
+ self.logDebug("No JS -> skip CNL2 links")
elif 'cnl2_load' in self.html:
try:
(vcrypted, vjk) = self._getCipherParams()
diff --git a/pyload/plugins/crypter/LinkdecrypterCom.py b/pyload/plugins/crypter/LinkdecrypterCom.py
index b6ca2ec4f..a8429b579 100644
--- a/pyload/plugins/crypter/LinkdecrypterCom.py
+++ b/pyload/plugins/crypter/LinkdecrypterCom.py
@@ -43,7 +43,7 @@ class LinkdecrypterCom(Crypter):
if self.html.startswith('http://'):
return self.html.splitlines()
- self.logError('API', self.html)
+ self.logError("API", self.html)
if self.html == 'INTERRUPTION(PASSWORD)':
self.fail("No or incorrect password")
diff --git a/pyload/plugins/crypter/LixIn.py b/pyload/plugins/crypter/LixIn.py
index 1d812b0e3..5bfbd637e 100644
--- a/pyload/plugins/crypter/LixIn.py
+++ b/pyload/plugins/crypter/LixIn.py
@@ -42,12 +42,12 @@ class LixIn(Crypter):
for _ in xrange(5):
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m:
- self.logDebug("trying captcha")
+ self.logDebug("Trying captcha")
captcharesult = self.decryptCaptcha("http://lix.in/" + m.group("image"))
self.html = self.req.load(url, decode=True,
post={"capt": captcharesult, "submit": "submit", "tiny": id})
else:
- self.logDebug("no captcha/captcha solved")
+ self.logDebug("No captcha/captcha solved")
else:
self.html = self.req.load(url, decode=True, post={"submit": "submit", "tiny": id})
diff --git a/pyload/plugins/crypter/MediafireComFolder.py b/pyload/plugins/crypter/MediafireComFolder.py
index 98c05f450..1035d68f7 100644
--- a/pyload/plugins/crypter/MediafireComFolder.py
+++ b/pyload/plugins/crypter/MediafireComFolder.py
@@ -23,7 +23,7 @@ class MediafireComFolder(Crypter):
def decrypt(self, pyfile):
url, result = checkHTMLHeader(pyfile.url)
- self.logDebug('Location (%d): %s' % (result, url))
+ self.logDebug("Location (%d): %s" % (result, url))
if result == 0:
# load and parse html
diff --git a/pyload/plugins/crypter/MultiuploadCom.py b/pyload/plugins/crypter/MultiuploadCom.py
index b1650b647..754247ec7 100644
--- a/pyload/plugins/crypter/MultiuploadCom.py
+++ b/pyload/plugins/crypter/MultiuploadCom.py
@@ -1,64 +1,15 @@
# -*- coding: utf-8 -*-
-import re
-from time import time
+from pyload.plugins.internal.DeadCrypter import DeadCrypter
-from pyload.plugins.Crypter import Crypter
-from pyload.utils import json_loads
-
-class MultiuploadCom(Crypter):
+class MultiuploadCom(DeadCrypter):
__name__ = "MultiuploadCom"
__type__ = "crypter"
- __version__ = "0.01"
+ __version__ = "0.02"
- __pattern__ = r'http://(?:www\.)?multiupload.com/(\w+)'
- __config__ = [("preferedHoster", "str", "Prefered hoster list (bar-separated) ", "multiupload"),
- ("ignoredHoster", "str", "Ignored hoster list (bar-separated) ", "")]
+ __pattern__ = r'http://(?:www\.)?multiupload\.(com|nl)/\w+'
- __description__ = """MultiUpload.com decrypter plugin"""
+ __description__ = """ MultiUpload.com decrypter plugin """
__author_name__ = "zoidberg"
__author_mail__ = "zoidberg@mujmail.cz"
-
- ML_LINK_PATTERN = r'<div id="downloadbutton_" style=""><a href="([^"]+)"'
-
-
- def decrypt(self, pyfile):
- self.html = self.load(pyfile.url)
- m = re.search(self.ML_LINK_PATTERN, self.html)
- ml_url = m.group(1) if m else None
-
- json_list = json_loads(self.load("http://multiupload.com/progress/", get={
- "d": re.match(self.__pattern__, pyfile.url).group(1),
- "r": str(int(time() * 1000))
- }))
-
- prefered_set = map(lambda s: s.lower().split('.')[0], set(self.getConfig("preferedHoster").split('|')))
-
- if ml_url and 'multiupload' in prefered_set:
- self.urls.append(ml_url)
-
- for link in json_list:
- if link['service'].lower() in prefered_set and int(link['status']) and not int(link['deleted']):
- url = self.getLocation(link['url'])
- if url:
- self.urls.append(url)
-
- if not self.urls:
- ignored_set = map(lambda s: s.lower().split('.')[0], set(self.getConfig("ignoredHoster").split('|')))
-
- if 'multiupload' not in ignored_set:
- self.urls.append(ml_url)
-
- for link in json_list:
- if link['service'].lower() not in ignored_set and int(link['status']) and not int(link['deleted']):
- url = self.getLocation(link['url'])
- if url:
- self.urls.append(url)
-
- if not self.urls:
- self.fail('Could not extract any links')
-
- def getLocation(self, url):
- header = self.load(url, just_header=True)
- return header['location'] if "location" in header else None
diff --git a/pyload/plugins/crypter/NCryptIn.py b/pyload/plugins/crypter/NCryptIn.py
index 70c541d02..0e3043290 100644
--- a/pyload/plugins/crypter/NCryptIn.py
+++ b/pyload/plugins/crypter/NCryptIn.py
@@ -156,7 +156,7 @@ class NCryptIn(Crypter):
self.logDebug("CircleCaptcha protected")
captcha_img_url = "http://ncrypt.in/classes/captcha/circlecaptcha.php"
coords = self.decryptCaptcha(captcha_img_url, forceUser=True, imgtype="png", result_type='positional')
- self.logDebug("Captcha resolved, coords [%s]" % str(coords))
+ self.logDebug("Captcha resolved, coords [%s]" % coords)
postData['circle.x'] = coords[0]
postData['circle.y'] = coords[1]
diff --git a/pyload/plugins/crypter/RelinkUs.py b/pyload/plugins/crypter/RelinkUs.py
index 74228d41a..5a56edc4d 100644
--- a/pyload/plugins/crypter/RelinkUs.py
+++ b/pyload/plugins/crypter/RelinkUs.py
@@ -125,7 +125,7 @@ class RelinkUs(Crypter):
self.logDebug("Request user positional captcha resolving")
captcha_img_url = self.CAPTCHA_IMG_URL + "?id=%s" % self.fileid
coords = self.decryptCaptcha(captcha_img_url, forceUser=True, imgtype="png", result_type='positional')
- self.logDebug("Captcha resolved, coords [%s]" % str(coords))
+ self.logDebug("Captcha resolved, coords [%s]" % coords)
captcha_post_url = self.CAPTCHA_SUBMIT_URL + "?id=%s" % self.fileid
captcha_post_data = {'button.x': coords[0], 'button.y': coords[1], 'captcha': 'submit'}
self.html = self.load(captcha_post_url, post=captcha_post_data, decode=True)
@@ -189,7 +189,7 @@ class RelinkUs(Crypter):
return package_links
def handleDLCLinks(self):
- self.logDebug('Search for DLC links')
+ self.logDebug("Search for DLC links")
package_links = []
m = re.search(self.DLC_LINK_REGEX, self.html)
if m is not None:
diff --git a/pyload/plugins/crypter/SerienjunkiesOrg.py b/pyload/plugins/crypter/SerienjunkiesOrg.py
deleted file mode 100644
index 713086cb9..000000000
--- a/pyload/plugins/crypter/SerienjunkiesOrg.py
+++ /dev/null
@@ -1,324 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import random
-import re
-
-from time import sleep
-
-from BeautifulSoup import BeautifulSoup
-
-from pyload.plugins.Crypter import Crypter
-from pyload.utils import html_unescape
-
-
-class SerienjunkiesOrg(Crypter):
- __name__ = "SerienjunkiesOrg"
- __type__ = "crypter"
- __version__ = "0.39"
-
- __pattern__ = r'http://(?:www\.)?(serienjunkies.org|dokujunkies.org)/.*?'
- __config__ = [("changeNameSJ", "Packagename;Show;Season;Format;Episode", "Take SJ.org name", "Show"),
- ("changeNameDJ", "Packagename;Show;Format;Episode", "Take DJ.org name", "Show"),
- ("randomPreferred", "bool", "Randomize Preferred-List", False),
- ("hosterListMode", "OnlyOne;OnlyPreferred(One);OnlyPreferred(All);All",
- "Use for hosters (if supported)", "All"),
- ("hosterList", "str", "Preferred Hoster list (comma separated)",
- "RapidshareCom,UploadedTo,NetloadIn,FilefactoryCom,FreakshareNet,FilebaseTo,HotfileCom,DepositfilesCom,EasyshareCom,KickloadCom"),
- ("ignoreList", "str", "Ignored Hoster list (comma separated)", "MegauploadCom")]
-
- __description__ = """Serienjunkies.org decrypter plugin"""
- __author_name__ = ("mkaay", "godofdream")
- __author_mail__ = ("mkaay@mkaay.de", "soilfiction@gmail.com")
-
-
- def setup(self):
- self.multiDL = False
-
- def getSJSrc(self, url):
- src = self.req.load(str(url))
- if "This website is not available in your country" in src:
- self.fail("Not available in your country")
- if not src.find("Enter Serienjunkies") == -1:
- sleep(1)
- src = self.req.load(str(url))
- return src
-
- def handleShow(self, url):
- src = self.getSJSrc(url)
- soup = BeautifulSoup(src)
- packageName = self.pyfile.package().name
- if self.getConfig("changeNameSJ") == "Show":
- found = html_unescape(soup.find("h2").find("a").string.split(' &#8211;')[0])
- if found:
- packageName = found
-
- nav = soup.find("div", attrs={"id": "scb"})
-
- package_links = []
- for a in nav.findAll("a"):
- if self.getConfig("changeNameSJ") == "Show":
- package_links.append(a['href'])
- else:
- package_links.append(a['href'] + "#hasName")
- if self.getConfig("changeNameSJ") == "Show":
- self.packages.append((packageName, package_links, packageName))
- else:
- self.core.files.addLinks(package_links, self.pyfile.package().id)
-
- def handleSeason(self, url):
- src = self.getSJSrc(url)
- soup = BeautifulSoup(src)
- post = soup.find("div", attrs={"class": "post-content"})
- ps = post.findAll("p")
-
- seasonName = html_unescape(soup.find("a", attrs={"rel": "bookmark"}).string).replace("&#8211;", "-")
- groups = {}
- gid = -1
- for p in ps:
- if re.search("<strong>Sprache|<strong>Format", str(p)):
- var = p.findAll("strong")
- opts = {"Sprache": "", "Format": ""}
- for v in var:
- n = html_unescape(v.string).strip()
- n = re.sub(r"^([:]?)(.*?)([:]?)$", r'\2', n)
- if n.strip() not in opts:
- continue
- val = v.nextSibling
- if not val:
- continue
- val = val.replace("|", "").strip()
- val = re.sub(r"^([:]?)(.*?)([:]?)$", r'\2', val)
- opts[n.strip()] = val.strip()
- gid += 1
- groups[gid] = {}
- groups[gid]['ep'] = {}
- groups[gid]['opts'] = opts
- elif re.search("<strong>Download:", str(p)):
- parts = str(p).split("<br />")
- if re.search("<strong>", parts[0]):
- ename = re.search('<strong>(.*?)</strong>', parts[0]).group(1).strip().decode("utf-8").replace(
- "&#8211;", "-")
- groups[gid]['ep'][ename] = {}
- parts.remove(parts[0])
- for part in parts:
- hostername = re.search(r" \| ([-a-zA-Z0-9]+\.\w+)", part)
- if hostername:
- hostername = hostername.group(1)
- groups[gid]['ep'][ename][hostername] = []
- links = re.findall('href="(.*?)"', part)
- for link in links:
- groups[gid]['ep'][ename][hostername].append(link + "#hasName")
-
- links = []
- for g in groups.values():
- for ename in g['ep']:
- links.extend(self.getpreferred(g['ep'][ename]))
- if self.getConfig("changeNameSJ") == "Episode":
- self.packages.append((ename, links, ename))
- links = []
- package = "%s (%s, %s)" % (seasonName, g['opts']['Format'], g['opts']['Sprache'])
- if self.getConfig("changeNameSJ") == "Format":
- self.packages.append((package, links, package))
- links = []
- if (self.getConfig("changeNameSJ") == "Packagename") or re.search("#hasName", url):
- self.core.files.addLinks(links, self.pyfile.package().id)
- elif (self.getConfig("changeNameSJ") == "Season") or not re.search("#hasName", url):
- self.packages.append((seasonName, links, seasonName))
-
- def handleEpisode(self, url):
- src = self.getSJSrc(url)
- if not src.find(
- "Du hast das Download-Limit &uuml;berschritten! Bitte versuche es sp&auml;ter nocheinmal.") == -1:
- self.fail(_("Downloadlimit reached"))
- else:
- soup = BeautifulSoup(src)
- form = soup.find("form")
- h1 = soup.find("h1")
-
- if h1.get("class") == "wrap":
- captchaTag = soup.find(attrs={"src": re.compile("^/secure/")})
- if not captchaTag:
- sleep(5)
- self.retry()
-
- captchaUrl = "http://download.serienjunkies.org" + captchaTag['src']
- result = self.decryptCaptcha(str(captchaUrl), imgtype="png")
- sinp = form.find(attrs={"name": "s"})
-
- self.req.lastURL = str(url)
- sj = self.load(str(url), post={'s': sinp['value'], 'c': result, 'action': "Download"})
-
- soup = BeautifulSoup(sj)
- rawLinks = soup.findAll(attrs={"action": re.compile("^http://download.serienjunkies.org/")})
-
- if not len(rawLinks) > 0:
- sleep(1)
- self.retry()
- return
-
- self.correctCaptcha()
-
- links = []
- for link in rawLinks:
- frameUrl = link['action'].replace("/go-", "/frame/go-")
- links.append(self.handleFrame(frameUrl))
- if re.search("#hasName", url) or ((self.getConfig("changeNameSJ") == "Packagename") and
- (self.getConfig("changeNameDJ") == "Packagename")):
- self.core.files.addLinks(links, self.pyfile.package().id)
- else:
- if h1.text[2] == "_":
- eName = h1.text[3:]
- else:
- eName = h1.text
- self.packages.append((eName, links, eName))
-
- def handleOldStyleLink(self, url):
- sj = self.req.load(str(url))
- soup = BeautifulSoup(sj)
- form = soup.find("form", attrs={"action": re.compile("^http://serienjunkies.org")})
- captchaTag = form.find(attrs={"src": re.compile("^/safe/secure/")})
- captchaUrl = "http://serienjunkies.org" + captchaTag['src']
- result = self.decryptCaptcha(str(captchaUrl))
- url = form['action']
- sinp = form.find(attrs={"name": "s"})
-
- self.req.load(str(url), post={'s': sinp['value'], 'c': result, 'dl.start': "Download"}, cookies=False,
- just_header=True)
- decrypted = self.req.lastEffectiveURL
- if decrypted == str(url):
- self.retry()
- self.core.files.addLinks([decrypted], self.pyfile.package().id)
-
- def handleFrame(self, url):
- self.req.load(str(url))
- return self.req.lastEffectiveURL
-
- def handleShowDJ(self, url):
- src = self.getSJSrc(url)
- soup = BeautifulSoup(src)
- post = soup.find("div", attrs={"id": "page_post"})
- ps = post.findAll("p")
- found = html_unescape(soup.find("h2").find("a").string.split(' &#8211;')[0])
- if found:
- seasonName = found
-
- groups = {}
- gid = -1
- for p in ps:
- if re.search("<strong>Sprache|<strong>Format", str(p)):
- var = p.findAll("strong")
- opts = {"Sprache": "", "Format": ""}
- for v in var:
- n = html_unescape(v.string).strip()
- n = re.sub(r"^([:]?)(.*?)([:]?)$", r'\2', n)
- if n.strip() not in opts:
- continue
- val = v.nextSibling
- if not val:
- continue
- val = val.replace("|", "").strip()
- val = re.sub(r"^([:]?)(.*?)([:]?)$", r'\2', val)
- opts[n.strip()] = val.strip()
- gid += 1
- groups[gid] = {}
- groups[gid]['ep'] = {}
- groups[gid]['opts'] = opts
- elif re.search("<strong>Download:", str(p)):
- parts = str(p).split("<br />")
- if re.search("<strong>", parts[0]):
- ename = re.search('<strong>(.*?)</strong>', parts[0]).group(1).strip().decode("utf-8").replace(
- "&#8211;", "-")
- groups[gid]['ep'][ename] = {}
- parts.remove(parts[0])
- for part in parts:
- hostername = re.search(r" \| ([-a-zA-Z0-9]+\.\w+)", part)
- if hostername:
- hostername = hostername.group(1)
- groups[gid]['ep'][ename][hostername] = []
- links = re.findall('href="(.*?)"', part)
- for link in links:
- groups[gid]['ep'][ename][hostername].append(link + "#hasName")
-
- links = []
- for g in groups.values():
- for ename in g['ep']:
- links.extend(self.getpreferred(g['ep'][ename]))
- if self.getConfig("changeNameDJ") == "Episode":
- self.packages.append((ename, links, ename))
- links = []
- package = "%s (%s, %s)" % (seasonName, g['opts']['Format'], g['opts']['Sprache'])
- if self.getConfig("changeNameDJ") == "Format":
- self.packages.append((package, links, package))
- links = []
- if (self.getConfig("changeNameDJ") == "Packagename") or re.search("#hasName", url):
- self.core.files.addLinks(links, self.pyfile.package().id)
- elif (self.getConfig("changeNameDJ") == "Show") or not re.search("#hasName", url):
- self.packages.append((seasonName, links, seasonName))
-
- def handleCategoryDJ(self, url):
- package_links = []
- src = self.getSJSrc(url)
- soup = BeautifulSoup(src)
- content = soup.find("div", attrs={"id": "content"})
- for a in content.findAll("a", attrs={"rel": "bookmark"}):
- package_links.append(a['href'])
- self.core.files.addLinks(package_links, self.pyfile.package().id)
-
- def decrypt(self, pyfile):
- showPattern = re.compile("^http://serienjunkies.org/serie/(.*)/$")
- seasonPattern = re.compile("^http://serienjunkies.org/.*?/(.*)/$")
- episodePattern = re.compile("^http://download.serienjunkies.org/f-.*?.html(#hasName)?$")
- oldStyleLink = re.compile("^http://serienjunkies.org/safe/(.*)$")
- categoryPatternDJ = re.compile("^http://dokujunkies.org/.*?(.*)$")
- showPatternDJ = re.compile(r"^http://dokujunkies.org/.*?/(.*)\.html(#hasName)?$")
- framePattern = re.compile("^http://download.(serienjunkies.org|dokujunkies.org)/frame/go-.*?/$")
- url = pyfile.url
- if framePattern.match(url):
- self.packages.append((pyfile.package().name, [self.handleFrame(url)], pyfile.package().name))
- elif episodePattern.match(url):
- self.handleEpisode(url)
- elif oldStyleLink.match(url):
- self.handleOldStyleLink(url)
- elif showPattern.match(url):
- self.handleShow(url)
- elif showPatternDJ.match(url):
- self.handleShowDJ(url)
- elif seasonPattern.match(url):
- self.handleSeason(url)
- elif categoryPatternDJ.match(url):
- self.handleCategoryDJ(url)
-
- #selects the preferred hoster, after that selects any hoster (ignoring the one to ignore)
- def getpreferred(self, hosterlist):
-
- result = []
- preferredList = self.getConfig("hosterList").strip().lower().replace(
- '|', ',').replace('.', '').replace(';', ',').split(',')
- if (self.getConfig("randomPreferred") is True) and (
- self.getConfig("hosterListMode") in ["OnlyOne", "OnlyPreferred(One)"]):
- random.shuffle(preferredList)
- # we don't want hosters be read two times
- hosterlist2 = hosterlist.copy()
-
- for preferred in preferredList:
- for Hoster in hosterlist:
- if preferred == Hoster.lower().replace('.', ''):
- for Part in hosterlist[Hoster]:
- self.logDebug("selected " + Part)
- result.append(str(Part))
- del (hosterlist2[Hoster])
- if self.getConfig("hosterListMode") in ["OnlyOne", "OnlyPreferred(One)"]:
- return result
-
- ignorelist = self.getConfig("ignoreList").strip().lower().replace(
- '|', ',').replace('.', '').replace(';', ',').split(',')
- if self.getConfig('hosterListMode') in ["OnlyOne", "All"]:
- for Hoster in hosterlist2:
- if Hoster.strip().lower().replace('.', '') not in ignorelist:
- for Part in hosterlist2[Hoster]:
- self.logDebug("selected2 " + Part)
- result.append(str(Part))
-
- if self.getConfig('hosterListMode') == "OnlyOne":
- return result
- return result
diff --git a/pyload/plugins/crypter/ShareLinksBiz.py b/pyload/plugins/crypter/ShareLinksBiz.py
index 132d2160b..94e144e74 100644
--- a/pyload/plugins/crypter/ShareLinksBiz.py
+++ b/pyload/plugins/crypter/ShareLinksBiz.py
@@ -109,7 +109,7 @@ class ShareLinksBiz(Crypter):
captchaUrl = self.baseUrl + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2))
self.logDebug("Waiting user for correct position")
coords = self.decryptCaptcha(captchaUrl, forceUser=True, imgtype="gif", result_type='positional')
- self.logDebug("Captcha resolved, coords [%s]" % str(coords))
+ self.logDebug("Captcha resolved, coords [%s]" % coords)
# Resolve captcha
href = self._resolveCoords(coords, captchaMap)
diff --git a/pyload/plugins/crypter/UploadedToFolder.py b/pyload/plugins/crypter/UploadedToFolder.py
index 31977409d..5ba34d8b5 100644
--- a/pyload/plugins/crypter/UploadedToFolder.py
+++ b/pyload/plugins/crypter/UploadedToFolder.py
@@ -33,6 +33,6 @@ class UploadedToFolder(SimpleCrypter):
self.html = self.load(plain_link)
package_links = self.html.split('\n')[:-1]
- self.logDebug('Package has %d links' % len(package_links))
+ self.logDebug("Package has %d links" % len(package_links))
self.packages = [(package_name, package_links, folder_name)]