summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/hoster/FileSharkPl.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-26 17:04:38 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-26 17:04:38 +0100
commitccb6aaee9d987b56faf19fb48dd06a04ff8ca721 (patch)
tree6a385417ff77f3ed17329e2d606f80b673bdb3c0 /pyload/plugin/hoster/FileSharkPl.py
parentPrepare to merging (diff)
parentTiny code cosmetics (diff)
downloadpyload-ccb6aaee9d987b56faf19fb48dd06a04ff8ca721.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: module/plugins/accounts/Keep2ShareCc.py module/plugins/captcha/OCR.py module/plugins/captcha/captcha.py module/plugins/crypter/DailymotionBatch.py module/plugins/crypter/DailymotionComFolder.py module/plugins/crypter/YoutubeBatch.py module/plugins/crypter/YoutubeComFolder.py module/plugins/internal/CaptchaService.py pyload/plugin/Extractor.py pyload/plugin/OCR.py pyload/plugin/account/DebridItaliaCom.py pyload/plugin/account/MegaRapidCz.py pyload/plugin/account/NoPremiumPl.py pyload/plugin/account/RapideoPl.py pyload/plugin/addon/AndroidPhoneNotify.py pyload/plugin/addon/Checksum.py pyload/plugin/addon/ClickAndLoad.py pyload/plugin/addon/DeleteFinished.py pyload/plugin/addon/DownloadScheduler.py pyload/plugin/addon/ExternalScripts.py pyload/plugin/addon/ExtractArchive.py pyload/plugin/addon/HotFolder.py pyload/plugin/addon/IRCInterface.py pyload/plugin/addon/JustPremium.py pyload/plugin/addon/MergeFiles.py pyload/plugin/addon/MultiHome.py pyload/plugin/addon/RestartFailed.py pyload/plugin/addon/RestartSlow.py pyload/plugin/addon/SkipRev.py pyload/plugin/addon/UnSkipOnFail.py pyload/plugin/addon/UpdateManager.py pyload/plugin/addon/WindowsPhoneNotify.py pyload/plugin/crypter/DDLMusicOrg.py pyload/plugin/crypter/DailymotionBatch.py pyload/plugin/crypter/DevhostSt.py pyload/plugin/crypter/EmbeduploadCom.py pyload/plugin/crypter/MultiloadCz.py pyload/plugin/crypter/YoutubeBatch.py pyload/plugin/extractor/SevenZip.py pyload/plugin/extractor/UnRar.py pyload/plugin/extractor/UnZip.py pyload/plugin/hook/BypassCaptcha.py pyload/plugin/hook/Captcha9Kw.py pyload/plugin/hook/CaptchaBrotherhood.py pyload/plugin/hook/DeathByCaptcha.py pyload/plugin/hook/ExpertDecoders.py pyload/plugin/hook/ImageTyperz.py pyload/plugin/hook/XFileSharingPro.py pyload/plugin/hoster/AlldebridCom.py pyload/plugin/hoster/CzshareCom.py pyload/plugin/hoster/EuroshareEu.py pyload/plugin/hoster/FastixRu.py pyload/plugin/hoster/FastshareCz.py pyload/plugin/hoster/GooIm.py pyload/plugin/hoster/MediafireCom.py pyload/plugin/hoster/MegaDebridEu.py pyload/plugin/hoster/NitroflareCom.py pyload/plugin/hoster/OverLoadMe.py pyload/plugin/hoster/PremiumTo.py pyload/plugin/hoster/PremiumizeMe.py pyload/plugin/hoster/RapidgatorNet.py pyload/plugin/hoster/RealdebridCom.py pyload/plugin/hoster/SimplyPremiumCom.py pyload/plugin/hoster/SimplydebridCom.py pyload/plugin/hoster/SmoozedCom.py pyload/plugin/hoster/SoundcloudCom.py pyload/plugin/hoster/UlozTo.py pyload/plugin/hoster/UploadableCh.py pyload/plugin/hoster/UploadedTo.py pyload/plugin/hoster/UploadheroCom.py pyload/plugin/hoster/VeehdCom.py pyload/plugin/hoster/VimeoCom.py pyload/plugin/hoster/ZeveraCom.py pyload/plugin/hoster/ZippyshareCom.py pyload/plugin/internal/BasePlugin.py pyload/plugin/internal/MultiHoster.py pyload/plugin/internal/SimpleDereferer.py pyload/plugin/internal/SimpleHoster.py pyload/plugin/internal/XFSHoster.py pyload/plugin/ocr/GigasizeCom.py pyload/plugin/ocr/LinksaveIn.py pyload/plugin/ocr/NetloadIn.py pyload/plugin/ocr/ShareonlineBiz.py
Diffstat (limited to 'pyload/plugin/hoster/FileSharkPl.py')
-rw-r--r--pyload/plugin/hoster/FileSharkPl.py33
1 files changed, 9 insertions, 24 deletions
diff --git a/pyload/plugin/hoster/FileSharkPl.py b/pyload/plugin/hoster/FileSharkPl.py
index 24b1db6de..ab28ac144 100644
--- a/pyload/plugin/hoster/FileSharkPl.py
+++ b/pyload/plugin/hoster/FileSharkPl.py
@@ -10,9 +10,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class FileSharkPl(SimpleHoster):
__name__ = "FileSharkPl"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.09"
__pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """FileShark.pl hoster plugin"""
__license__ = "GPLv3"
@@ -20,10 +21,9 @@ class FileSharkPl(SimpleHoster):
("Walter Purcaro", "vuolter@gmail.com")]
- NAME_PATTERN = r'<h2 class="name-file">(?P<N>.+)</h2>'
- SIZE_PATTERN = r'<p class="size-file">(.*?)<strong>(?P<S>\d+\.?\d*)\s(?P<U>\w+)</strong></p>'
-
- OFFLINE_PATTERN = '(P|p)lik zosta. (usuni.ty|przeniesiony)'
+ NAME_PATTERN = r'<h2 class="name-file">(?P<N>.+)</h2>'
+ SIZE_PATTERN = r'<p class="size-file">(.*?)<strong>(?P<S>\d+\.?\d*)\s(?P<U>\w+)</strong></p>'
+ OFFLINE_PATTERN = r'(P|p)lik zosta. (usuni.ty|przeniesiony)'
LINK_FREE_PATTERN = r'<a href="(.*?)" class="btn-upload-free">'
LINK_PREMIUM_PATTERN = r'<a href="(.*?)" class="btn-upload-premium">'
@@ -33,7 +33,7 @@ class FileSharkPl(SimpleHoster):
IP_ERROR_PATTERN = r'Strona jest dost.pna wy..cznie dla u.ytkownik.w znajduj.cych si. na terenie Polski'
SLOT_ERROR_PATTERN = r'Osi.gni.to maksymaln. liczb. .ci.ganych jednocze.nie plik.w\.'
- CAPTCHA_PATTERN = '<img src="data:image/jpeg;base64,(.*?)" title="captcha"'
+ CAPTCHA_PATTERN = r'<img src="data:image/jpeg;base64,(.*?)" title="captcha"'
TOKEN_PATTERN = r'name="form\[_token\]" value="(.*?)" />'
@@ -80,6 +80,8 @@ class FileSharkPl(SimpleHoster):
link = urljoin("http://fileshark.pl", m.group(1))
+ self.html = self.load(link)
+
m = re.search(self.WAIT_PATTERN, self.html)
if m:
seconds = int(m.group(1))
@@ -106,24 +108,7 @@ class FileSharkPl(SimpleHoster):
self.load = tmp_load
- self.download(link, post=inputs, cookies=True, disposition=True)
-
-
- def checkFile(self):
- check = self.checkDownload({'wrong_captcha': re.compile(r'<label for="form_captcha" generated="true" class="error">(.*?)</label>'),
- 'wait_pattern' : re.compile(self.SECONDS_PATTERN),
- 'DL-found' : re.compile('<a href="(.*)">')})
- if check == "DL-found":
- self.correctCaptcha()
-
- elif check == "wrong_captcha":
- self.invalidCaptcha()
- self.retry(10, 1, _("Wrong captcha solution"))
-
- elif check == "wait_pattern":
- self.retry()
-
- return super(FileSharkPl, self).checkFile()
+ self.download(link, post=inputs, disposition=True)
def _decode64(self, data, *args, **kwargs):