summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/accounts/AlldebridCom.py6
-rw-r--r--module/plugins/accounts/AniStreamCom.py2
-rw-r--r--module/plugins/accounts/BackinNet.py2
-rw-r--r--module/plugins/accounts/BitshareCom.py2
-rw-r--r--module/plugins/accounts/CatShareNet.py2
-rw-r--r--module/plugins/accounts/CloudsixMe.py2
-rw-r--r--module/plugins/accounts/CloudzillaTo.py2
-rw-r--r--module/plugins/accounts/CramitIn.py2
-rw-r--r--module/plugins/accounts/CzshareCom.py2
-rw-r--r--module/plugins/accounts/DebridItaliaCom.py6
-rw-r--r--module/plugins/accounts/DepositfilesCom.py2
-rw-r--r--module/plugins/accounts/EasybytezCom.py2
-rw-r--r--module/plugins/accounts/EuroshareEu.py2
-rw-r--r--module/plugins/accounts/ExashareCom.py2
-rw-r--r--module/plugins/accounts/FastixRu.py14
-rw-r--r--module/plugins/accounts/FastshareCz.py2
-rw-r--r--module/plugins/accounts/File4SafeCom.py2
-rw-r--r--module/plugins/accounts/FileParadoxIn.py2
-rw-r--r--module/plugins/accounts/FilecloudIo.py8
-rw-r--r--module/plugins/accounts/FilefactoryCom.py2
-rw-r--r--module/plugins/accounts/FilejungleCom.py2
-rw-r--r--module/plugins/accounts/FileomCom.py2
-rw-r--r--module/plugins/accounts/FilerNet.py2
-rw-r--r--module/plugins/accounts/FilerioCom.py2
-rw-r--r--module/plugins/accounts/FilesMailRu.py2
-rw-r--r--module/plugins/accounts/FileserveCom.py8
-rw-r--r--module/plugins/accounts/FourSharedCom.py2
-rw-r--r--module/plugins/accounts/FreakshareCom.py2
-rw-r--r--module/plugins/accounts/FreeWayMe.py10
-rw-r--r--module/plugins/accounts/FshareVn.py2
-rw-r--r--module/plugins/accounts/Ftp.py2
-rw-r--r--module/plugins/accounts/HellshareCz.py2
-rw-r--r--module/plugins/accounts/HighWayMe.py12
-rw-r--r--module/plugins/accounts/Http.py2
-rw-r--r--module/plugins/accounts/HugefilesNet.py2
-rw-r--r--module/plugins/accounts/HundredEightyUploadCom.py2
-rw-r--r--module/plugins/accounts/JunkyvideoCom.py2
-rw-r--r--module/plugins/accounts/JunocloudMe.py2
-rw-r--r--module/plugins/accounts/Keep2ShareCc.py2
-rw-r--r--module/plugins/accounts/LetitbitNet.py8
-rw-r--r--module/plugins/accounts/LinksnappyCom.py12
-rw-r--r--module/plugins/accounts/MegaDebridEu.py14
-rw-r--r--module/plugins/accounts/MegaRapidCz.py2
-rw-r--r--module/plugins/accounts/MegaRapidoNet.py6
-rw-r--r--module/plugins/accounts/MegasharesCom.py2
-rw-r--r--module/plugins/accounts/MovReelCom.py2
-rw-r--r--module/plugins/accounts/MultihostersCom.py2
-rw-r--r--module/plugins/accounts/MultishareCz.py6
-rw-r--r--module/plugins/accounts/MyfastfileCom.py12
-rw-r--r--module/plugins/accounts/NitroflareCom.py2
-rw-r--r--module/plugins/accounts/NoPremiumPl.py15
-rw-r--r--module/plugins/accounts/NosuploadCom.py2
-rw-r--r--module/plugins/accounts/NovafileCom.py2
-rw-r--r--module/plugins/accounts/NowVideoSx.py2
-rw-r--r--module/plugins/accounts/OboomCom.py6
-rw-r--r--module/plugins/accounts/OneFichierCom.py2
-rw-r--r--module/plugins/accounts/OverLoadMe.py12
-rw-r--r--module/plugins/accounts/PremiumTo.py6
-rw-r--r--module/plugins/accounts/PremiumizeMe.py12
-rw-r--r--module/plugins/accounts/PutdriveCom.py2
-rw-r--r--module/plugins/accounts/QuickshareCz.py2
-rw-r--r--module/plugins/accounts/RPNetBiz.py12
-rw-r--r--module/plugins/accounts/RapideoPl.py15
-rw-r--r--module/plugins/accounts/RapidfileshareNet.py2
-rw-r--r--module/plugins/accounts/RapidgatorNet.py27
-rw-r--r--module/plugins/accounts/RapiduNet.py10
-rw-r--r--module/plugins/accounts/RarefileNet.py2
-rw-r--r--module/plugins/accounts/RealdebridCom.py6
-rw-r--r--module/plugins/accounts/RehostTo.py6
-rw-r--r--module/plugins/accounts/RyushareCom.py2
-rw-r--r--module/plugins/accounts/SafesharingEu.py2
-rw-r--r--module/plugins/accounts/SecureUploadEu.py2
-rw-r--r--module/plugins/accounts/SendmywayCom.py2
-rw-r--r--module/plugins/accounts/SharebeastCom.py2
-rw-r--r--module/plugins/accounts/ShareonlineBiz.py2
-rw-r--r--module/plugins/accounts/SimplyPremiumCom.py12
-rw-r--r--module/plugins/accounts/SimplydebridCom.py6
-rw-r--r--module/plugins/accounts/SmoozedCom.py10
-rw-r--r--module/plugins/accounts/StreamcloudEu.py2
-rw-r--r--module/plugins/accounts/TurbobitNet.py2
-rw-r--r--module/plugins/accounts/TusfilesNet.py2
-rw-r--r--module/plugins/accounts/UlozTo.py2
-rw-r--r--module/plugins/accounts/UploadableCh.py2
-rw-r--r--module/plugins/accounts/UploadcCom.py2
-rw-r--r--module/plugins/accounts/UploadedTo.py2
-rw-r--r--module/plugins/accounts/UploadheroCom.py2
-rw-r--r--module/plugins/accounts/UploadingCom.py2
-rw-r--r--module/plugins/accounts/UptoboxCom.py6
-rw-r--r--module/plugins/accounts/VidPlayNet.py2
-rw-r--r--module/plugins/accounts/WebshareCz.py2
-rw-r--r--module/plugins/accounts/WorldbytezCom.py2
-rw-r--r--module/plugins/accounts/XFileSharingPro.py2
-rw-r--r--module/plugins/accounts/YibaishiwuCom.py2
-rw-r--r--module/plugins/accounts/ZeveraCom.py6
-rw-r--r--module/plugins/captcha/AdYouLike.py12
-rw-r--r--module/plugins/captcha/AdsCaptcha.py2
-rw-r--r--module/plugins/captcha/CircleCaptcha.py22
-rw-r--r--module/plugins/captcha/GigasizeCom.py2
-rw-r--r--module/plugins/captcha/LinksaveIn.py2
-rw-r--r--module/plugins/captcha/NetloadIn.py2
-rw-r--r--module/plugins/captcha/ReCaptcha.py2
-rw-r--r--module/plugins/captcha/ShareonlineBiz.py2
-rw-r--r--module/plugins/captcha/SolveMedia.py2
-rw-r--r--module/plugins/container/CCF.py13
-rw-r--r--module/plugins/container/DLC.py8
-rw-r--r--module/plugins/container/RSDF.py6
-rw-r--r--module/plugins/container/TXT.py6
-rw-r--r--module/plugins/crypter/BitshareComFolder.py4
-rw-r--r--module/plugins/crypter/C1NeonCom.py4
-rw-r--r--module/plugins/crypter/ChipDe.py10
-rw-r--r--module/plugins/crypter/CloudzillaToFolder.py2
-rw-r--r--module/plugins/crypter/CrockoComFolder.py4
-rw-r--r--module/plugins/crypter/CryptItCom.py4
-rw-r--r--module/plugins/crypter/CzshareComFolder.py10
-rw-r--r--module/plugins/crypter/DailymotionComFolder.py14
-rw-r--r--module/plugins/crypter/DataHuFolder.py4
-rw-r--r--module/plugins/crypter/DdlstorageComFolder.py4
-rw-r--r--module/plugins/crypter/DepositfilesComFolder.py4
-rw-r--r--module/plugins/crypter/Dereferer.py4
-rw-r--r--module/plugins/crypter/DevhostStFolder.py4
-rw-r--r--module/plugins/crypter/DlProtectCom.py4
-rw-r--r--module/plugins/crypter/DuckCryptInfo.py13
-rw-r--r--module/plugins/crypter/DuploadOrgFolder.py4
-rw-r--r--module/plugins/crypter/EasybytezComFolder.py4
-rw-r--r--module/plugins/crypter/EmbeduploadCom.py10
-rw-r--r--module/plugins/crypter/FilebeerInfoFolder.py4
-rw-r--r--module/plugins/crypter/FilecloudIoFolder.py4
-rw-r--r--module/plugins/crypter/FilecryptCc.py7
-rw-r--r--module/plugins/crypter/FilefactoryComFolder.py4
-rw-r--r--module/plugins/crypter/FilerNetFolder.py4
-rw-r--r--module/plugins/crypter/FileserveComFolder.py9
-rw-r--r--module/plugins/crypter/FilesonicComFolder.py4
-rw-r--r--module/plugins/crypter/FilestubeCom.py4
-rw-r--r--module/plugins/crypter/FiletramCom.py4
-rw-r--r--module/plugins/crypter/FiredriveComFolder.py4
-rw-r--r--module/plugins/crypter/FourChanOrg.py9
-rw-r--r--module/plugins/crypter/FreakhareComFolder.py4
-rw-r--r--module/plugins/crypter/FreetexthostCom.py4
-rw-r--r--module/plugins/crypter/FshareVnFolder.py4
-rw-r--r--module/plugins/crypter/FurLy.py2
-rwxr-xr-xmodule/plugins/crypter/Go4UpCom.py6
-rw-r--r--module/plugins/crypter/GooGl.py6
-rw-r--r--module/plugins/crypter/GoogledriveComFolder.py4
-rw-r--r--module/plugins/crypter/HoerbuchIn.py9
-rw-r--r--module/plugins/crypter/HotfileComFolder.py4
-rw-r--r--module/plugins/crypter/ILoadTo.py4
-rw-r--r--module/plugins/crypter/ImgurComAlbum.py6
-rw-r--r--module/plugins/crypter/JDlist.py26
-rw-r--r--module/plugins/crypter/LetitbitNetFolder.py12
-rw-r--r--module/plugins/crypter/LinkCryptWs.py9
-rw-r--r--module/plugins/crypter/LinkSaveIn.py4
-rw-r--r--module/plugins/crypter/LinkdecrypterCom.py4
-rw-r--r--module/plugins/crypter/LixIn.py9
-rw-r--r--module/plugins/crypter/LofCc.py4
-rw-r--r--module/plugins/crypter/MBLinkInfo.py4
-rw-r--r--module/plugins/crypter/MediafireComFolder.py14
-rw-r--r--module/plugins/crypter/MegaCoNzFolder.py11
-rw-r--r--module/plugins/crypter/MegaRapidCzFolder.py4
-rw-r--r--module/plugins/crypter/MegauploadComFolder.py4
-rw-r--r--module/plugins/crypter/Movie2KTo.py4
-rw-r--r--module/plugins/crypter/MultiUpOrg.py4
-rw-r--r--module/plugins/crypter/MultiloadCz.py10
-rw-r--r--module/plugins/crypter/MultiuploadCom.py4
-rw-r--r--module/plugins/crypter/NCryptIn.py11
-rw-r--r--module/plugins/crypter/NetfolderIn.py4
-rw-r--r--module/plugins/crypter/NitroflareComFolder.py8
-rw-r--r--module/plugins/crypter/NosvideoCom.py4
-rw-r--r--module/plugins/crypter/OronComFolder.py4
-rw-r--r--module/plugins/crypter/PastebinCom.py4
-rw-r--r--module/plugins/crypter/PastedCo.py7
-rw-r--r--module/plugins/crypter/QuickshareCzFolder.py10
-rw-r--r--module/plugins/crypter/RSLayerCom.py4
-rw-r--r--module/plugins/crypter/RelinkUs.py16
-rw-r--r--module/plugins/crypter/SafelinkingNet.py13
-rw-r--r--module/plugins/crypter/SecuredIn.py4
-rw-r--r--module/plugins/crypter/SexuriaCom.py11
-rw-r--r--module/plugins/crypter/ShSt.py10
-rw-r--r--module/plugins/crypter/ShareLinksBiz.py12
-rw-r--r--module/plugins/crypter/SharingmatrixComFolder.py4
-rw-r--r--module/plugins/crypter/SpeedLoadOrgFolder.py4
-rw-r--r--module/plugins/crypter/StealthTo.py4
-rw-r--r--module/plugins/crypter/TNTVillageScambioeticoOrg.py4
-rw-r--r--module/plugins/crypter/TinyurlCom.py2
-rw-r--r--module/plugins/crypter/TnyCz.py4
-rw-r--r--module/plugins/crypter/TrailerzoneInfo.py4
-rw-r--r--module/plugins/crypter/TurbobitNetFolder.py10
-rw-r--r--module/plugins/crypter/TusfilesNetFolder.py7
-rw-r--r--module/plugins/crypter/UlozToFolder.py10
-rw-r--r--module/plugins/crypter/UploadableChFolder.py4
-rw-r--r--module/plugins/crypter/UploadedToFolder.py4
-rw-r--r--module/plugins/crypter/WiiReloadedOrg.py4
-rw-r--r--module/plugins/crypter/WuploadComFolder.py4
-rw-r--r--module/plugins/crypter/XFileSharingProFolder.py6
-rw-r--r--module/plugins/crypter/XupPl.py9
-rw-r--r--module/plugins/crypter/YoutubeComFolder.py14
-rw-r--r--module/plugins/hooks/AndroidPhoneNotify.py2
-rw-r--r--module/plugins/hooks/AntiStandby.py12
-rw-r--r--module/plugins/hooks/AntiVirus.py18
-rw-r--r--module/plugins/hooks/BypassCaptcha.py2
-rw-r--r--module/plugins/hooks/Captcha9Kw.py2
-rw-r--r--module/plugins/hooks/CaptchaBrotherhood.py2
-rw-r--r--module/plugins/hooks/Checksum.py16
-rw-r--r--module/plugins/hooks/ClickNLoad.py12
-rw-r--r--module/plugins/hooks/DeathByCaptcha.py20
-rw-r--r--module/plugins/hooks/DeleteFinished.py8
-rw-r--r--module/plugins/hooks/DownloadScheduler.py2
-rw-r--r--module/plugins/hooks/ExpertDecoders.py2
-rw-r--r--module/plugins/hooks/ExternalScripts.py146
-rw-r--r--module/plugins/hooks/ExtractArchive.py27
-rw-r--r--module/plugins/hooks/HotFolder.py8
-rw-r--r--module/plugins/hooks/IRCInterface.py2
-rw-r--r--module/plugins/hooks/ImageTyperz.py2
-rw-r--r--module/plugins/hooks/JustPremium.py2
-rw-r--r--module/plugins/hooks/LinkdecrypterComHook.py2
-rw-r--r--module/plugins/hooks/LogMarker.py2
-rw-r--r--module/plugins/hooks/MergeFiles.py14
-rw-r--r--module/plugins/hooks/MultiHome.py2
-rw-r--r--module/plugins/hooks/RestartFailed.py4
-rw-r--r--module/plugins/hooks/SkipRev.py2
-rw-r--r--module/plugins/hooks/TransmissionRPC.py10
-rw-r--r--module/plugins/hooks/UnSkipOnFail.py2
-rw-r--r--module/plugins/hooks/UpdateManager.py38
-rw-r--r--module/plugins/hooks/UserAgentSwitcher.py2
-rw-r--r--module/plugins/hooks/WindowsPhoneNotify.py2
-rw-r--r--module/plugins/hooks/XFileSharingPro.py6
-rw-r--r--module/plugins/hooks/XMPPInterface.py2
-rw-r--r--module/plugins/hoster/AlldebridCom.py7
-rw-r--r--module/plugins/hoster/AndroidfilehostCom.py2
-rw-r--r--module/plugins/hoster/BasePlugin.py79
-rw-r--r--module/plugins/hoster/BasketbuildCom.py2
-rw-r--r--module/plugins/hoster/BayfilesCom.py4
-rw-r--r--module/plugins/hoster/BezvadataCz.py2
-rw-r--r--module/plugins/hoster/BillionuploadsCom.py4
-rw-r--r--module/plugins/hoster/BitshareCom.py2
-rw-r--r--module/plugins/hoster/BoltsharingCom.py4
-rw-r--r--module/plugins/hoster/CatShareNet.py2
-rw-r--r--module/plugins/hoster/CloudzerNet.py4
-rw-r--r--module/plugins/hoster/CloudzillaTo.py2
-rw-r--r--module/plugins/hoster/CramitIn.py2
-rw-r--r--module/plugins/hoster/CrockoCom.py2
-rw-r--r--module/plugins/hoster/CyberlockerCh.py4
-rw-r--r--module/plugins/hoster/CzshareCom.py4
-rw-r--r--module/plugins/hoster/DailymotionCom.py6
-rw-r--r--module/plugins/hoster/DataHu.py2
-rw-r--r--module/plugins/hoster/DataportCz.py2
-rw-r--r--module/plugins/hoster/DateiTo.py2
-rw-r--r--module/plugins/hoster/DdlstorageCom.py4
-rw-r--r--module/plugins/hoster/DebridItaliaCom.py2
-rw-r--r--module/plugins/hoster/DepositfilesCom.py2
-rw-r--r--module/plugins/hoster/DevhostSt.py2
-rw-r--r--module/plugins/hoster/DlFreeFr.py4
-rw-r--r--module/plugins/hoster/DodanePl.py4
-rw-r--r--module/plugins/hoster/DropboxCom.py2
-rw-r--r--module/plugins/hoster/DuploadOrg.py4
-rw-r--r--module/plugins/hoster/EasybytezCom.py2
-rw-r--r--module/plugins/hoster/EdiskCz.py2
-rw-r--r--module/plugins/hoster/EgoFilesCom.py4
-rw-r--r--module/plugins/hoster/EnteruploadCom.py4
-rw-r--r--module/plugins/hoster/EpicShareNet.py4
-rw-r--r--module/plugins/hoster/EuroshareEu.py10
-rw-r--r--module/plugins/hoster/ExashareCom.py2
-rw-r--r--module/plugins/hoster/ExtabitCom.py6
-rw-r--r--module/plugins/hoster/FastixRu.py6
-rw-r--r--module/plugins/hoster/FastshareCz.py2
-rw-r--r--module/plugins/hoster/FileApeCom.py4
-rw-r--r--module/plugins/hoster/FileSharkPl.py2
-rw-r--r--module/plugins/hoster/FileStoreTo.py2
-rw-r--r--module/plugins/hoster/FilebeerInfo.py4
-rw-r--r--module/plugins/hoster/FileboomMe.py2
-rw-r--r--module/plugins/hoster/FilecloudIo.py10
-rw-r--r--module/plugins/hoster/FiledropperCom.py2
-rw-r--r--module/plugins/hoster/FilefactoryCom.py8
-rw-r--r--module/plugins/hoster/FilejungleCom.py2
-rw-r--r--module/plugins/hoster/FileomCom.py2
-rw-r--r--module/plugins/hoster/FilepostCom.py6
-rw-r--r--module/plugins/hoster/FilepupNet.py2
-rw-r--r--module/plugins/hoster/FilerNet.py2
-rw-r--r--module/plugins/hoster/FilerioCom.py2
-rw-r--r--module/plugins/hoster/FilesMailRu.py10
-rw-r--r--module/plugins/hoster/FileserveCom.py14
-rw-r--r--module/plugins/hoster/FileshareInUa.py4
-rw-r--r--module/plugins/hoster/FilesonicCom.py4
-rw-r--r--module/plugins/hoster/FileuploadNet.py2
-rw-r--r--module/plugins/hoster/FilezyNet.py4
-rw-r--r--module/plugins/hoster/FiredriveCom.py4
-rw-r--r--module/plugins/hoster/FlyFilesNet.py2
-rw-r--r--module/plugins/hoster/FourSharedCom.py2
-rw-r--r--module/plugins/hoster/FreakshareCom.py14
-rw-r--r--module/plugins/hoster/FreeWayMe.py2
-rw-r--r--module/plugins/hoster/FreevideoCz.py4
-rw-r--r--module/plugins/hoster/FshareVn.py2
-rw-r--r--module/plugins/hoster/Ftp.py17
-rw-r--r--module/plugins/hoster/GamefrontCom.py2
-rw-r--r--module/plugins/hoster/GigapetaCom.py2
-rw-r--r--module/plugins/hoster/GooIm.py2
-rw-r--r--module/plugins/hoster/GoogledriveCom.py10
-rw-r--r--module/plugins/hoster/HellshareCz.py2
-rw-r--r--module/plugins/hoster/HellspyCz.py4
-rw-r--r--module/plugins/hoster/HighWayMe.py2
-rw-r--r--module/plugins/hoster/HostujeNet.py2
-rw-r--r--module/plugins/hoster/HotfileCom.py4
-rw-r--r--module/plugins/hoster/Http.py93
-rw-r--r--module/plugins/hoster/HugefilesNet.py2
-rw-r--r--module/plugins/hoster/HundredEightyUploadCom.py2
-rw-r--r--module/plugins/hoster/IFileWs.py4
-rw-r--r--module/plugins/hoster/IcyFilesCom.py4
-rw-r--r--module/plugins/hoster/IfileIt.py4
-rw-r--r--module/plugins/hoster/IfolderRu.py2
-rw-r--r--module/plugins/hoster/JumbofilesCom.py2
-rw-r--r--module/plugins/hoster/JunocloudMe.py2
-rw-r--r--module/plugins/hoster/Keep2ShareCc.py4
-rw-r--r--module/plugins/hoster/KickloadCom.py4
-rw-r--r--module/plugins/hoster/KingfilesNet.py2
-rw-r--r--module/plugins/hoster/LemUploadsCom.py4
-rw-r--r--module/plugins/hoster/LetitbitNet.py14
-rw-r--r--module/plugins/hoster/LinksnappyCom.py8
-rw-r--r--module/plugins/hoster/LoadTo.py2
-rw-r--r--module/plugins/hoster/LolabitsEs.py4
-rw-r--r--module/plugins/hoster/LomafileCom.py4
-rw-r--r--module/plugins/hoster/LuckyShareNet.py18
-rw-r--r--module/plugins/hoster/MediafireCom.py2
-rw-r--r--module/plugins/hoster/MegaCoNz.py18
-rw-r--r--module/plugins/hoster/MegaDebridEu.py8
-rw-r--r--module/plugins/hoster/MegaFilesSe.py4
-rw-r--r--module/plugins/hoster/MegaRapidCz.py2
-rw-r--r--module/plugins/hoster/MegaRapidoNet.py2
-rw-r--r--module/plugins/hoster/MegacrypterCom.py10
-rw-r--r--module/plugins/hoster/MegareleaseOrg.py4
-rw-r--r--module/plugins/hoster/MegasharesCom.py2
-rw-r--r--module/plugins/hoster/MegauploadCom.py4
-rw-r--r--module/plugins/hoster/MegavideoCom.py4
-rw-r--r--module/plugins/hoster/MovReelCom.py2
-rw-r--r--module/plugins/hoster/MultihostersCom.py2
-rw-r--r--module/plugins/hoster/MultishareCz.py4
-rw-r--r--module/plugins/hoster/MyfastfileCom.py6
-rw-r--r--module/plugins/hoster/MystoreTo.py2
-rw-r--r--module/plugins/hoster/MyvideoDe.py4
-rw-r--r--module/plugins/hoster/NahrajCz.py4
-rw-r--r--module/plugins/hoster/NarodRu.py2
-rw-r--r--module/plugins/hoster/NetloadIn.py4
-rw-r--r--module/plugins/hoster/NitroflareCom.py2
-rw-r--r--module/plugins/hoster/NoPremiumPl.py6
-rw-r--r--module/plugins/hoster/NosuploadCom.py2
-rw-r--r--module/plugins/hoster/NovafileCom.py2
-rw-r--r--module/plugins/hoster/NowDownloadSx.py2
-rw-r--r--module/plugins/hoster/NowVideoSx.py2
-rw-r--r--module/plugins/hoster/OboomCom.py6
-rw-r--r--module/plugins/hoster/OneFichierCom.py22
-rw-r--r--module/plugins/hoster/OpenloadIo.py10
-rw-r--r--module/plugins/hoster/OronCom.py4
-rw-r--r--module/plugins/hoster/OverLoadMe.py7
-rw-r--r--module/plugins/hoster/PandaplaNet.py4
-rw-r--r--module/plugins/hoster/PornhostCom.py2
-rw-r--r--module/plugins/hoster/PornhubCom.py2
-rw-r--r--module/plugins/hoster/PotloadCom.py4
-rw-r--r--module/plugins/hoster/PremiumTo.py6
-rw-r--r--module/plugins/hoster/PremiumizeMe.py6
-rw-r--r--module/plugins/hoster/PromptfileCom.py2
-rw-r--r--module/plugins/hoster/PrzeklejPl.py4
-rw-r--r--module/plugins/hoster/PutdriveCom.py2
-rw-r--r--module/plugins/hoster/QuickshareCz.py2
-rw-r--r--module/plugins/hoster/RPNetBiz.py8
-rw-r--r--module/plugins/hoster/RapideoPl.py6
-rw-r--r--module/plugins/hoster/RapidfileshareNet.py2
-rw-r--r--module/plugins/hoster/RapidgatorNet.py18
-rw-r--r--module/plugins/hoster/RapiduNet.py6
-rw-r--r--module/plugins/hoster/RarefileNet.py2
-rw-r--r--module/plugins/hoster/RealdebridCom.py7
-rw-r--r--module/plugins/hoster/RedtubeCom.py4
-rw-r--r--module/plugins/hoster/RehostTo.py2
-rw-r--r--module/plugins/hoster/RemixshareCom.py2
-rw-r--r--module/plugins/hoster/RgHostNet.py2
-rw-r--r--module/plugins/hoster/SafesharingEu.py2
-rw-r--r--module/plugins/hoster/SecureUploadEu.py2
-rw-r--r--module/plugins/hoster/SendspaceCom.py2
-rw-r--r--module/plugins/hoster/Share4WebCom.py2
-rw-r--r--module/plugins/hoster/Share76Com.py4
-rw-r--r--module/plugins/hoster/ShareFilesCo.py4
-rw-r--r--module/plugins/hoster/SharebeesCom.py4
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py6
-rw-r--r--module/plugins/hoster/ShareplaceCom.py2
-rw-r--r--module/plugins/hoster/SharingmatrixCom.py4
-rw-r--r--module/plugins/hoster/ShragleCom.py4
-rw-r--r--module/plugins/hoster/SimplyPremiumCom.py2
-rw-r--r--module/plugins/hoster/SimplydebridCom.py2
-rw-r--r--module/plugins/hoster/SizedriveCom.py2
-rw-r--r--module/plugins/hoster/SmoozedCom.py6
-rw-r--r--module/plugins/hoster/SockshareCom.py4
-rw-r--r--module/plugins/hoster/SolidfilesCom.py2
-rw-r--r--module/plugins/hoster/SoundcloudCom.py6
-rw-r--r--module/plugins/hoster/SpeedLoadOrg.py4
-rw-r--r--module/plugins/hoster/SpeedfileCz.py4
-rw-r--r--module/plugins/hoster/SpeedyshareCom.py2
-rw-r--r--module/plugins/hoster/StorageTo.py4
-rw-r--r--module/plugins/hoster/StreamCz.py2
-rw-r--r--module/plugins/hoster/StreamcloudEu.py2
-rw-r--r--module/plugins/hoster/TurbobitNet.py4
-rw-r--r--module/plugins/hoster/TurbouploadCom.py4
-rw-r--r--module/plugins/hoster/TusfilesNet.py5
-rw-r--r--module/plugins/hoster/TwoSharedCom.py2
-rw-r--r--module/plugins/hoster/UlozTo.py6
-rw-r--r--module/plugins/hoster/UloziskoSk.py2
-rw-r--r--module/plugins/hoster/UnibytesCom.py2
-rw-r--r--module/plugins/hoster/UnrestrictLi.py4
-rw-r--r--module/plugins/hoster/UpleaCom.py2
-rw-r--r--module/plugins/hoster/UploadStationCom.py4
-rw-r--r--module/plugins/hoster/UploadableCh.py2
-rw-r--r--module/plugins/hoster/UploadboxCom.py4
-rw-r--r--module/plugins/hoster/UploadedTo.py4
-rw-r--r--module/plugins/hoster/UploadhereCom.py4
-rw-r--r--module/plugins/hoster/UploadheroCom.py2
-rw-r--r--module/plugins/hoster/UploadingCom.py8
-rw-r--r--module/plugins/hoster/UploadkingCom.py4
-rw-r--r--module/plugins/hoster/UpstoreNet.py2
-rw-r--r--module/plugins/hoster/UptoboxCom.py2
-rw-r--r--module/plugins/hoster/UserscloudCom.py2
-rw-r--r--module/plugins/hoster/VeehdCom.py2
-rw-r--r--module/plugins/hoster/VeohCom.py2
-rw-r--r--module/plugins/hoster/VidPlayNet.py2
-rw-r--r--module/plugins/hoster/VimeoCom.py2
-rw-r--r--module/plugins/hoster/Vipleech4UCom.py4
-rw-r--r--module/plugins/hoster/VkCom.py2
-rw-r--r--module/plugins/hoster/WarserverCz.py4
-rw-r--r--module/plugins/hoster/WebshareCz.py18
-rw-r--r--module/plugins/hoster/WrzucTo.py2
-rw-r--r--module/plugins/hoster/WuploadCom.py4
-rw-r--r--module/plugins/hoster/X7To.py4
-rw-r--r--module/plugins/hoster/XFileSharingPro.py6
-rw-r--r--module/plugins/hoster/XHamsterCom.py6
-rw-r--r--module/plugins/hoster/XVideosCom.py2
-rw-r--r--module/plugins/hoster/XdadevelopersCom.py2
-rw-r--r--module/plugins/hoster/Xdcc.py9
-rw-r--r--module/plugins/hoster/YadiSk.py8
-rw-r--r--module/plugins/hoster/YibaishiwuCom.py6
-rw-r--r--module/plugins/hoster/YoupornCom.py2
-rw-r--r--module/plugins/hoster/YourfilesTo.py2
-rw-r--r--module/plugins/hoster/YoutubeCom.py4
-rw-r--r--module/plugins/hoster/ZDF.py2
-rw-r--r--module/plugins/hoster/ZShareNet.py4
-rw-r--r--module/plugins/hoster/ZahikiNet.py2
-rw-r--r--module/plugins/hoster/ZeveraCom.py2
-rw-r--r--module/plugins/hoster/ZippyshareCom.py2
-rw-r--r--module/plugins/internal/Account.py57
-rw-r--r--module/plugins/internal/Addon.py27
-rw-r--r--module/plugins/internal/Base.py231
-rw-r--r--module/plugins/internal/Captcha.py15
-rw-r--r--module/plugins/internal/CaptchaService.py2
-rw-r--r--module/plugins/internal/Container.py7
-rw-r--r--module/plugins/internal/Crypter.py9
-rw-r--r--module/plugins/internal/DeadCrypter.py4
-rw-r--r--module/plugins/internal/DeadHoster.py4
-rw-r--r--module/plugins/internal/Extractor.py30
-rw-r--r--module/plugins/internal/Hoster.py209
-rw-r--r--module/plugins/internal/MultiAccount.py252
-rw-r--r--module/plugins/internal/MultiCrypter.py8
-rw-r--r--module/plugins/internal/MultiHoster.py64
-rw-r--r--module/plugins/internal/OCR.py12
-rw-r--r--module/plugins/internal/Plugin.py321
-rw-r--r--module/plugins/internal/SevenZip.py9
-rw-r--r--module/plugins/internal/SimpleCrypter.py294
-rw-r--r--module/plugins/internal/SimpleHoster.py129
-rw-r--r--module/plugins/internal/UnRar.py33
-rw-r--r--module/plugins/internal/UnZip.py2
-rw-r--r--module/plugins/internal/XFSAccount.py26
-rw-r--r--module/plugins/internal/XFSCrypter.py8
-rw-r--r--module/plugins/internal/XFSHoster.py23
-rw-r--r--module/plugins/internal/utils.py433
467 files changed, 2532 insertions, 2162 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py
index 12d0582a8..73ba04a0e 100644
--- a/module/plugins/accounts/AlldebridCom.py
+++ b/module/plugins/accounts/AlldebridCom.py
@@ -6,13 +6,13 @@ import xml.dom.minidom as dom
import BeautifulSoup
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class AlldebridCom(Account):
+class AlldebridCom(MultiAccount):
__name__ = "AlldebridCom"
__type__ = "account"
- __version__ = "0.28"
+ __version__ = "0.29"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
diff --git a/module/plugins/accounts/AniStreamCom.py b/module/plugins/accounts/AniStreamCom.py
index 5c7ac9fff..fdbea5a2b 100644
--- a/module/plugins/accounts/AniStreamCom.py
+++ b/module/plugins/accounts/AniStreamCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class AniStreamCom(XFSAccount):
__name__ = "AniStreamCom"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__description__ = """Ani-Stream.com account plugin"""
diff --git a/module/plugins/accounts/BackinNet.py b/module/plugins/accounts/BackinNet.py
index d903f020c..8804139e6 100644
--- a/module/plugins/accounts/BackinNet.py
+++ b/module/plugins/accounts/BackinNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class BackinNet(XFSAccount):
__name__ = "BackinNet"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__description__ = """Backin.net account plugin"""
diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py
index e8028b9d0..5e9a5dc3b 100644
--- a/module/plugins/accounts/BitshareCom.py
+++ b/module/plugins/accounts/BitshareCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account
class BitshareCom(Account):
__name__ = "BitshareCom"
__type__ = "account"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__description__ = """Bitshare account plugin"""
diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py
index 6e11064a6..7fafaa20f 100644
--- a/module/plugins/accounts/CatShareNet.py
+++ b/module/plugins/accounts/CatShareNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class CatShareNet(Account):
__name__ = "CatShareNet"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__description__ = """Catshare.net account plugin"""
diff --git a/module/plugins/accounts/CloudsixMe.py b/module/plugins/accounts/CloudsixMe.py
index 3410af002..eeb886647 100644
--- a/module/plugins/accounts/CloudsixMe.py
+++ b/module/plugins/accounts/CloudsixMe.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class CloudsixMe(XFSAccount):
__name__ = "CloudsixMe"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__description__ = """Cloudsix.me account plugin"""
diff --git a/module/plugins/accounts/CloudzillaTo.py b/module/plugins/accounts/CloudzillaTo.py
index 821975ef0..30b17fb4e 100644
--- a/module/plugins/accounts/CloudzillaTo.py
+++ b/module/plugins/accounts/CloudzillaTo.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account
class CloudzillaTo(Account):
__name__ = "CloudzillaTo"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__description__ = """Cloudzilla.to account plugin"""
diff --git a/module/plugins/accounts/CramitIn.py b/module/plugins/accounts/CramitIn.py
index 084aa79a6..4b1ef4120 100644
--- a/module/plugins/accounts/CramitIn.py
+++ b/module/plugins/accounts/CramitIn.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class CramitIn(XFSAccount):
__name__ = "CramitIn"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__description__ = """Cramit.in account plugin"""
diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py
index fd02abe0f..01030da91 100644
--- a/module/plugins/accounts/CzshareCom.py
+++ b/module/plugins/accounts/CzshareCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class CzshareCom(Account):
__name__ = "CzshareCom"
__type__ = "account"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__description__ = """Czshare.com account plugin, now Sdilej.cz"""
diff --git a/module/plugins/accounts/DebridItaliaCom.py b/module/plugins/accounts/DebridItaliaCom.py
index 50d849a98..65f863d2e 100644
--- a/module/plugins/accounts/DebridItaliaCom.py
+++ b/module/plugins/accounts/DebridItaliaCom.py
@@ -3,13 +3,13 @@
import re
import time
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class DebridItaliaCom(Account):
+class DebridItaliaCom(MultiAccount):
__name__ = "DebridItaliaCom"
__type__ = "account"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
diff --git a/module/plugins/accounts/DepositfilesCom.py b/module/plugins/accounts/DepositfilesCom.py
index 35df3f939..836fe3dee 100644
--- a/module/plugins/accounts/DepositfilesCom.py
+++ b/module/plugins/accounts/DepositfilesCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class DepositfilesCom(Account):
__name__ = "DepositfilesCom"
__type__ = "account"
- __version__ = "0.36"
+ __version__ = "0.37"
__status__ = "testing"
__description__ = """Depositfiles.com account plugin"""
diff --git a/module/plugins/accounts/EasybytezCom.py b/module/plugins/accounts/EasybytezCom.py
index 9340f49e6..7599ce633 100644
--- a/module/plugins/accounts/EasybytezCom.py
+++ b/module/plugins/accounts/EasybytezCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class EasybytezCom(XFSAccount):
__name__ = "EasybytezCom"
__type__ = "account"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__config__ = [("mh_activated", "bool" , "Use multihoster feature" , True ),
diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py
index e5a05cd7f..78f45c532 100644
--- a/module/plugins/accounts/EuroshareEu.py
+++ b/module/plugins/accounts/EuroshareEu.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class EuroshareEu(Account):
__name__ = "EuroshareEu"
__type__ = "account"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """Euroshare.eu account plugin"""
diff --git a/module/plugins/accounts/ExashareCom.py b/module/plugins/accounts/ExashareCom.py
index 6b352e40e..95585ce2e 100644
--- a/module/plugins/accounts/ExashareCom.py
+++ b/module/plugins/accounts/ExashareCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class ExashareCom(XFSAccount):
__name__ = "ExashareCom"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__description__ = """Exashare.com account plugin"""
diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py
index 83a02d76b..777b07ce9 100644
--- a/module/plugins/accounts/FastixRu.py
+++ b/module/plugins/accounts/FastixRu.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class FastixRu(Account):
+class FastixRu(MultiAccount):
__name__ = "FastixRu"
__type__ = "account"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -23,13 +23,13 @@ class FastixRu(Account):
html = self.load("http://fastix.ru/api_v2",
get={'apikey': "5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y",
'sub' : "allowed_sources"})
- host_list = json_loads(html)
+ host_list = json.loads(html)
host_list = host_list['allow']
return host_list
def grab_info(self, user, password, data):
- html = json_loads(self.load("http://fastix.ru/api_v2/",
+ html = json.loads(self.load("http://fastix.ru/api_v2/",
get={'apikey': data['apikey'],
'sub' : "getaccountdetails"}))
@@ -44,7 +44,7 @@ class FastixRu(Account):
def signin(self, user, password, data):
- api = json_loads(self.load("https://fastix.ru/api_v2/",
+ api = json.loads(self.load("https://fastix.ru/api_v2/",
get={'sub' : "get_apikey",
'email' : user,
'password': password}))
diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py
index 68c65bd3f..4c370390c 100644
--- a/module/plugins/accounts/FastshareCz.py
+++ b/module/plugins/accounts/FastshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Plugin import set_cookie
class FastshareCz(Account):
__name__ = "FastshareCz"
__type__ = "account"
- __version__ = "0.11"
+ __version__ = "0.12"
__status__ = "testing"
__description__ = """Fastshare.cz account plugin"""
diff --git a/module/plugins/accounts/File4SafeCom.py b/module/plugins/accounts/File4SafeCom.py
index 8e5f437b3..462b66d6a 100644
--- a/module/plugins/accounts/File4SafeCom.py
+++ b/module/plugins/accounts/File4SafeCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class File4SafeCom(XFSAccount):
__name__ = "File4SafeCom"
__type__ = "account"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """File4Safe.com account plugin"""
diff --git a/module/plugins/accounts/FileParadoxIn.py b/module/plugins/accounts/FileParadoxIn.py
index 86183f4d3..1a3949583 100644
--- a/module/plugins/accounts/FileParadoxIn.py
+++ b/module/plugins/accounts/FileParadoxIn.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class FileParadoxIn(XFSAccount):
__name__ = "FileParadoxIn"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """FileParadox.in account plugin"""
diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py
index d80a8b9d6..96b8b6379 100644
--- a/module/plugins/accounts/FilecloudIo.py
+++ b/module/plugins/accounts/FilecloudIo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.Account import Account
from module.plugins.internal.Plugin import set_cookie
@@ -8,7 +8,7 @@ from module.plugins.internal.Plugin import set_cookie
class FilecloudIo(Account):
__name__ = "FilecloudIo"
__type__ = "account"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__description__ = """FilecloudIo account plugin"""
@@ -22,7 +22,7 @@ class FilecloudIo(Account):
for _i in xrange(5):
rep = self.load("https://secure.filecloud.io/api-fetch_apikey.api",
post={'username': user, 'password': password})
- rep = json_loads(rep)
+ rep = json.loads(rep)
if rep['status'] == "ok":
break
elif rep['status'] == "error" and rep['message'] == "no such user or wrong password":
@@ -35,7 +35,7 @@ class FilecloudIo(Account):
self.accounts[user]['akey'] = akey #: Saved for hoster plugin
rep = self.load("http://api.filecloud.io/api-fetch_account_details.api",
post={'akey': akey})
- rep = json_loads(rep)
+ rep = json.loads(rep)
if rep['is_premium'] == 1:
return {'validuntil': float(rep['premium_until']), 'trafficleft': -1}
diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py
index 0f8f709c6..fad99d6ad 100644
--- a/module/plugins/accounts/FilefactoryCom.py
+++ b/module/plugins/accounts/FilefactoryCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Account import Account
class FilefactoryCom(Account):
__name__ = "FilefactoryCom"
__type__ = "account"
- __version__ = "0.19"
+ __version__ = "0.20"
__status__ = "testing"
__description__ = """Filefactory.com account plugin"""
diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py
index 230aa9939..8c019c940 100644
--- a/module/plugins/accounts/FilejungleCom.py
+++ b/module/plugins/accounts/FilejungleCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Account import Account
class FilejungleCom(Account):
__name__ = "FilejungleCom"
__type__ = "account"
- __version__ = "0.16"
+ __version__ = "0.17"
__status__ = "testing"
__description__ = """Filejungle.com account plugin"""
diff --git a/module/plugins/accounts/FileomCom.py b/module/plugins/accounts/FileomCom.py
index 0bd0b60cf..429229a89 100644
--- a/module/plugins/accounts/FileomCom.py
+++ b/module/plugins/accounts/FileomCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class FileomCom(XFSAccount):
__name__ = "FileomCom"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Fileom.com account plugin"""
diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py
index 96bdebd81..26742bf4c 100644
--- a/module/plugins/accounts/FilerNet.py
+++ b/module/plugins/accounts/FilerNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class FilerNet(Account):
__name__ = "FilerNet"
__type__ = "account"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__description__ = """Filer.net account plugin"""
diff --git a/module/plugins/accounts/FilerioCom.py b/module/plugins/accounts/FilerioCom.py
index d843dd605..b225b404a 100644
--- a/module/plugins/accounts/FilerioCom.py
+++ b/module/plugins/accounts/FilerioCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class FilerioCom(XFSAccount):
__name__ = "FilerioCom"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__description__ = """FileRio.in account plugin"""
diff --git a/module/plugins/accounts/FilesMailRu.py b/module/plugins/accounts/FilesMailRu.py
index 551a7b8e5..da09c8569 100644
--- a/module/plugins/accounts/FilesMailRu.py
+++ b/module/plugins/accounts/FilesMailRu.py
@@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account
class FilesMailRu(Account):
__name__ = "FilesMailRu"
__type__ = "account"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__description__ = """Filesmail.ru account plugin"""
diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py
index bc56d4b96..2fe710012 100644
--- a/module/plugins/accounts/FileserveCom.py
+++ b/module/plugins/accounts/FileserveCom.py
@@ -3,13 +3,13 @@
import time
from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
class FileserveCom(Account):
__name__ = "FileserveCom"
__type__ = "account"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__description__ = """Fileserve.com account plugin"""
@@ -22,7 +22,7 @@ class FileserveCom(Account):
post={'username': user,
'password': password,
'submit': "Submit+Query"})
- res = json_loads(html)
+ res = json.loads(html)
if res['type'] == "premium":
validuntil = time.mktime(time.strptime(res['expireTime'], "%Y-%m-%d %H:%M:%S"))
@@ -36,7 +36,7 @@ class FileserveCom(Account):
post={'username': user,
'password': password,
'submit' : "Submit+Query"})
- res = json_loads(html)
+ res = json.loads(html)
if not res['type']:
self.fail_login()
diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py
index 08640dfa7..11801941b 100644
--- a/module/plugins/accounts/FourSharedCom.py
+++ b/module/plugins/accounts/FourSharedCom.py
@@ -7,7 +7,7 @@ from module.plugins.internal.Plugin import set_cookie
class FourSharedCom(Account):
__name__ = "FourSharedCom"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__description__ = """FourShared.com account plugin"""
diff --git a/module/plugins/accounts/FreakshareCom.py b/module/plugins/accounts/FreakshareCom.py
index 8cb0436fc..2ad8a48b5 100644
--- a/module/plugins/accounts/FreakshareCom.py
+++ b/module/plugins/accounts/FreakshareCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class FreakshareCom(Account):
__name__ = "FreakshareCom"
__type__ = "account"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__description__ = """Freakshare.com account plugin"""
diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py
index 5e214db35..f978e813d 100644
--- a/module/plugins/accounts/FreeWayMe.py
+++ b/module/plugins/accounts/FreeWayMe.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class FreeWayMe(Account):
+class FreeWayMe(MultiAccount):
__name__ = "FreeWayMe"
__type__ = "account"
- __version__ = "0.19"
+ __version__ = "0.20"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -60,4 +60,4 @@ class FreeWayMe(Account):
if answer == "Invalid login":
self.fail_login()
- return json_loads(answer)
+ return json.loads(answer)
diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py
index e692394ef..6008849f7 100644
--- a/module/plugins/accounts/FshareVn.py
+++ b/module/plugins/accounts/FshareVn.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class FshareVn(Account):
__name__ = "FshareVn"
__type__ = "account"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__description__ = """Fshare.vn account plugin"""
diff --git a/module/plugins/accounts/Ftp.py b/module/plugins/accounts/Ftp.py
index d73b557ef..12f40a89a 100644
--- a/module/plugins/accounts/Ftp.py
+++ b/module/plugins/accounts/Ftp.py
@@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account
class Ftp(Account):
__name__ = "Ftp"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Ftp dummy account plugin"""
diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py
index b0cd87938..2e7077796 100644
--- a/module/plugins/accounts/HellshareCz.py
+++ b/module/plugins/accounts/HellshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class HellshareCz(Account):
__name__ = "HellshareCz"
__type__ = "account"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__description__ = """Hellshare.cz account plugin"""
diff --git a/module/plugins/accounts/HighWayMe.py b/module/plugins/accounts/HighWayMe.py
index 3b39b7da6..d91dd52f4 100644
--- a/module/plugins/accounts/HighWayMe.py
+++ b/module/plugins/accounts/HighWayMe.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class HighWayMe(Account):
+class HighWayMe(MultiAccount):
__name__ = "HighWayMe.py"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -20,7 +20,7 @@ class HighWayMe(Account):
def grab_hosters(self, user, password, data):
- json_data = json_loads(self.load("https://high-way.me/api.php",
+ json_data = json.loads(self.load("https://high-way.me/api.php",
get={'hoster': 1}))
return [element['name'] for element in json_data['hoster']]
@@ -34,7 +34,7 @@ class HighWayMe(Account):
self.log_debug("JSON data: %s" % json_data)
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
if 'premium' in json_data['user'] and json_data['user']['premium']:
premium = True
diff --git a/module/plugins/accounts/Http.py b/module/plugins/accounts/Http.py
index 261b3b240..3240450f0 100644
--- a/module/plugins/accounts/Http.py
+++ b/module/plugins/accounts/Http.py
@@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account
class Http(Account):
__name__ = "Http"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Http dummy account plugin"""
diff --git a/module/plugins/accounts/HugefilesNet.py b/module/plugins/accounts/HugefilesNet.py
index a5920f4a4..fddc7cfa5 100644
--- a/module/plugins/accounts/HugefilesNet.py
+++ b/module/plugins/accounts/HugefilesNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class HugefilesNet(XFSAccount):
__name__ = "HugefilesNet"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Hugefiles.net account plugin"""
diff --git a/module/plugins/accounts/HundredEightyUploadCom.py b/module/plugins/accounts/HundredEightyUploadCom.py
index 8b757de61..ff9383379 100644
--- a/module/plugins/accounts/HundredEightyUploadCom.py
+++ b/module/plugins/accounts/HundredEightyUploadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class HundredEightyUploadCom(XFSAccount):
__name__ = "HundredEightyUploadCom"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__description__ = """180upload.com account plugin"""
diff --git a/module/plugins/accounts/JunkyvideoCom.py b/module/plugins/accounts/JunkyvideoCom.py
index 316332fd9..1a990b5f7 100644
--- a/module/plugins/accounts/JunkyvideoCom.py
+++ b/module/plugins/accounts/JunkyvideoCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class JunkyvideoCom(XFSAccount):
__name__ = "JunkyvideoCom"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__description__ = """Junkyvideo.com account plugin"""
diff --git a/module/plugins/accounts/JunocloudMe.py b/module/plugins/accounts/JunocloudMe.py
index 95bc57640..f2fe493a6 100644
--- a/module/plugins/accounts/JunocloudMe.py
+++ b/module/plugins/accounts/JunocloudMe.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class JunocloudMe(XFSAccount):
__name__ = "JunocloudMe"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Junocloud.me account plugin"""
diff --git a/module/plugins/accounts/Keep2ShareCc.py b/module/plugins/accounts/Keep2ShareCc.py
index 494f2938f..094a8ca79 100644
--- a/module/plugins/accounts/Keep2ShareCc.py
+++ b/module/plugins/accounts/Keep2ShareCc.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Plugin import set_cookie
class Keep2ShareCc(Account):
__name__ = "Keep2ShareCc"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__description__ = """Keep2Share.cc account plugin"""
diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py
index f7350e547..c272346a2 100644
--- a/module/plugins/accounts/LetitbitNet.py
+++ b/module/plugins/accounts/LetitbitNet.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.Account import Account
-# from module.common.json_layer import json_loads, json_dumps
+# from module.plugins.internal.utils import json
class LetitbitNet(Account):
__name__ = "LetitbitNet"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__description__ = """Letitbit.net account plugin"""
@@ -19,9 +19,9 @@ class LetitbitNet(Account):
## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ##
# json_data = [password, ['key/info']]
# api_rep = self.load("http://api.letitbit.net/json",
- # post={'r': json_dumps(json_data)})
+ # post={'r': json.dumps(json_data)})
# self.log_debug("API Key Info: " + api_rep)
- # api_rep = json_loads(api_rep)
+ # api_rep = json.loads(api_rep)
#
# if api_rep['status'] == "FAIL":
# self.log_warning(api_rep['data'])
diff --git a/module/plugins/accounts/LinksnappyCom.py b/module/plugins/accounts/LinksnappyCom.py
index 6953f311c..f22dffe15 100644
--- a/module/plugins/accounts/LinksnappyCom.py
+++ b/module/plugins/accounts/LinksnappyCom.py
@@ -2,14 +2,14 @@
import hashlib
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class LinksnappyCom(Account):
+class LinksnappyCom(MultiAccount):
__name__ = "LinksnappyCom"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -23,7 +23,7 @@ class LinksnappyCom(Account):
def grab_hosters(self, user, password, data):
json_data = self.load("http://gen.linksnappy.com/lseAPI.php", get={'act': "FILEHOSTS"})
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
return json_data['return'].keys()
@@ -36,7 +36,7 @@ class LinksnappyCom(Account):
self.log_debug("JSON data: " + r)
- j = json_loads(r)
+ j = json.loads(r)
if j['error']:
return {'premium': False}
diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py
index 46375716f..59f5b58be 100644
--- a/module/plugins/accounts/MegaDebridEu.py
+++ b/module/plugins/accounts/MegaDebridEu.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class MegaDebridEu(Account):
+class MegaDebridEu(MultiAccount):
__name__ = "MegaDebridEu"
__type__ = "account"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -25,7 +25,7 @@ class MegaDebridEu(Account):
def grab_hosters(self, user, password, data):
reponse = self.load("http://www.mega-debrid.eu/api.php", get={'action': "getHosters"})
- json_data = json_loads(reponse)
+ json_data = json.loads(reponse)
if json_data['response_code'] == "ok":
host_list = [element[0] for element in json_data['hosters']]
@@ -41,7 +41,7 @@ class MegaDebridEu(Account):
get={'action' : 'connectUser',
'login' : user,
'password': password})
- res = json_loads(jsonResponse)
+ res = json.loads(jsonResponse)
if res['response_code'] == "ok":
return {'premium': True, 'validuntil': float(res['vip_end']), 'status': True}
@@ -55,6 +55,6 @@ class MegaDebridEu(Account):
get={'action' : 'connectUser',
'login' : user,
'password': password})
- res = json_loads(jsonResponse)
+ res = json.loads(jsonResponse)
if res['response_code'] != "ok":
self.fail_login()
diff --git a/module/plugins/accounts/MegaRapidCz.py b/module/plugins/accounts/MegaRapidCz.py
index 050e3e4c6..ed9144138 100644
--- a/module/plugins/accounts/MegaRapidCz.py
+++ b/module/plugins/accounts/MegaRapidCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class MegaRapidCz(Account):
__name__ = "MegaRapidCz"
__type__ = "account"
- __version__ = "0.39"
+ __version__ = "0.40"
__status__ = "testing"
__description__ = """MegaRapid.cz account plugin"""
diff --git a/module/plugins/accounts/MegaRapidoNet.py b/module/plugins/accounts/MegaRapidoNet.py
index d8291e0e2..585d041de 100644
--- a/module/plugins/accounts/MegaRapidoNet.py
+++ b/module/plugins/accounts/MegaRapidoNet.py
@@ -3,13 +3,13 @@
import re
import time
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class MegaRapidoNet(Account):
+class MegaRapidoNet(MultiAccount):
__name__ = "MegaRapidoNet"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py
index 9b4fda9f7..9b4d74144 100644
--- a/module/plugins/accounts/MegasharesCom.py
+++ b/module/plugins/accounts/MegasharesCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class MegasharesCom(Account):
__name__ = "MegasharesCom"
__type__ = "account"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """Megashares.com account plugin"""
diff --git a/module/plugins/accounts/MovReelCom.py b/module/plugins/accounts/MovReelCom.py
index 1594a2b6a..ec8623685 100644
--- a/module/plugins/accounts/MovReelCom.py
+++ b/module/plugins/accounts/MovReelCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class MovReelCom(XFSAccount):
__name__ = "MovReelCom"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__description__ = """Movreel.com account plugin"""
diff --git a/module/plugins/accounts/MultihostersCom.py b/module/plugins/accounts/MultihostersCom.py
index 1ede88574..72c9096ad 100644
--- a/module/plugins/accounts/MultihostersCom.py
+++ b/module/plugins/accounts/MultihostersCom.py
@@ -6,7 +6,7 @@ from module.plugins.accounts.ZeveraCom import ZeveraCom
class MultihostersCom(ZeveraCom):
__name__ = "MultihostersCom"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__description__ = """Multihosters.com account plugin"""
diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py
index 16fa57948..3faad42c3 100644
--- a/module/plugins/accounts/MultishareCz.py
+++ b/module/plugins/accounts/MultishareCz.py
@@ -2,13 +2,13 @@
import re
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class MultishareCz(Account):
+class MultishareCz(MultiAccount):
__name__ = "MultishareCz"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py
index eff112a2f..ed527cf70 100644
--- a/module/plugins/accounts/MyfastfileCom.py
+++ b/module/plugins/accounts/MyfastfileCom.py
@@ -2,14 +2,14 @@
import time
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class MyfastfileCom(Account):
+class MyfastfileCom(MultiAccount):
__name__ = "MyfastfileCom"
__type__ = "account"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -24,7 +24,7 @@ class MyfastfileCom(Account):
def grab_hosters(self, user, password, data):
json_data = self.load("http://myfastfile.com/api.php", get={'hosts': ""})
self.log_debug("JSON data", json_data)
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
return json_data['hosts']
@@ -44,6 +44,6 @@ class MyfastfileCom(Account):
self.log_debug("JSON data: " + html)
- self.json_data = json_loads(html)
+ self.json_data = json.loads(html)
if self.json_data['status'] != 'ok':
self.fail_login(_("Invalid username or password"))
diff --git a/module/plugins/accounts/NitroflareCom.py b/module/plugins/accounts/NitroflareCom.py
index 0b9e67a7c..45587b8a0 100644
--- a/module/plugins/accounts/NitroflareCom.py
+++ b/module/plugins/accounts/NitroflareCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class NitroflareCom(Account):
__name__ = "NitroflareCom"
__type__ = "account"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__description__ = """Nitroflare.com account plugin"""
diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py
index f8236c978..b5cbd5a05 100644
--- a/module/plugins/accounts/NoPremiumPl.py
+++ b/module/plugins/accounts/NoPremiumPl.py
@@ -4,15 +4,14 @@ import datetime
import hashlib
import time
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
-# from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class NoPremiumPl(Account):
+class NoPremiumPl(MultiAccount):
__name__ = "NoPremiumPl"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -33,7 +32,7 @@ class NoPremiumPl(Account):
'info' : "1" }
def grab_hosters(self, user, password, data):
- hostings = json_loads(self.load("https://www.nopremium.pl/clipboard.php?json=3").strip())
+ hostings = json.loads(self.load("https://www.nopremium.pl/clipboard.php?json=3").strip())
hostings_domains = [domain for row in hostings for domain in row['domains'] if row['sdownload'] == "0"]
self.log_debug(hostings_domains)
@@ -43,7 +42,7 @@ class NoPremiumPl(Account):
def grab_info(self, user, password, data):
try:
- result = json_loads(self.run_auth_query())
+ result = json.loads(self.run_auth_query())
except Exception:
#@TODO: return or let it be thrown?
@@ -68,7 +67,7 @@ class NoPremiumPl(Account):
data['pwd'] = hashlib.sha1(hashlib.md5(password).hexdigest()).hexdigest()
try:
- response = json_loads(self.run_auth_query())
+ response = json.loads(self.run_auth_query())
except Exception:
self.fail_login()
diff --git a/module/plugins/accounts/NosuploadCom.py b/module/plugins/accounts/NosuploadCom.py
index 65ac8d4fc..e454c7151 100644
--- a/module/plugins/accounts/NosuploadCom.py
+++ b/module/plugins/accounts/NosuploadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class NosuploadCom(XFSAccount):
__name__ = "NosuploadCom"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Nosupload.com account plugin"""
diff --git a/module/plugins/accounts/NovafileCom.py b/module/plugins/accounts/NovafileCom.py
index 1506ec315..c20d2b66e 100644
--- a/module/plugins/accounts/NovafileCom.py
+++ b/module/plugins/accounts/NovafileCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class NovafileCom(XFSAccount):
__name__ = "NovafileCom"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Novafile.com account plugin"""
diff --git a/module/plugins/accounts/NowVideoSx.py b/module/plugins/accounts/NowVideoSx.py
index 3375207d9..9ff8f0172 100644
--- a/module/plugins/accounts/NowVideoSx.py
+++ b/module/plugins/accounts/NowVideoSx.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class NowVideoSx(Account):
__name__ = "NowVideoSx"
__type__ = "account"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """NowVideo.at account plugin"""
diff --git a/module/plugins/accounts/OboomCom.py b/module/plugins/accounts/OboomCom.py
index c19396854..e1ad9ca0f 100644
--- a/module/plugins/accounts/OboomCom.py
+++ b/module/plugins/accounts/OboomCom.py
@@ -16,14 +16,14 @@ except ImportError:
def hexread(self, octets):
return b2a_hex(pbkdf2(self.passphrase, self.salt, self.iterations, octets))
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.Account import Account
class OboomCom(Account):
__name__ = "OboomCom"
__type__ = "account"
- __version__ = "0.29"
+ __version__ = "0.30"
__status__ = "testing"
__description__ = """Oboom.com account plugin"""
@@ -35,7 +35,7 @@ class OboomCom(Account):
salt = password[::-1]
pbkdf2 = PBKDF2(password, salt, 1000).hexread(16)
- result = json_loads(self.load("http://www.oboom.com/1/login", #@TODO: Revert to `https` in 0.4.10
+ result = json.loads(self.load("http://www.oboom.com/1/login", #@TODO: Revert to `https` in 0.4.10
get={'auth': user,
'pass': pbkdf2}))
diff --git a/module/plugins/accounts/OneFichierCom.py b/module/plugins/accounts/OneFichierCom.py
index 01db3b088..ed741b373 100644
--- a/module/plugins/accounts/OneFichierCom.py
+++ b/module/plugins/accounts/OneFichierCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Account import Account
class OneFichierCom(Account):
__name__ = "OneFichierCom"
__type__ = "account"
- __version__ = "0.18"
+ __version__ = "0.19"
__status__ = "testing"
__description__ = """1fichier.com account plugin"""
diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py
index 02d0d2649..9a302672a 100644
--- a/module/plugins/accounts/OverLoadMe.py
+++ b/module/plugins/accounts/OverLoadMe.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class OverLoadMe(Account):
+class OverLoadMe(MultiAccount):
__name__ = "OverLoadMe"
__type__ = "account"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -30,7 +30,7 @@ class OverLoadMe(Account):
get={'user': user,
'auth': password}).strip()
- data = json_loads(html)
+ data = json.loads(html)
self.log_debug(data)
#: Check for premium
@@ -45,7 +45,7 @@ class OverLoadMe(Account):
get={'user': user,
'auth': password}).strip()
- data = json_loads(jsondata)
+ data = json.loads(jsondata)
if data['err'] == 1:
self.fail_login()
diff --git a/module/plugins/accounts/PremiumTo.py b/module/plugins/accounts/PremiumTo.py
index 74859d8a5..39e5012fa 100644
--- a/module/plugins/accounts/PremiumTo.py
+++ b/module/plugins/accounts/PremiumTo.py
@@ -1,12 +1,12 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class PremiumTo(Account):
+class PremiumTo(MultiAccount):
__name__ = "PremiumTo"
__type__ = "account"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py
index 2dc9b8a71..ac4c689e4 100644
--- a/module/plugins/accounts/PremiumizeMe.py
+++ b/module/plugins/accounts/PremiumizeMe.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class PremiumizeMe(Account):
+class PremiumizeMe(MultiAccount):
__name__ = "PremiumizeMe"
__type__ = "account"
- __version__ = "0.21"
+ __version__ = "0.22"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -26,7 +26,7 @@ class PremiumizeMe(Account):
get={'method' : "hosterlist",
'params[login]': user,
'params[pass]' : password})
- data = json_loads(answer)
+ data = json.loads(answer)
#: If account is not valid thera are no hosters available
if data['status'] != 200:
@@ -67,4 +67,4 @@ class PremiumizeMe(Account):
get={'method' : "accountstatus",
'params[login]': user,
'params[pass]' : password})
- return json_loads(answer)
+ return json.loads(answer)
diff --git a/module/plugins/accounts/PutdriveCom.py b/module/plugins/accounts/PutdriveCom.py
index 4da71f41b..81f219a40 100644
--- a/module/plugins/accounts/PutdriveCom.py
+++ b/module/plugins/accounts/PutdriveCom.py
@@ -6,7 +6,7 @@ from module.plugins.accounts.ZeveraCom import ZeveraCom
class PutdriveCom(ZeveraCom):
__name__ = "PutdriveCom"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Putdrive.com account plugin"""
diff --git a/module/plugins/accounts/QuickshareCz.py b/module/plugins/accounts/QuickshareCz.py
index 19cde51c4..5b67cf169 100644
--- a/module/plugins/accounts/QuickshareCz.py
+++ b/module/plugins/accounts/QuickshareCz.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account
class QuickshareCz(Account):
__name__ = "QuickshareCz"
__type__ = "account"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """Quickshare.cz account plugin"""
diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py
index 3b814debc..01f653483 100644
--- a/module/plugins/accounts/RPNetBiz.py
+++ b/module/plugins/accounts/RPNetBiz.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class RPNetBiz(Account):
+class RPNetBiz(MultiAccount):
__name__ = "RPNetBiz"
__type__ = "account"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -24,7 +24,7 @@ class RPNetBiz(Account):
get={'username': user,
'password': password,
'action' : "showHosterList"})
- hoster_list = json_loads(res)
+ hoster_list = json.loads(res)
#: If account is not valid thera are no hosters available
if 'error' in hoster_list:
@@ -68,4 +68,4 @@ class RPNetBiz(Account):
'action': "showAccountInformation"})
self.log_debug("JSON data: %s" % res)
- return json_loads(res)
+ return json.loads(res)
diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py
index fc17622b0..27c2a3d54 100644
--- a/module/plugins/accounts/RapideoPl.py
+++ b/module/plugins/accounts/RapideoPl.py
@@ -4,15 +4,14 @@ import datetime
import hashlib
import time
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
-# from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class RapideoPl(Account):
+class RapideoPl(MultiAccount):
__name__ = "RapideoPl"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -33,7 +32,7 @@ class RapideoPl(Account):
'info' : "1" }
def grab_hosters(self, user, password, data):
- hostings = json_loads(self.load("https://www.rapideo.pl/clipboard.php?json=3").strip())
+ hostings = json.loads(self.load("https://www.rapideo.pl/clipboard.php?json=3").strip())
hostings_domains = [domain for row in hostings for domain in row['domains'] if row['sdownload'] == "0"]
self.log_debug(hostings_domains)
@@ -43,7 +42,7 @@ class RapideoPl(Account):
def grab_info(self, user, password, data):
try:
- result = json_loads(self.run_auth_query())
+ result = json.loads(self.run_auth_query())
except Exception:
#@TODO: return or let it be thrown?
@@ -68,7 +67,7 @@ class RapideoPl(Account):
data['pwd'] = hashlib.md5(password).hexdigest()
try:
- response = json_loads(self.run_auth_query())
+ response = json.loads(self.run_auth_query())
except Exception:
self.fail_login()
diff --git a/module/plugins/accounts/RapidfileshareNet.py b/module/plugins/accounts/RapidfileshareNet.py
index a28c61b36..4c2778c1c 100644
--- a/module/plugins/accounts/RapidfileshareNet.py
+++ b/module/plugins/accounts/RapidfileshareNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class RapidfileshareNet(XFSAccount):
__name__ = "RapidfileshareNet"
__type__ = "account"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """Rapidfileshare.net account plugin"""
diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py
index ea6da4c4b..20b51b90f 100644
--- a/module/plugins/accounts/RapidgatorNet.py
+++ b/module/plugins/accounts/RapidgatorNet.py
@@ -3,13 +3,13 @@
import urlparse
from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import jso
class RapidgatorNet(Account):
__name__ = "RapidgatorNet"
__type__ = "account"
- __version__ = "0.15"
+ __version__ = "0.17"
__status__ = "testing"
__description__ = """Rapidgator.net account plugin"""
@@ -28,24 +28,23 @@ class RapidgatorNet(Account):
try:
sid = data.get('sid', None)
- assert sid
html = self.load(urlparse.urljoin(self.API_URL, "info"),
get={'sid': sid})
self.log_debug("API:USERINFO", html)
- json = json_loads(html)
+ jso = json.loads(html)
- if json['response_status'] == 200:
- if "reset_in" in json['response']:
- self._schedule_refresh(user, json['response']['reset_in'])
+ if jso['response_status'] == 200:
+ if "reset_in" in jso['response']:
+ self._schedule_refresh(user, jso['response']['reset_in'])
- validuntil = json['response']['expire_date']
- trafficleft = float(json['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10
+ validuntil = jso['response']['expire_date']
+ trafficleft = float(jso['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10
premium = True
else:
- self.log_error(json['response_details'])
+ self.log_error(jso['response_details'])
except Exception, e:
self.log_error(e, trace=True)
@@ -64,13 +63,13 @@ class RapidgatorNet(Account):
self.log_debug("API:LOGIN", html)
- json = json_loads(html)
+ jso = json.loads(html)
- if json['response_status'] == 200:
- data['sid'] = str(json['response']['session_id'])
+ if jso['response_status'] == 200:
+ data['sid'] = str(jso['response']['session_id'])
return
else:
- self.log_error(json['response_details'])
+ self.log_error(jso['response_details'])
except Exception, e:
self.log_error(e, trace=True)
diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py
index c11eb9214..cde39a361 100644
--- a/module/plugins/accounts/RapiduNet.py
+++ b/module/plugins/accounts/RapiduNet.py
@@ -4,13 +4,13 @@ import re
import time
from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
class RapiduNet(Account):
__name__ = "RapiduNet"
__type__ = "account"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__description__ = """Rapidu.net account plugin"""
@@ -53,14 +53,14 @@ class RapiduNet(Account):
post={'_go' : "",
'lang': "en"})
- json = json_loads(self.load("https://rapidu.net/ajax.php",
+ jso = json.loads(self.load("https://rapidu.net/ajax.php",
get={'a': "getUserLogin"},
post={'_go' : "",
'login' : user,
'pass' : password,
'remember': "1"}))
- self.log_debug(json)
+ self.log_debug(jso)
- if json['message'] != "success":
+ if jso['message'] != "success":
self.fail_login()
diff --git a/module/plugins/accounts/RarefileNet.py b/module/plugins/accounts/RarefileNet.py
index 0004c0f79..614dba00b 100644
--- a/module/plugins/accounts/RarefileNet.py
+++ b/module/plugins/accounts/RarefileNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class RarefileNet(XFSAccount):
__name__ = "RarefileNet"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__description__ = """RareFile.net account plugin"""
diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py
index 63ef62da0..d023a02c8 100644
--- a/module/plugins/accounts/RealdebridCom.py
+++ b/module/plugins/accounts/RealdebridCom.py
@@ -2,13 +2,13 @@
import xml.dom.minidom as dom
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class RealdebridCom(Account):
+class RealdebridCom(MultiAccount):
__name__ = "RealdebridCom"
__type__ = "account"
- __version__ = "0.50"
+ __version__ = "0.51"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py
index 4ff3f15a8..41e0be150 100644
--- a/module/plugins/accounts/RehostTo.py
+++ b/module/plugins/accounts/RehostTo.py
@@ -1,12 +1,12 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class RehostTo(Account):
+class RehostTo(MultiAccount):
__name__ = "RehostTo"
__type__ = "account"
- __version__ = "0.21"
+ __version__ = "0.22"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
diff --git a/module/plugins/accounts/RyushareCom.py b/module/plugins/accounts/RyushareCom.py
index 84b786bac..dd91a8853 100644
--- a/module/plugins/accounts/RyushareCom.py
+++ b/module/plugins/accounts/RyushareCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class RyushareCom(XFSAccount):
__name__ = "RyushareCom"
__type__ = "account"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__description__ = """Ryushare.com account plugin"""
diff --git a/module/plugins/accounts/SafesharingEu.py b/module/plugins/accounts/SafesharingEu.py
index 632b2bff8..17a48a62e 100644
--- a/module/plugins/accounts/SafesharingEu.py
+++ b/module/plugins/accounts/SafesharingEu.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class SafesharingEu(XFSAccount):
__name__ = "SafesharingEu"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Safesharing.eu account plugin"""
diff --git a/module/plugins/accounts/SecureUploadEu.py b/module/plugins/accounts/SecureUploadEu.py
index e3f2dbc4f..fef0506f0 100644
--- a/module/plugins/accounts/SecureUploadEu.py
+++ b/module/plugins/accounts/SecureUploadEu.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class SecureUploadEu(XFSAccount):
__name__ = "SecureUploadEu"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """SecureUpload.eu account plugin"""
diff --git a/module/plugins/accounts/SendmywayCom.py b/module/plugins/accounts/SendmywayCom.py
index a1675b654..8b9d4a934 100644
--- a/module/plugins/accounts/SendmywayCom.py
+++ b/module/plugins/accounts/SendmywayCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class SendmywayCom(XFSAccount):
__name__ = "SendmywayCom"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Sendmyway.com account plugin"""
diff --git a/module/plugins/accounts/SharebeastCom.py b/module/plugins/accounts/SharebeastCom.py
index b8ddbe34d..e4dc7c4b3 100644
--- a/module/plugins/accounts/SharebeastCom.py
+++ b/module/plugins/accounts/SharebeastCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class SharebeastCom(XFSAccount):
__name__ = "SharebeastCom"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__description__ = """Sharebeast.com account plugin"""
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py
index f5d213ecd..1083af99f 100644
--- a/module/plugins/accounts/ShareonlineBiz.py
+++ b/module/plugins/accounts/ShareonlineBiz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Plugin import set_cookie
class ShareonlineBiz(Account):
__name__ = "ShareonlineBiz"
__type__ = "account"
- __version__ = "0.41"
+ __version__ = "0.42"
__status__ = "testing"
__description__ = """Share-online.biz account plugin"""
diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py
index 2be8782ce..bd86f024c 100644
--- a/module/plugins/accounts/SimplyPremiumCom.py
+++ b/module/plugins/accounts/SimplyPremiumCom.py
@@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
from module.plugins.internal.Plugin import set_cookie
-class SimplyPremiumCom(Account):
+class SimplyPremiumCom(MultiAccount):
__name__ = "SimplyPremiumCom"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -22,7 +22,7 @@ class SimplyPremiumCom(Account):
def grab_hosters(self, user, password, data):
json_data = self.load("http://www.simply-premium.com/api/hosts.php", get={'format': "json", 'online': 1})
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
host_list = [element['regex'] for element in json_data['result']]
@@ -38,7 +38,7 @@ class SimplyPremiumCom(Account):
self.log_debug("JSON data: %s" % json_data)
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
if 'vip' in json_data['result'] and json_data['result']['vip']:
premium = True
diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py
index bd56dd5ec..94096b8a2 100644
--- a/module/plugins/accounts/SimplydebridCom.py
+++ b/module/plugins/accounts/SimplydebridCom.py
@@ -2,13 +2,13 @@
import time
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class SimplydebridCom(Account):
+class SimplydebridCom(MultiAccount):
__name__ = "SimplydebridCom"
__type__ = "account"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py
index 1c3da5269..78642dca1 100644
--- a/module/plugins/accounts/SmoozedCom.py
+++ b/module/plugins/accounts/SmoozedCom.py
@@ -19,14 +19,14 @@ except ImportError:
def hexread(self, octets):
return b2a_hex(pbkdf2(self.passphrase, self.salt, self.iterations, octets))
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class SmoozedCom(Account):
+class SmoozedCom(MultiAccount):
__name__ = "SmoozedCom"
__type__ = "account"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -83,6 +83,6 @@ class SmoozedCom(Account):
salt = hashlib.sha256(password).hexdigest()
encrypted = PBKDF2(password, salt, iterations=1000).hexread(32)
- return json_loads(self.load("http://www2.smoozed.com/api/login",
+ return json.loads(self.load("http://www2.smoozed.com/api/login",
get={'auth': user,
'password': encrypted}))
diff --git a/module/plugins/accounts/StreamcloudEu.py b/module/plugins/accounts/StreamcloudEu.py
index 54dd8e2fe..dc91cc3a7 100644
--- a/module/plugins/accounts/StreamcloudEu.py
+++ b/module/plugins/accounts/StreamcloudEu.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class StreamcloudEu(XFSAccount):
__name__ = "StreamcloudEu"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Streamcloud.eu account plugin"""
diff --git a/module/plugins/accounts/TurbobitNet.py b/module/plugins/accounts/TurbobitNet.py
index c3edd0c09..c8888c862 100644
--- a/module/plugins/accounts/TurbobitNet.py
+++ b/module/plugins/accounts/TurbobitNet.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Plugin import set_cookie
class TurbobitNet(Account):
__name__ = "TurbobitNet"
__type__ = "account"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """TurbobitNet account plugin"""
diff --git a/module/plugins/accounts/TusfilesNet.py b/module/plugins/accounts/TusfilesNet.py
index d826e5a3d..883a86cf1 100644
--- a/module/plugins/accounts/TusfilesNet.py
+++ b/module/plugins/accounts/TusfilesNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class TusfilesNet(XFSAccount):
__name__ = "TusfilesNet"
__type__ = "account"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__description__ = """Tusfile.net account plugin"""
diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py
index 8380099e1..0080375de 100644
--- a/module/plugins/accounts/UlozTo.py
+++ b/module/plugins/accounts/UlozTo.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class UlozTo(Account):
__name__ = "UlozTo"
__type__ = "account"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__description__ = """Uloz.to account plugin"""
diff --git a/module/plugins/accounts/UploadableCh.py b/module/plugins/accounts/UploadableCh.py
index eefa1f3a0..1dd9f5fc6 100644
--- a/module/plugins/accounts/UploadableCh.py
+++ b/module/plugins/accounts/UploadableCh.py
@@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account
class UploadableCh(Account):
__name__ = "UploadableCh"
__type__ = "account"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """Uploadable.ch account plugin"""
diff --git a/module/plugins/accounts/UploadcCom.py b/module/plugins/accounts/UploadcCom.py
index dbad01858..c9298f03d 100644
--- a/module/plugins/accounts/UploadcCom.py
+++ b/module/plugins/accounts/UploadcCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class UploadcCom(XFSAccount):
__name__ = "UploadcCom"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """Uploadc.com account plugin"""
diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py
index 1e92195a1..c689dc122 100644
--- a/module/plugins/accounts/UploadedTo.py
+++ b/module/plugins/accounts/UploadedTo.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class UploadedTo(Account):
__name__ = "UploadedTo"
__type__ = "account"
- __version__ = "0.38"
+ __version__ = "0.39"
__status__ = "testing"
__description__ = """Uploaded.to account plugin"""
diff --git a/module/plugins/accounts/UploadheroCom.py b/module/plugins/accounts/UploadheroCom.py
index c5e684033..c1dd8d5e9 100644
--- a/module/plugins/accounts/UploadheroCom.py
+++ b/module/plugins/accounts/UploadheroCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Account import Account
class UploadheroCom(Account):
__name__ = "UploadheroCom"
__type__ = "account"
- __version__ = "0.25"
+ __version__ = "0.26"
__status__ = "testing"
__description__ = """Uploadhero.co account plugin"""
diff --git a/module/plugins/accounts/UploadingCom.py b/module/plugins/accounts/UploadingCom.py
index 6c7103b21..c64c464da 100644
--- a/module/plugins/accounts/UploadingCom.py
+++ b/module/plugins/accounts/UploadingCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Plugin import set_cookies
class UploadingCom(Account):
__name__ = "UploadingCom"
__type__ = "account"
- __version__ = "0.16"
+ __version__ = "0.17"
__status__ = "testing"
__description__ = """Uploading.com account plugin"""
diff --git a/module/plugins/accounts/UptoboxCom.py b/module/plugins/accounts/UptoboxCom.py
index bdd037af8..c543193f3 100644
--- a/module/plugins/accounts/UptoboxCom.py
+++ b/module/plugins/accounts/UptoboxCom.py
@@ -3,14 +3,14 @@
import re
import urlparse
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.XFSAccount import XFSAccount
class UptoboxCom(XFSAccount):
__name__ = "UptoboxCom"
__type__ = "account"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__description__ = """Uptobox.com account plugin"""
@@ -39,5 +39,5 @@ class UptoboxCom(XFSAccount):
'password': password},
cookies=self.COOKIES)
- if json_loads(html).get('error'):
+ if json.loads(html).get('error'):
self.fail_login()
diff --git a/module/plugins/accounts/VidPlayNet.py b/module/plugins/accounts/VidPlayNet.py
index e54515faf..ad68469b6 100644
--- a/module/plugins/accounts/VidPlayNet.py
+++ b/module/plugins/accounts/VidPlayNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class VidPlayNet(XFSAccount):
__name__ = "VidPlayNet"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__description__ = """VidPlay.net account plugin"""
diff --git a/module/plugins/accounts/WebshareCz.py b/module/plugins/accounts/WebshareCz.py
index 484ea06ce..f7d50e74b 100644
--- a/module/plugins/accounts/WebshareCz.py
+++ b/module/plugins/accounts/WebshareCz.py
@@ -12,7 +12,7 @@ from module.plugins.internal.Account import Account
class WebshareCz(Account):
__name__ = "WebshareCz"
__type__ = "account"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__description__ = """Webshare.cz account plugin"""
diff --git a/module/plugins/accounts/WorldbytezCom.py b/module/plugins/accounts/WorldbytezCom.py
index 6987bc0cc..ddbc08ded 100644
--- a/module/plugins/accounts/WorldbytezCom.py
+++ b/module/plugins/accounts/WorldbytezCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class WorldbytezCom(XFSAccount):
__name__ = "WorldbytezCom"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__description__ = """Worldbytez.com account plugin"""
diff --git a/module/plugins/accounts/XFileSharingPro.py b/module/plugins/accounts/XFileSharingPro.py
index 68797b7f0..354fc6446 100644
--- a/module/plugins/accounts/XFileSharingPro.py
+++ b/module/plugins/accounts/XFileSharingPro.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class XFileSharingPro(XFSAccount):
__name__ = "XFileSharingPro"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__description__ = """XFileSharingPro multi-purpose account plugin"""
diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py
index 695dd79cd..3ff0c33d6 100644
--- a/module/plugins/accounts/YibaishiwuCom.py
+++ b/module/plugins/accounts/YibaishiwuCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account
class YibaishiwuCom(Account):
__name__ = "YibaishiwuCom"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__description__ = """115.com account plugin"""
diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py
index c94ad6db7..48219357f 100644
--- a/module/plugins/accounts/ZeveraCom.py
+++ b/module/plugins/accounts/ZeveraCom.py
@@ -2,13 +2,13 @@
import time
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class ZeveraCom(Account):
+class ZeveraCom(MultiAccount):
__name__ = "ZeveraCom"
__type__ = "account"
- __version__ = "0.30"
+ __version__ = "0.31"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
diff --git a/module/plugins/captcha/AdYouLike.py b/module/plugins/captcha/AdYouLike.py
index b10d2c399..c374c5bcf 100644
--- a/module/plugins/captcha/AdYouLike.py
+++ b/module/plugins/captcha/AdYouLike.py
@@ -2,14 +2,14 @@
import re
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.CaptchaService import CaptchaService
class AdYouLike(CaptchaService):
__name__ = "AdYouLike"
__type__ = "captcha"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """AdYouLike captcha service plugin"""
@@ -40,14 +40,14 @@ class AdYouLike(CaptchaService):
#: {'adyoulike':{'key':"P~zQ~O0zV0WTiAzC-iw0navWQpCLoYEP"},
#: 'all':{'element_id':"ayl_private_cap_92300",'lang':"fr",'env':"prod"}}
- ayl = json_loads(ayl)
+ ayl = json.loads(ayl)
html = self.plugin.load("http://api-ayl.appspot.com/challenge",
get={'key' : ayl['adyoulike']['key'],
'env' : ayl['all']['env'],
'callback': callback})
try:
- challenge = json_loads(re.search(callback + r'\s*\((.+?)\)', html).group(1))
+ challenge = json.loads(re.search(callback + r'\s*\((.+?)\)', html).group(1))
except AttributeError:
self.fail(_("AdYouLike challenge pattern not found"))
@@ -69,10 +69,10 @@ class AdYouLike(CaptchaService):
#: 'tid':"SqwuAdxT1EZoi4B5q0T63LN2AkiCJBg5"})
if isinstance(server, basestring):
- server = json_loads(server)
+ server = json.loads(server)
if isinstance(challenge, basestring):
- challenge = json_loads(challenge)
+ challenge = json.loads(challenge)
try:
instructions_visual = challenge['translations'][server['all']['lang']]['instructions_visual']
diff --git a/module/plugins/captcha/AdsCaptcha.py b/module/plugins/captcha/AdsCaptcha.py
index 7dc51565f..e8c578e96 100644
--- a/module/plugins/captcha/AdsCaptcha.py
+++ b/module/plugins/captcha/AdsCaptcha.py
@@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import CaptchaService
class AdsCaptcha(CaptchaService):
__name__ = "AdsCaptcha"
__type__ = "captcha"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__description__ = """AdsCaptcha captcha service plugin"""
diff --git a/module/plugins/captcha/CircleCaptcha.py b/module/plugins/captcha/CircleCaptcha.py
index dc04a04c8..98e54e5ed 100644
--- a/module/plugins/captcha/CircleCaptcha.py
+++ b/module/plugins/captcha/CircleCaptcha.py
@@ -31,7 +31,7 @@ class ImageSequence:
class CircleCaptcha(OCR):
__name__ = "CircleCaptcha"
__type__ = "ocr"
- __version__ = "1.04"
+ __version__ = "1.05"
__status__ = "testing"
__description__ = """Circle captcha ocr plugin"""
@@ -474,15 +474,15 @@ class CircleCaptcha(OCR):
#: Assial Simmetric
if self.pyload.debug:
- self.log_debug("Center: " + str(c),
- "Missing: " + str(missing),
- "Howmany: " + str(howmany),
- "Ratio: " + str(missing / howmany),
- "Missing consecutives: " + str(missingconsecutive),
- "Missing X lenght: " + str(minX) + ":" + str(maxX),
- "Missing Y lenght: " + str(minY) + ":" + str(maxY),
- "Ratio without consecutives: " + str((missing - missingconsecutive) / howmany),
- "List missing: " + str(missinglist))
+ self.log_debug("Center: %s" % c,
+ "Missing: %s" % missing,
+ "Howmany: %s" % howmany,
+ "Ratio: %s" % (missing / howmany),
+ "Missing consecutives: %s" % missingconsecutive,
+ "Missing X lenght: %s:%s" % (minX, maxX),
+ "Missing Y lenght: %s:%s" % (minY, maxY),
+ "Ratio without consecutives: %s" % ((missing - missingconsecutive) / howmany),
+ "List missing: %s" % missinglist)
#: Lenght of missing cannot be over 75% of diameter
@@ -711,7 +711,7 @@ class CircleCaptcha(OCR):
break
if self.pyload.debug:
- self.log_debug('Howmany opened circle? ' + str(len(found)) + ' ' + str(found))
+ self.log_debug("Howmany opened circle?", found)
#: Clean results
for c in found:
diff --git a/module/plugins/captcha/GigasizeCom.py b/module/plugins/captcha/GigasizeCom.py
index 12f123c41..bcaceee03 100644
--- a/module/plugins/captcha/GigasizeCom.py
+++ b/module/plugins/captcha/GigasizeCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.OCR import OCR
class GigasizeCom(OCR):
__name__ = "GigasizeCom"
__type__ = "ocr"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__description__ = """Gigasize.com ocr plugin"""
diff --git a/module/plugins/captcha/LinksaveIn.py b/module/plugins/captcha/LinksaveIn.py
index a9ccecf3c..283d9f6eb 100644
--- a/module/plugins/captcha/LinksaveIn.py
+++ b/module/plugins/captcha/LinksaveIn.py
@@ -15,7 +15,7 @@ from module.plugins.internal.OCR import OCR
class LinksaveIn(OCR):
__name__ = "LinksaveIn"
__type__ = "ocr"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__description__ = """Linksave.in ocr plugin"""
diff --git a/module/plugins/captcha/NetloadIn.py b/module/plugins/captcha/NetloadIn.py
index 50174684d..a7b2131c1 100644
--- a/module/plugins/captcha/NetloadIn.py
+++ b/module/plugins/captcha/NetloadIn.py
@@ -6,7 +6,7 @@ from module.plugins.internal.OCR import OCR
class NetloadIn(OCR):
__name__ = "NetloadIn"
__type__ = "ocr"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__description__ = """Netload.in ocr plugin"""
diff --git a/module/plugins/captcha/ReCaptcha.py b/module/plugins/captcha/ReCaptcha.py
index 379956be6..e2bd5e8ca 100644
--- a/module/plugins/captcha/ReCaptcha.py
+++ b/module/plugins/captcha/ReCaptcha.py
@@ -13,7 +13,7 @@ from module.plugins.internal.CaptchaService import CaptchaService
class ReCaptcha(CaptchaService):
__name__ = "ReCaptcha"
__type__ = "captcha"
- __version__ = "0.18"
+ __version__ = "0.19"
__status__ = "testing"
__description__ = """ReCaptcha captcha service plugin"""
diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py
index 19db6c4cd..da36fa910 100644
--- a/module/plugins/captcha/ShareonlineBiz.py
+++ b/module/plugins/captcha/ShareonlineBiz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.OCR import OCR
class ShareonlineBiz(OCR):
__name__ = "ShareonlineBiz"
__type__ = "ocr"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__description__ = """Shareonline.biz ocr plugin"""
diff --git a/module/plugins/captcha/SolveMedia.py b/module/plugins/captcha/SolveMedia.py
index 6629656b2..7acb7d85d 100644
--- a/module/plugins/captcha/SolveMedia.py
+++ b/module/plugins/captcha/SolveMedia.py
@@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import CaptchaService
class SolveMedia(CaptchaService):
__name__ = "SolveMedia"
__type__ = "captcha"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__description__ = """SolveMedia captcha service plugin"""
diff --git a/module/plugins/container/CCF.py b/module/plugins/container/CCF.py
index 7e0e962b3..f2cb4b2c2 100644
--- a/module/plugins/container/CCF.py
+++ b/module/plugins/container/CCF.py
@@ -2,18 +2,19 @@
from __future__ import with_statement
-import MultipartPostHandler
import re
import urllib2
+import MultipartPostHandler
+
from module.plugins.internal.Container import Container
-from module.utils import fs_encode, save_join as fs_join
+from module.plugins.internal.utils import encode, fs_join
class CCF(Container):
__name__ = "CCF"
__type__ = "container"
- __version__ = "0.25"
+ __version__ = "0.26"
__status__ = "testing"
__pattern__ = r'.+\.ccf$'
@@ -26,7 +27,7 @@ class CCF(Container):
def decrypt(self, pyfile):
- fs_filename = fs_encode(pyfile.url.strip())
+ fs_filename = encode(pyfile.url.strip())
opener = urllib2.build_opener(MultipartPostHandler.MultipartPostHandler)
dlc_content = opener.open('http://service.jdownloader.net/dlcrypt/getDLC.php',
@@ -34,8 +35,8 @@ class CCF(Container):
'filename': "test.ccf",
'upload' : open(fs_filename, "rb")}).read()
- download_folder = self.pyload.config.get("general", "download_folder")
- dlc_file = fs_join(download_folder, "tmp_%s.dlc" % pyfile.name)
+ dl_folder = self.pyload.config.get("general", "download_folder")
+ dlc_file = fs_join(dl_folder, "tmp_%s.dlc" % pyfile.name)
try:
dlc = re.search(r'<dlc>(.+)</dlc>', dlc_content, re.S).group(1).decode('base64')
diff --git a/module/plugins/container/DLC.py b/module/plugins/container/DLC.py
index 24300b358..a6afb9f85 100644
--- a/module/plugins/container/DLC.py
+++ b/module/plugins/container/DLC.py
@@ -8,16 +8,16 @@ import xml.dom.minidom
from Crypto.Cipher import AES
from module.plugins.internal.Container import Container
-from module.utils import decode, fs_encode
+from module.plugins.internal.utils import decode, encode
class DLC(Container):
__name__ = "DLC"
__type__ = "container"
- __version__ = "0.26"
+ __version__ = "0.27"
__status__ = "testing"
- __pattern__ = r'(.+\.dlc|[\w+^_]+==[\w+^_/]+==)$'
+ __pattern__ = r'(.+\.dlc|[\w\+^_]+==[\w\+^_/]+==)$'
__config__ = [("activated", "bool", "Activated", True)]
__description__ = """DLC container decrypter plugin"""
@@ -35,7 +35,7 @@ class DLC(Container):
def decrypt(self, pyfile):
- fs_filename = fs_encode(pyfile.url.strip())
+ fs_filename = encode(pyfile.url.strip())
with open(fs_filename) as dlc:
data = dlc.read().strip()
diff --git a/module/plugins/container/RSDF.py b/module/plugins/container/RSDF.py
index f156cf1eb..275a8fa14 100644
--- a/module/plugins/container/RSDF.py
+++ b/module/plugins/container/RSDF.py
@@ -8,13 +8,13 @@ import re
from Crypto.Cipher import AES
from module.plugins.internal.Container import Container
-from module.utils import fs_encode
+from module.plugins.internal.utils import encode
class RSDF(Container):
__name__ = "RSDF"
__type__ = "container"
- __version__ = "0.31"
+ __version__ = "0.32"
__status__ = "testing"
__pattern__ = r'.+\.rsdf$'
@@ -39,7 +39,7 @@ class RSDF(Container):
cipher = AES.new(KEY, AES.MODE_CFB, iv)
try:
- fs_filename = fs_encode(pyfile.url.strip())
+ fs_filename = encode(pyfile.url.strip())
with open(fs_filename, 'r') as rsdf:
data = rsdf.read()
diff --git a/module/plugins/container/TXT.py b/module/plugins/container/TXT.py
index 555c13b51..5d92fbf83 100644
--- a/module/plugins/container/TXT.py
+++ b/module/plugins/container/TXT.py
@@ -3,13 +3,13 @@
import codecs
from module.plugins.internal.Container import Container
-from module.utils import fs_encode
+from module.plugins.internal.utils import encode
class TXT(Container):
__name__ = "TXT"
__type__ = "container"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__pattern__ = r'.+\.(txt|text)$'
@@ -30,7 +30,7 @@ class TXT(Container):
except Exception:
encoding = "utf-8"
- fs_filename = fs_encode(pyfile.url.strip())
+ fs_filename = encode(pyfile.url.strip())
txt = codecs.open(fs_filename, 'r', encoding)
curPack = "Parsed links from %s" % pyfile.name
packages = {curPack:[],}
diff --git a/module/plugins/crypter/BitshareComFolder.py b/module/plugins/crypter/BitshareComFolder.py
index eb094dd2a..fc5e6705d 100644
--- a/module/plugins/crypter/BitshareComFolder.py
+++ b/module/plugins/crypter/BitshareComFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class BitshareComFolder(SimpleCrypter):
__name__ = "BitshareCom"
__type__ = "crypter"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?bitshare\.com/\?d=\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/C1NeonCom.py b/module/plugins/crypter/C1NeonCom.py
index 09acace63..21cb34d1b 100644
--- a/module/plugins/crypter/C1NeonCom.py
+++ b/module/plugins/crypter/C1NeonCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class C1NeonCom(DeadCrypter):
__name__ = "C1NeonCom"
__type__ = "crypter"
- __version__ = "0.06"
- __status__ = "testing"
+ __version__ = "0.07"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?c1neon\.com/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py
index 3b02ccef0..9bab183cc 100644
--- a/module/plugins/crypter/ChipDe.py
+++ b/module/plugins/crypter/ChipDe.py
@@ -1,17 +1,18 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.Crypter import Crypter
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class ChipDe(Crypter):
__name__ = "ChipDe"
__type__ = "crypter"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?chip\.de/video/.+\.html'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -31,3 +32,6 @@ class ChipDe(Crypter):
else:
self.urls = [f.group(1)]
self.log_debug("The file URL is %s" % self.urls[0])
+
+
+getInfo = create_getInfo(ChipDe)
diff --git a/module/plugins/crypter/CloudzillaToFolder.py b/module/plugins/crypter/CloudzillaToFolder.py
index 26fccde7b..583667b6d 100644
--- a/module/plugins/crypter/CloudzillaToFolder.py
+++ b/module/plugins/crypter/CloudzillaToFolder.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class CloudzillaToFolder(SimpleHoster):
__name__ = "CloudzillaTo"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/folder/(?P<ID>[\w^_]+)'
diff --git a/module/plugins/crypter/CrockoComFolder.py b/module/plugins/crypter/CrockoComFolder.py
index 6bcef85d1..ec4cf9c7a 100644
--- a/module/plugins/crypter/CrockoComFolder.py
+++ b/module/plugins/crypter/CrockoComFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class CrockoComFolder(SimpleCrypter):
__name__ = "CrockoCom"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?crocko\.com/f/.+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/CryptItCom.py b/module/plugins/crypter/CryptItCom.py
index be0094747..3db34613f 100644
--- a/module/plugins/crypter/CryptItCom.py
+++ b/module/plugins/crypter/CryptItCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class CryptItCom(DeadCrypter):
__name__ = "CryptItCom"
__type__ = "crypter"
- __version__ = "0.12"
- __status__ = "testing"
+ __version__ = "0.13"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?crypt-it\.com/(s|e|d|c)/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/CzshareComFolder.py b/module/plugins/crypter/CzshareComFolder.py
index d39f7d2a2..f77c4b19c 100644
--- a/module/plugins/crypter/CzshareComFolder.py
+++ b/module/plugins/crypter/CzshareComFolder.py
@@ -1,17 +1,18 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.Crypter import Crypter
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class CzshareComFolder(Crypter):
__name__ = "CzshareCom"
__type__ = "crypter"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/folders/.+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -32,3 +33,6 @@ class CzshareComFolder(Crypter):
self.error(_("FOLDER_PATTERN not found"))
self.urls.extend(re.findall(self.LINK_PATTERN, m.group(1)))
+
+
+getInfo = create_getInfo(CzshareComFolder)
diff --git a/module/plugins/crypter/DailymotionComFolder.py b/module/plugins/crypter/DailymotionComFolder.py
index 0abc720f1..71338b4c4 100644
--- a/module/plugins/crypter/DailymotionComFolder.py
+++ b/module/plugins/crypter/DailymotionComFolder.py
@@ -3,19 +3,18 @@
import re
import urlparse
-from module.common.json_layer import json_loads
-from module.plugins.internal.Crypter import Crypter
-from module.utils import save_join as fs_join
+from module.plugins.internal.Crypter import Crypter, create_getInfo
+from module.plugins.internal.utils import fs_join, json
class DailymotionComFolder(Crypter):
__name__ = "DailymotionCom"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?dailymotion\.com/((playlists/)?(?P<TYPE>playlist|user)/)?(?P<ID>[\w^_]+)(?(TYPE)|#)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -27,7 +26,7 @@ class DailymotionComFolder(Crypter):
def api_response(self, ref, data=None):
url = urlparse.urljoin("https://api.dailymotion.com/", ref)
html = self.load(url, get=data)
- return json_loads(html)
+ return json.loads(html)
def get_playlist_info(self, id):
@@ -104,3 +103,6 @@ class DailymotionComFolder(Crypter):
p_folder = fs_join(self.pyload.config.get("general", "download_folder"), p_owner, p_name)
self.log_debug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name))
self.packages.append((p_name, p_videos, p_folder)) #@NOTE: Folder is NOT recognized by pyload 0.4.9!
+
+
+getInfo = create_getInfo(DailymotionComFolder)
diff --git a/module/plugins/crypter/DataHuFolder.py b/module/plugins/crypter/DataHuFolder.py
index 1a961111d..df1ea0c37 100644
--- a/module/plugins/crypter/DataHuFolder.py
+++ b/module/plugins/crypter/DataHuFolder.py
@@ -8,11 +8,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class DataHuFolder(SimpleCrypter):
__name__ = "DataHu"
__type__ = "crypter"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?data\.hu/dir/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/DdlstorageComFolder.py b/module/plugins/crypter/DdlstorageComFolder.py
index bdd076b16..475e1e8ac 100644
--- a/module/plugins/crypter/DdlstorageComFolder.py
+++ b/module/plugins/crypter/DdlstorageComFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class DdlstorageComFolder(DeadCrypter):
__name__ = "DdlstorageCom"
__type__ = "crypter"
- __version__ = "0.04"
- __status__ = "testing"
+ __version__ = "0.05"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?ddlstorage\.com/folder/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/DepositfilesComFolder.py b/module/plugins/crypter/DepositfilesComFolder.py
index 70b397db3..1b6cc5bff 100644
--- a/module/plugins/crypter/DepositfilesComFolder.py
+++ b/module/plugins/crypter/DepositfilesComFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class DepositfilesComFolder(SimpleCrypter):
__name__ = "DepositfilesCom"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?depositfiles\.com/folders/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/Dereferer.py b/module/plugins/crypter/Dereferer.py
index 6ce2e7248..3e5b7cc4a 100644
--- a/module/plugins/crypter/Dereferer.py
+++ b/module/plugins/crypter/Dereferer.py
@@ -8,11 +8,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter
class Dereferer(SimpleCrypter):
__name__ = "Dereferer"
__type__ = "crypter"
- __version__ = "0.19"
+ __version__ = "0.20"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/.*?(?P<LINK>(?:ht|f)tps?://.+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py
index 92a50f580..ba7f07076 100644
--- a/module/plugins/crypter/DevhostStFolder.py
+++ b/module/plugins/crypter/DevhostStFolder.py
@@ -12,11 +12,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class DevhostStFolder(SimpleCrypter):
__name__ = "DevhostSt"
__type__ = "crypter"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?d-h\.st/users/(?P<USER>\w+)(/\?fld_id=(?P<ID>\d+))?'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py
index 760cbfaa6..f9b2a027c 100644
--- a/module/plugins/crypter/DlProtectCom.py
+++ b/module/plugins/crypter/DlProtectCom.py
@@ -11,11 +11,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class DlProtectCom(SimpleCrypter):
__name__ = "DlProtectCom"
__type__ = "crypter"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?dl-protect\.com/((en|fr)/)?\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py
index eae58d60c..b036bae94 100644
--- a/module/plugins/crypter/DuckCryptInfo.py
+++ b/module/plugins/crypter/DuckCryptInfo.py
@@ -4,17 +4,17 @@ import re
import BeautifulSoup
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class DuckCryptInfo(Crypter):
__name__ = "DuckCryptInfo"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?duckcrypt\.info/(folder|wait|link)/(\w+)/?(\w*)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -41,11 +41,11 @@ class DuckCryptInfo(Crypter):
def handle_folder(self, m):
html = self.load("http://duckcrypt.info/ajax/auth.php?hash=" + str(m.group(2)))
m = re.match(self.__pattern__, html)
- self.log_debug("Redirectet to " + str(m.group(0)))
+ self.log_debug("Redirect to " + m.group(0))
html = self.load(str(m.group(0)))
soup = BeautifulSoup.BeautifulSoup(html)
cryptlinks = soup.findAll("div", attrs={'class': "folderbox"})
- self.log_debug("Redirectet to " + str(cryptlinks))
+ self.log_debug("Redirect to " + cryptlinks)
if not cryptlinks:
self.error(_("No link found"))
for clink in cryptlinks:
@@ -59,3 +59,6 @@ class DuckCryptInfo(Crypter):
self.urls = [soup.find("iframe")['src']]
if not self.urls:
self.log_info(_("No link found"))
+
+
+getInfo = create_getInfo(DuckCryptInfo)
diff --git a/module/plugins/crypter/DuploadOrgFolder.py b/module/plugins/crypter/DuploadOrgFolder.py
index 36e7790ae..ad417c41f 100644
--- a/module/plugins/crypter/DuploadOrgFolder.py
+++ b/module/plugins/crypter/DuploadOrgFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class DuploadOrgFolder(DeadCrypter):
__name__ = "DuploadOrg"
__type__ = "crypter"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?dupload\.org/folder/\d+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/EasybytezComFolder.py b/module/plugins/crypter/EasybytezComFolder.py
index bbeef30bc..22bd34f8b 100644
--- a/module/plugins/crypter/EasybytezComFolder.py
+++ b/module/plugins/crypter/EasybytezComFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class EasybytezComFolder(XFSCrypter):
__name__ = "EasybytezCom"
__type__ = "crypter"
- __version__ = "0.11"
+ __version__ = "0.12"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?easybytez\.com/users/\d+/\d+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py
index 96eb92f7e..b72b76d7d 100644
--- a/module/plugins/crypter/EmbeduploadCom.py
+++ b/module/plugins/crypter/EmbeduploadCom.py
@@ -1,18 +1,19 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.Crypter import Crypter
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
from module.network.HTTPRequest import BadHeader
class EmbeduploadCom(Crypter):
__name__ = "EmbeduploadCom"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?embedupload\.com/\?d=.+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True ),
("subfolder_per_pack", "bool", "Create a subfolder for each package" , True ),
("preferedHoster" , "str" , "Prefered hoster list (bar-separated)", "embedupload"),
@@ -60,3 +61,6 @@ class EmbeduploadCom(Crypter):
except BadHeader:
pass
return new_links
+
+
+getInfo = create_getInfo(EmbeduploadCom)
diff --git a/module/plugins/crypter/FilebeerInfoFolder.py b/module/plugins/crypter/FilebeerInfoFolder.py
index f775c8695..67fc881f4 100644
--- a/module/plugins/crypter/FilebeerInfoFolder.py
+++ b/module/plugins/crypter/FilebeerInfoFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class FilebeerInfoFolder(DeadCrypter):
__name__ = "FilebeerInfo"
__type__ = "crypter"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?filebeer\.info/\d*~f\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/FilecloudIoFolder.py b/module/plugins/crypter/FilecloudIoFolder.py
index 63f6ad677..bee8fd7f1 100644
--- a/module/plugins/crypter/FilecloudIoFolder.py
+++ b/module/plugins/crypter/FilecloudIoFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FilecloudIoFolder(SimpleCrypter):
__name__ = "FilecloudIo"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(filecloud\.io|ifile\.it)/_\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py
index a516392f1..0f8b494f9 100644
--- a/module/plugins/crypter/FilecryptCc.py
+++ b/module/plugins/crypter/FilecryptCc.py
@@ -9,7 +9,7 @@ import urlparse
from Crypto.Cipher import AES
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.captcha.SolveMedia import SolveMedia
@@ -17,7 +17,7 @@ from module.plugins.captcha.SolveMedia import SolveMedia
class FilecryptCc(Crypter):
__name__ = "FilecryptCc"
__type__ = "crypter"
- __version__ = "0.20"
+ __version__ = "0.21"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+'
@@ -210,3 +210,6 @@ class FilecryptCc(Crypter):
links = filter(bool, text.split('\n'))
return links
+
+
+getInfo = create_getInfo(FilecryptCc)
diff --git a/module/plugins/crypter/FilefactoryComFolder.py b/module/plugins/crypter/FilefactoryComFolder.py
index 2d3634a1f..b8578f5e1 100644
--- a/module/plugins/crypter/FilefactoryComFolder.py
+++ b/module/plugins/crypter/FilefactoryComFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FilefactoryComFolder(SimpleCrypter):
__name__ = "FilefactoryCom"
__type__ = "crypter"
- __version__ = "0.33"
+ __version__ = "0.34"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?filefactory\.com/(?:f|folder)/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/FilerNetFolder.py b/module/plugins/crypter/FilerNetFolder.py
index 5a79b17e3..39c582a66 100644
--- a/module/plugins/crypter/FilerNetFolder.py
+++ b/module/plugins/crypter/FilerNetFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FilerNetFolder(SimpleCrypter):
__name__ = "FilerNet"
__type__ = "crypter"
- __version__ = "0.43"
+ __version__ = "0.44"
__status__ = "testing"
__pattern__ = r'https?://filer\.net/folder/\w{16}'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/FileserveComFolder.py b/module/plugins/crypter/FileserveComFolder.py
index af01338cb..8f672ddb8 100644
--- a/module/plugins/crypter/FileserveComFolder.py
+++ b/module/plugins/crypter/FileserveComFolder.py
@@ -2,17 +2,17 @@
import re
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class FileserveComFolder(Crypter):
__name__ = "FileserveCom"
__type__ = "crypter"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fileserve\.com/list/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -38,3 +38,6 @@ class FileserveComFolder(Crypter):
if new_links:
self.urls = [map(lambda s: "http://fileserve.com%s" % s, new_links)]
+
+
+getInfo = create_getInfo(FileserveComFolder)
diff --git a/module/plugins/crypter/FilesonicComFolder.py b/module/plugins/crypter/FilesonicComFolder.py
index 00ceb31f1..e90096102 100644
--- a/module/plugins/crypter/FilesonicComFolder.py
+++ b/module/plugins/crypter/FilesonicComFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class FilesonicComFolder(DeadCrypter):
__name__ = "FilesonicCom"
__type__ = "crypter"
- __version__ = "0.13"
- __status__ = "testing"
+ __version__ = "0.14"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?filesonic\.com/folder/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/FilestubeCom.py b/module/plugins/crypter/FilestubeCom.py
index c65296e8b..dccf2eecb 100644
--- a/module/plugins/crypter/FilestubeCom.py
+++ b/module/plugins/crypter/FilestubeCom.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FilestubeCom(SimpleCrypter):
__name__ = "FilestubeCom"
__type__ = "crypter"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?filestube\.(?:com|to)/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/FiletramCom.py b/module/plugins/crypter/FiletramCom.py
index 18960f605..7a6b0120f 100644
--- a/module/plugins/crypter/FiletramCom.py
+++ b/module/plugins/crypter/FiletramCom.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FiletramCom(SimpleCrypter):
__name__ = "FiletramCom"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?filetram\.com/[^/]+/.+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/FiredriveComFolder.py b/module/plugins/crypter/FiredriveComFolder.py
index 4a352d942..8c94dc390 100644
--- a/module/plugins/crypter/FiredriveComFolder.py
+++ b/module/plugins/crypter/FiredriveComFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class FiredriveComFolder(DeadCrypter):
__name__ = "FiredriveCom"
__type__ = "crypter"
- __version__ = "0.04"
- __status__ = "testing"
+ __version__ = "0.05"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/share/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py
index 519fb75c4..985875eab 100644
--- a/module/plugins/crypter/FourChanOrg.py
+++ b/module/plugins/crypter/FourChanOrg.py
@@ -5,17 +5,17 @@
import re
import urlparse
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class FourChanOrg(Crypter):
__name__ = "FourChanOrg"
__type__ = "crypter"
- __version__ = "0.34"
+ __version__ = "0.35"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -28,3 +28,6 @@ class FourChanOrg(Crypter):
pagehtml = self.load(pyfile.url)
images = set(re.findall(r'(images\.4chan\.org/[^/]*/src/[^"<]+)', pagehtml))
self.urls = [urlparse.urljoin("http://", image) for image in images]
+
+
+getInfo = create_getInfo(FourChanOrg)
diff --git a/module/plugins/crypter/FreakhareComFolder.py b/module/plugins/crypter/FreakhareComFolder.py
index 1f78470e2..a614fba4a 100644
--- a/module/plugins/crypter/FreakhareComFolder.py
+++ b/module/plugins/crypter/FreakhareComFolder.py
@@ -8,11 +8,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FreakhareComFolder(SimpleCrypter):
__name__ = "FreakhareCom"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?freakshare\.com/folder/.+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/FreetexthostCom.py b/module/plugins/crypter/FreetexthostCom.py
index 246d9ede9..e959be93f 100644
--- a/module/plugins/crypter/FreetexthostCom.py
+++ b/module/plugins/crypter/FreetexthostCom.py
@@ -8,11 +8,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FreetexthostCom(SimpleCrypter):
__name__ = "FreetexthostCom"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?freetexthost\.com/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/FshareVnFolder.py b/module/plugins/crypter/FshareVnFolder.py
index 3b947a057..e74799ee7 100644
--- a/module/plugins/crypter/FshareVnFolder.py
+++ b/module/plugins/crypter/FshareVnFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FshareVnFolder(SimpleCrypter):
__name__ = "FshareVn"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fshare\.vn/folder/.+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/FurLy.py b/module/plugins/crypter/FurLy.py
index 6f19bdbce..fbaed3629 100644
--- a/module/plugins/crypter/FurLy.py
+++ b/module/plugins/crypter/FurLy.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FurLy(SimpleCrypter):
__name__ = "FurLy"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fur\.ly/(\d/)?\w+'
diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py
index 6aed6ffba..a2448755e 100755
--- a/module/plugins/crypter/Go4UpCom.py
+++ b/module/plugins/crypter/Go4UpCom.py
@@ -4,17 +4,17 @@ import re
import urlparse
from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
-import json
+from module.plugins.internal.utils import json
class Go4UpCom(SimpleCrypter):
__name__ = "Go4UpCom"
__type__ = "crypter"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__pattern__ = r'http://go4up\.com/(dl/\w{12}|rd/\w{12}/\d+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True),
diff --git a/module/plugins/crypter/GooGl.py b/module/plugins/crypter/GooGl.py
index cbe44a5b3..b12fc606b 100644
--- a/module/plugins/crypter/GooGl.py
+++ b/module/plugins/crypter/GooGl.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
class GooGl(SimpleCrypter):
__name__ = "GooGl"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?goo\.gl/([a-zA-Z]+/)?\w+'
@@ -27,7 +27,7 @@ class GooGl(SimpleCrypter):
def get_links(self):
rep = self.load(self.API_URL, get={'shortUrl': self.pyfile.url})
self.log_debug("JSON data: " + rep)
- rep = json_loads(rep)
+ rep = json.loads(rep)
return [rep['longUrl']] if "longUrl" in rep else None
diff --git a/module/plugins/crypter/GoogledriveComFolder.py b/module/plugins/crypter/GoogledriveComFolder.py
index 2a687937e..3657f4102 100644
--- a/module/plugins/crypter/GoogledriveComFolder.py
+++ b/module/plugins/crypter/GoogledriveComFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class GoogledriveComFolder(SimpleCrypter):
__name__ = "GoogledriveCom"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?drive\.google\.com/folderview\?.*id=\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py
index f99b66f40..bfae5a765 100644
--- a/module/plugins/crypter/HoerbuchIn.py
+++ b/module/plugins/crypter/HoerbuchIn.py
@@ -4,17 +4,17 @@ import re
import BeautifulSoup
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class HoerbuchIn(Crypter):
__name__ = "HoerbuchIn"
__type__ = "crypter"
- __version__ = "0.62"
+ __version__ = "0.63"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/.+/|tp/out\.php\?.+|protection/folder_\d+\.html)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -62,3 +62,6 @@ class HoerbuchIn(Crypter):
links.append(self.req.lastEffectiveURL)
return links
+
+
+getInfo = create_getInfo(HoerbuchIn)
diff --git a/module/plugins/crypter/HotfileComFolder.py b/module/plugins/crypter/HotfileComFolder.py
index c5eab0490..24e401e81 100644
--- a/module/plugins/crypter/HotfileComFolder.py
+++ b/module/plugins/crypter/HotfileComFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class HotfileComFolder(DeadCrypter):
__name__ = "HotfileCom"
__type__ = "crypter"
- __version__ = "0.31"
- __status__ = "testing"
+ __version__ = "0.32"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?hotfile\.com/list/\w+/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/ILoadTo.py b/module/plugins/crypter/ILoadTo.py
index 7d73b898f..66ef3162a 100644
--- a/module/plugins/crypter/ILoadTo.py
+++ b/module/plugins/crypter/ILoadTo.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class ILoadTo(DeadCrypter):
__name__ = "ILoadTo"
__type__ = "crypter"
- __version__ = "0.12"
- __status__ = "testing"
+ __version__ = "0.13"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?iload\.to/go/\d+\-[\w\-.]+/'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/ImgurComAlbum.py b/module/plugins/crypter/ImgurComAlbum.py
index 6ae70df79..1cc73fa05 100644
--- a/module/plugins/crypter/ImgurComAlbum.py
+++ b/module/plugins/crypter/ImgurComAlbum.py
@@ -1,17 +1,17 @@
import re
from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
-from module.utils import uniqify
+from module.plugins.internal.utils import uniqify
class ImgurComAlbum(SimpleCrypter):
__name__ = "ImgurComAlbum"
__type__ = "crypter"
- __version__ = "0.52"
+ __version__ = "0.53"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.|m\.)?imgur\.com/(a|gallery|)/?\w{5,7}'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/JDlist.py b/module/plugins/crypter/JDlist.py
new file mode 100644
index 000000000..0da6641f7
--- /dev/null
+++ b/module/plugins/crypter/JDlist.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
+
+
+class JDlist(Crypter):
+ __name__ = "JDlist"
+ __type__ = "crypter"
+ __version__ = "0.02"
+ __status__ = "testing"
+
+ __pattern__ = r'jdlist://(?P<LIST>[\w\+^_]+==)'
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_subfolder" , "bool", "Save package to subfolder" , True),
+ ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
+
+ __description__ = """JDlist decrypter plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ def decrypt(self, pyfile):
+ self.urls.extend(self.info['pattern']['LIST'].decode('base64').split(','))
+
+
+getInfo = create_getInfo(JDlist)
diff --git a/module/plugins/crypter/LetitbitNetFolder.py b/module/plugins/crypter/LetitbitNetFolder.py
index 82e3a818f..7bd7fac6b 100644
--- a/module/plugins/crypter/LetitbitNetFolder.py
+++ b/module/plugins/crypter/LetitbitNetFolder.py
@@ -1,17 +1,18 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
-class LetitbitNetFolder(Crypter):
+
+class LinkCryptWs(Crypter):
__name__ = "LetitbitNet"
__type__ = "crypter"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?letitbit\.net/folder/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -33,3 +34,6 @@ class LetitbitNetFolder(Crypter):
self.error(_("FOLDER_PATTERN not found"))
self.urls.extend(re.findall(self.LINK_PATTERN, folder.group(0)))
+
+
+getInfo = create_getInfo(LinkCryptWs)
diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py
index 4f3cceebb..eaa901782 100644
--- a/module/plugins/crypter/LinkCryptWs.py
+++ b/module/plugins/crypter/LinkCryptWs.py
@@ -7,14 +7,14 @@ import pycurl
from Crypto.Cipher import AES
-from module.plugins.internal.Crypter import Crypter
-from module.utils import html_unescape
+from module.plugins.internal.Crypter import Crypter, create_getInfo
+from module.plugins.internal.utils import html_unescape
class LinkCryptWs(Crypter):
__name__ = "LinkCryptWs"
__type__ = "crypter"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?linkcrypt\.ws/(dir|container)/(?P<ID>\w+)'
@@ -316,3 +316,6 @@ class LinkCryptWs(Crypter):
self.log_debug("Package has %d links" % len(links))
return links
+
+
+getInfo = create_getInfo(LinkCryptWs)
diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py
index e4701a62a..576a7e581 100644
--- a/module/plugins/crypter/LinkSaveIn.py
+++ b/module/plugins/crypter/LinkSaveIn.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class LinkSaveIn(SimpleCrypter):
__name__ = "LinkSaveIn"
__type__ = "crypter"
- __version__ = "2.06"
+ __version__ = "2.07"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?linksave\.in/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py
index 999adcc79..2d2ace5a7 100644
--- a/module/plugins/crypter/LinkdecrypterCom.py
+++ b/module/plugins/crypter/LinkdecrypterCom.py
@@ -8,11 +8,11 @@ from module.plugins.internal.MultiCrypter import MultiCrypter
class LinkdecrypterCom(MultiCrypter):
__name__ = "LinkdecrypterCom"
__type__ = "crypter"
- __version__ = "0.33"
+ __version__ = "0.34"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py
index 853240b44..669e0ebe0 100644
--- a/module/plugins/crypter/LixIn.py
+++ b/module/plugins/crypter/LixIn.py
@@ -3,17 +3,17 @@
import re
import urlparse
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class LixIn(Crypter):
__name__ = "LixIn"
__type__ = "crypter"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?lix\.in/(?P<ID>.+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -60,3 +60,6 @@ class LixIn(Crypter):
else:
self.urls = [m.group(1)]
self.log_debug("Found link %s, adding to package" % self.urls[0])
+
+
+getInfo = create_getInfo(LixIn)
diff --git a/module/plugins/crypter/LofCc.py b/module/plugins/crypter/LofCc.py
index b25c9485a..dfac134b5 100644
--- a/module/plugins/crypter/LofCc.py
+++ b/module/plugins/crypter/LofCc.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class LofCc(DeadCrypter):
__name__ = "LofCc"
__type__ = "crypter"
- __version__ = "0.22"
- __status__ = "testing"
+ __version__ = "0.23"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?lof\.cc/(.+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/MBLinkInfo.py b/module/plugins/crypter/MBLinkInfo.py
index 98c63b9d4..4bb27fd41 100644
--- a/module/plugins/crypter/MBLinkInfo.py
+++ b/module/plugins/crypter/MBLinkInfo.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class MBLinkInfo(DeadCrypter):
__name__ = "MBLinkInfo"
__type__ = "crypter"
- __version__ = "0.04"
- __status__ = "testing"
+ __version__ = "0.05"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?mblink\.info/?\?id=(\d+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py
index 4ef330a3f..2d3efad42 100644
--- a/module/plugins/crypter/MediafireComFolder.py
+++ b/module/plugins/crypter/MediafireComFolder.py
@@ -1,19 +1,20 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.Crypter import Crypter
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
from module.plugins.hoster.MediafireCom import checkHTMLHeader
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
class MediafireComFolder(Crypter):
__name__ = "MediafireCom"
__type__ = "crypter"
- __version__ = "0.16"
+ __version__ = "0.17"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?mediafire\.com/(folder/|\?sharekey=|\?\w{13}($|[/#]))'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -44,7 +45,7 @@ class MediafireComFolder(Crypter):
folder_key = m.group(1)
self.log_debug("FOLDER KEY: %s" % folder_key)
- json_resp = json_loads(self.load("http://www.mediafire.com/api/folder/get_info.php",
+ json_resp = json.loads(self.load("http://www.mediafire.com/api/folder/get_info.php",
get={'folder_key' : folder_key,
'response_format': "json",
'version' : 1}))
@@ -58,3 +59,6 @@ class MediafireComFolder(Crypter):
self.offline()
else:
self.urls.append(url)
+
+
+getInfo = create_getInfo(MediafireComFolder)
diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py
index abdecff30..45e026d44 100644
--- a/module/plugins/crypter/MegaCoNzFolder.py
+++ b/module/plugins/crypter/MegaCoNzFolder.py
@@ -2,17 +2,17 @@
import re
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class MegaCoNzFolder(Crypter):
__name__ = "MegaCoNz"
__type__ = "crypter"
- __version__ = "0.06"
- __status__ = "testing"
+ __version__ = "0.07"
+ __status__ = "broken"
__pattern__ = r'(https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#F!(?P<ID>[\w^_]+)!(?P<KEY>[\w,\\-]+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -29,3 +29,6 @@ class MegaCoNzFolder(Crypter):
url = "https://mega.co.nz/#F!%s!%s" % re.match(self.__pattern__, pyfile.url).groups()
self.html = self.load("http://rapidgen.org/linkfinder", post={'linklisturl': url})
self.urls = re.findall(r'(https://mega(\.co)?\.nz/#N!.+?)<', self.html)
+
+
+getInfo = create_getInfo(MegaCoNzFolder)
diff --git a/module/plugins/crypter/MegaRapidCzFolder.py b/module/plugins/crypter/MegaRapidCzFolder.py
index d7e79db34..b3c4bc153 100644
--- a/module/plugins/crypter/MegaRapidCzFolder.py
+++ b/module/plugins/crypter/MegaRapidCzFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class MegaRapidCzFolder(SimpleCrypter):
__name__ = "MegaRapidCz"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/slozka/\d+/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/MegauploadComFolder.py b/module/plugins/crypter/MegauploadComFolder.py
index f1ac8ddf7..249892fa7 100644
--- a/module/plugins/crypter/MegauploadComFolder.py
+++ b/module/plugins/crypter/MegauploadComFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class MegauploadComFolder(DeadCrypter):
__name__ = "MegauploadCom"
__type__ = "crypter"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?megaupload\.com/(\?f|xml/folderfiles\.php\?.*&?folderid)=\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/Movie2KTo.py b/module/plugins/crypter/Movie2KTo.py
index 53636cda3..e4b41dd86 100644
--- a/module/plugins/crypter/Movie2KTo.py
+++ b/module/plugins/crypter/Movie2KTo.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class Movie2KTo(DeadCrypter):
__name__ = "Movie2KTo"
__type__ = "crypter"
- __version__ = "0.52"
- __status__ = "testing"
+ __version__ = "0.53"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?movie2k\.to/(.+)\.html'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py
index 8c512da28..4a963d351 100644
--- a/module/plugins/crypter/MultiUpOrg.py
+++ b/module/plugins/crypter/MultiUpOrg.py
@@ -9,11 +9,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class MultiUpOrg(SimpleCrypter):
__name__ = "MultiUpOrg"
__type__ = "crypter"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?multiup\.org/(en|fr)/(?P<TYPE>project|download|mirror)/\w+(/\w+)?'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py
index 034fdec0c..58da4d982 100644
--- a/module/plugins/crypter/MultiloadCz.py
+++ b/module/plugins/crypter/MultiloadCz.py
@@ -1,17 +1,18 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.Crypter import Crypter
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class MultiloadCz(Crypter):
__name__ = "MultiloadCz"
__type__ = "crypter"
- __version__ = "0.42"
+ __version__ = "0.43"
__status__ = "testing"
__pattern__ = r'http://(?:[^/]*\.)?multiload\.cz/(stahnout|slozka)/.+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package" , True),
("usedHoster" , "str" , "Prefered hoster list (bar-separated)", "" ),
@@ -42,3 +43,6 @@ class MultiloadCz(Crypter):
if not self.urls:
ignored_set = set(self.get_config('ignoredHoster').split('|'))
self.urls.extend(x[1] for x in m if x[0] not in ignored_set)
+
+
+getInfo = create_getInfo(MultiloadCz)
diff --git a/module/plugins/crypter/MultiuploadCom.py b/module/plugins/crypter/MultiuploadCom.py
index 358758b7a..f012dcbb4 100644
--- a/module/plugins/crypter/MultiuploadCom.py
+++ b/module/plugins/crypter/MultiuploadCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class MultiuploadCom(DeadCrypter):
__name__ = "MultiuploadCom"
__type__ = "crypter"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?multiupload\.(com|nl)/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py
index fe26aec52..fb0138cd5 100644
--- a/module/plugins/crypter/NCryptIn.py
+++ b/module/plugins/crypter/NCryptIn.py
@@ -5,18 +5,18 @@ import re
from Crypto.Cipher import AES
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
from module.plugins.captcha.ReCaptcha import ReCaptcha
class NCryptIn(Crypter):
__name__ = "NCryptIn"
__type__ = "crypter"
- __version__ = "1.37"
+ __version__ = "1.38"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?ncrypt\.in/(?P<TYPE>folder|link|frame)-([^/\?]+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -166,7 +166,7 @@ class NCryptIn(Crypter):
self.log_debug("CircleCaptcha protected")
captcha_img_url = "http://ncrypt.in/classes/captcha/circlecaptcha.php"
coords = self.captcha.decrypt(captcha_img_url, input_type="png", output_type='positional', ocr="CircleCaptcha")
- self.log_debug("Captcha resolved, coords [%s]" % str(coords))
+ self.log_debug("Captcha resolved, coords %s" % coords)
postData['circle.x'] = coords[0]
postData['circle.y'] = coords[1]
@@ -310,3 +310,6 @@ class NCryptIn(Crypter):
#: Log and return
self.log_debug("Block has %d links" % len(links))
return links
+
+
+getInfo = create_getInfo(NCryptIn)
diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py
index 5b992bf58..313fefa51 100644
--- a/module/plugins/crypter/NetfolderIn.py
+++ b/module/plugins/crypter/NetfolderIn.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class NetfolderIn(DeadCrypter):
__name__ = "NetfolderIn"
__type__ = "crypter"
- __version__ = "0.74"
- __status__ = "testing"
+ __version__ = "0.75"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?netfolder\.(in|me)/(folder\.php\?folder_id=)?(?P<ID>\w+)(?(1)|/\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/NitroflareComFolder.py b/module/plugins/crypter/NitroflareComFolder.py
index d6bdd6b98..86fbb7030 100644
--- a/module/plugins/crypter/NitroflareComFolder.py
+++ b/module/plugins/crypter/NitroflareComFolder.py
@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class NitroflareComFolder(SimpleCrypter):
__name__ = "NitroflareCom"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?nitroflare\.com/folder/(?P<USER>\d+)/(?P<ID>[\w=]+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -21,7 +21,7 @@ class NitroflareComFolder(SimpleCrypter):
def get_links(self):
- res = json_loads(self.load("http://nitroflare.com/ajax/folder.php",
+ res = json.loads(self.load("http://nitroflare.com/ajax/folder.php",
post={'userId' : self.info['pattern']['USER'],
'folder' : self.info['pattern']['ID'],
'page' : 1,
diff --git a/module/plugins/crypter/NosvideoCom.py b/module/plugins/crypter/NosvideoCom.py
index d186dd635..1ee0e55ba 100644
--- a/module/plugins/crypter/NosvideoCom.py
+++ b/module/plugins/crypter/NosvideoCom.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class NosvideoCom(SimpleCrypter):
__name__ = "NosvideoCom"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?nosvideo\.com/\?v=\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/OronComFolder.py b/module/plugins/crypter/OronComFolder.py
index 054a8c902..501a171b5 100644
--- a/module/plugins/crypter/OronComFolder.py
+++ b/module/plugins/crypter/OronComFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class OronComFolder(DeadCrypter):
__name__ = "OronCom"
__type__ = "crypter"
- __version__ = "0.12"
- __status__ = "testing"
+ __version__ = "0.13"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?oron\.com/folder/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/PastebinCom.py b/module/plugins/crypter/PastebinCom.py
index ed52a49cc..cc1270070 100644
--- a/module/plugins/crypter/PastebinCom.py
+++ b/module/plugins/crypter/PastebinCom.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class PastebinCom(SimpleCrypter):
__name__ = "PastebinCom"
__type__ = "crypter"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'https://(?:www\.)?pastebin\.com/(.+i=)?(?P<ID>\w{8})'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/PastedCo.py b/module/plugins/crypter/PastedCo.py
index c57d4e6c5..8a0827cff 100644
--- a/module/plugins/crypter/PastedCo.py
+++ b/module/plugins/crypter/PastedCo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
import re
@@ -8,7 +8,7 @@ import re
class PastedCo(Crypter):
__name__ = "PastedCo"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'http://pasted\.co/\w+'
@@ -43,3 +43,6 @@ class PastedCo(Crypter):
urls = urls[urls.find(PastedCo.FS_URL_PREFIX) + len(PastedCo.FS_URL_PREFIX):]
urls = urls[:urls.find(PastedCo.FS_URL_SUFFIX)].splitlines()
self.packages.append((package_name, urls, package_folder))
+
+
+getInfo = create_getInfo(PastedCo)
diff --git a/module/plugins/crypter/QuickshareCzFolder.py b/module/plugins/crypter/QuickshareCzFolder.py
index cb51392f2..6d517983f 100644
--- a/module/plugins/crypter/QuickshareCzFolder.py
+++ b/module/plugins/crypter/QuickshareCzFolder.py
@@ -1,17 +1,18 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.Crypter import Crypter
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class QuickshareCzFolder(Crypter):
__name__ = "QuickshareCz"
__type__ = "crypter"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?quickshare\.cz/slozka-\d+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -31,3 +32,6 @@ class QuickshareCzFolder(Crypter):
if m is None:
self.error(_("FOLDER_PATTERN not found"))
self.urls.extend(re.findall(self.LINK_PATTERN, m.group(1)))
+
+
+getInfo = create_getInfo(QuickshareCzFolder)
diff --git a/module/plugins/crypter/RSLayerCom.py b/module/plugins/crypter/RSLayerCom.py
index c8637279b..5910ee91a 100644
--- a/module/plugins/crypter/RSLayerCom.py
+++ b/module/plugins/crypter/RSLayerCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class RSLayerCom(DeadCrypter):
__name__ = "RSLayerCom"
__type__ = "crypter"
- __version__ = "0.22"
- __status__ = "testing"
+ __version__ = "0.23"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?rs-layer\.com/directory-'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py
index ea0ce6072..21e8ab17b 100644
--- a/module/plugins/crypter/RelinkUs.py
+++ b/module/plugins/crypter/RelinkUs.py
@@ -3,22 +3,23 @@
from __future__ import with_statement
import binascii
-import re
import os
+import re
from Crypto.Cipher import AES
-from module.plugins.internal.Crypter import Crypter
-from module.utils import save_join as fs_join
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
+from module.plugins.internal.utils import fs_join
class RelinkUs(Crypter):
__name__ = "RelinkUs"
__type__ = "crypter"
- __version__ = "3.14"
+ __version__ = "3.15"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?relink\.us/(f/|((view|go)\.php\?id=))(?P<ID>.+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -144,7 +145,7 @@ class RelinkUs(Crypter):
self.log_debug("Request user positional captcha resolving")
captcha_img_url = self.CAPTCHA_IMG_URL + "?id=%s" % self.fileid
coords = self.captcha.decrypt(captcha_img_url, input_type="png", output_type='positional', ocr="CircleCaptcha")
- self.log_debug("Captcha resolved, coords [%s]" % str(coords))
+ self.log_debug("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)
@@ -291,3 +292,6 @@ class RelinkUs(Crypter):
#: Log and return
self.log_debug("Package has %d links" % len(links))
return links
+
+
+getInfo = create_getInfo(RelinkUs)
diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py
index 734f62e6d..adacb0da6 100644
--- a/module/plugins/crypter/SafelinkingNet.py
+++ b/module/plugins/crypter/SafelinkingNet.py
@@ -4,19 +4,19 @@ import re
import BeautifulSoup
-from module.common.json_layer import json_loads
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.utils import json
+from module.plugins.internal.Crypter import Crypter, create_getInfo
from module.plugins.captcha.SolveMedia import SolveMedia
class SafelinkingNet(Crypter):
__name__ = "SafelinkingNet"
__type__ = "crypter"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -76,9 +76,12 @@ class SafelinkingNet(Crypter):
break
m = re.search('d_links":(\[.*?\])', s.text)
if m is not None:
- linkDict = json_loads(m.group(1))
+ linkDict = json.loads(m.group(1))
for link in linkDict:
if not "http://" in link['full']:
self.urls.append("https://safelinking.net/d/" + link['full'])
else:
self.urls.append(link['full'])
+
+
+getInfo = create_getInfo(SafelinkingNet)
diff --git a/module/plugins/crypter/SecuredIn.py b/module/plugins/crypter/SecuredIn.py
index 4731e41f4..d668b529b 100644
--- a/module/plugins/crypter/SecuredIn.py
+++ b/module/plugins/crypter/SecuredIn.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class SecuredIn(DeadCrypter):
__name__ = "SecuredIn"
__type__ = "crypter"
- __version__ = "0.22"
- __status__ = "testing"
+ __version__ = "0.23"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?secured\.in/download-[\d]+\-\w{8}\.html'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py
index 42a322dd3..005c1c92e 100644
--- a/module/plugins/crypter/SexuriaCom.py
+++ b/module/plugins/crypter/SexuriaCom.py
@@ -1,16 +1,18 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.Crypter import Crypter
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
+
class SexuriaCom(Crypter):
__name__ = "SexuriaCom"
__type__ = "crypter"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_\d+_\d+\.html|id=\d+\&part=\d+\&link=\d+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
@@ -105,3 +107,6 @@ class SexuriaCom(Crypter):
#: All done, return to caller
return name, linklist, folder, password
+
+
+getInfo = create_getInfo(SexuriaCom)
diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py
index 99c2f0db1..cec6f2219 100644
--- a/module/plugins/crypter/ShSt.py
+++ b/module/plugins/crypter/ShSt.py
@@ -1,15 +1,16 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Crypter import Crypter
+import re
import pycurl
-import re
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class ShSt(Crypter):
__name__ = "ShSt"
__type__ = "crypter"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'http://sh\.st/\w+'
@@ -30,3 +31,6 @@ class ShSt(Crypter):
header = self.load(self.pyfile.url, just_header = True, decode = False)
target_url = header.get('location')
self.urls.append(target_url)
+
+
+getInfo = create_getInfo(ShSt)
diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py
index 124a3a5b4..a9deb1068 100644
--- a/module/plugins/crypter/ShareLinksBiz.py
+++ b/module/plugins/crypter/ShareLinksBiz.py
@@ -4,17 +4,18 @@ import binascii
import re
from Crypto.Cipher import AES
-from module.plugins.internal.Crypter import Crypter
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class ShareLinksBiz(Crypter):
__name__ = "ShareLinksBiz"
__type__ = "crypter"
- __version__ = "1.18"
+ __version__ = "1.19"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P<ID>_?\w+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -132,7 +133,7 @@ class ShareLinksBiz(Crypter):
captchaUrl = self.base_url + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2))
self.log_debug("Waiting user for correct position")
coords = self.captcha.decrypt(captchaUrl, input_type="gif", output_type='positional')
- self.log_debug("Captcha resolved, coords [%s]" % str(coords))
+ self.log_debug("Captcha resolved, coords %s" % coords)
#: Resolve captcha
href = self._resolve_coords(coords, captchaMap)
@@ -294,3 +295,6 @@ class ShareLinksBiz(Crypter):
#: Log and return
self.log_debug("Block has %d links" % len(links))
return links
+
+
+getInfo = create_getInfo(ShareLinksBiz)
diff --git a/module/plugins/crypter/SharingmatrixComFolder.py b/module/plugins/crypter/SharingmatrixComFolder.py
index d7c467933..5b273346a 100644
--- a/module/plugins/crypter/SharingmatrixComFolder.py
+++ b/module/plugins/crypter/SharingmatrixComFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class SharingmatrixComFolder(DeadCrypter):
__name__ = "SharingmatrixCom"
__type__ = "crypter"
- __version__ = "0.02"
- __status__ = "testing"
+ __version__ = "0.03"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?sharingmatrix\.com/folder/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/SpeedLoadOrgFolder.py b/module/plugins/crypter/SpeedLoadOrgFolder.py
index fcf2cea05..6c13ddfe1 100644
--- a/module/plugins/crypter/SpeedLoadOrgFolder.py
+++ b/module/plugins/crypter/SpeedLoadOrgFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class SpeedLoadOrgFolder(DeadCrypter):
__name__ = "SpeedLoadOrg"
__type__ = "crypter"
- __version__ = "0.31"
- __status__ = "testing"
+ __version__ = "0.32"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?speedload\.org/(\d+~f$|folder/\d+/)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/StealthTo.py b/module/plugins/crypter/StealthTo.py
index 3a175cd87..07bd282aa 100644
--- a/module/plugins/crypter/StealthTo.py
+++ b/module/plugins/crypter/StealthTo.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class StealthTo(DeadCrypter):
__name__ = "StealthTo"
__type__ = "crypter"
- __version__ = "0.21"
- __status__ = "testing"
+ __version__ = "0.22"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?stealth\.to/folder/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/TNTVillageScambioeticoOrg.py b/module/plugins/crypter/TNTVillageScambioeticoOrg.py
index 567e7f752..bc6f9663a 100644
--- a/module/plugins/crypter/TNTVillageScambioeticoOrg.py
+++ b/module/plugins/crypter/TNTVillageScambioeticoOrg.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class TNTVillageScambioeticoOrg(SimpleCrypter):
__name__ = "TNTVillageScambioeticoOrg"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?forum\.tntvillage\.scambioetico\.org/index\.php\?.*showtopic=\d+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/TinyurlCom.py b/module/plugins/crypter/TinyurlCom.py
index b630cd86e..3c904a454 100644
--- a/module/plugins/crypter/TinyurlCom.py
+++ b/module/plugins/crypter/TinyurlCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class TinyurlCom(SimpleCrypter):
__name__ = "TinyurlCom"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(preview\.)?tinyurl\.com/[\w\-]+'
diff --git a/module/plugins/crypter/TnyCz.py b/module/plugins/crypter/TnyCz.py
index 07cfeb728..078b4f001 100644
--- a/module/plugins/crypter/TnyCz.py
+++ b/module/plugins/crypter/TnyCz.py
@@ -8,11 +8,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class TnyCz(SimpleCrypter):
__name__ = "TnyCz"
__type__ = "crypter"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?tny\.cz/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/TrailerzoneInfo.py b/module/plugins/crypter/TrailerzoneInfo.py
index 03ab004a3..dad2b5154 100644
--- a/module/plugins/crypter/TrailerzoneInfo.py
+++ b/module/plugins/crypter/TrailerzoneInfo.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class TrailerzoneInfo(DeadCrypter):
__name__ = "TrailerzoneInfo"
__type__ = "crypter"
- __version__ = "0.04"
- __status__ = "testing"
+ __version__ = "0.05"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?trailerzone\.info/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/TurbobitNetFolder.py b/module/plugins/crypter/TurbobitNetFolder.py
index ac18a7399..dac274ea8 100644
--- a/module/plugins/crypter/TurbobitNetFolder.py
+++ b/module/plugins/crypter/TurbobitNetFolder.py
@@ -3,17 +3,17 @@
import re
from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
class TurbobitNetFolder(SimpleCrypter):
__name__ = "TurbobitNet"
__type__ = "crypter"
- __version__ = "0.06"
- __status__ = "testing"
+ __version__ = "0.07"
+ __status__ = "broken"
__pattern__ = r'http://(?:www\.)?turbobit\.net/download/folder/(?P<ID>\w+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -30,7 +30,7 @@ class TurbobitNetFolder(SimpleCrypter):
def _get_links(self, id, page=1):
gridFile = self.load("http://turbobit.net/downloadfolder/gridFile",
get={'rootId': id, 'rows': 200, 'page': page})
- grid = json_loads(gridFile)
+ grid = json.loads(gridFile)
if grid['rows']:
for i in grid['rows']:
diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py
index 640b4bdfb..7ee37b503 100644
--- a/module/plugins/crypter/TusfilesNetFolder.py
+++ b/module/plugins/crypter/TusfilesNetFolder.py
@@ -10,11 +10,11 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class TusfilesNetFolder(XFSCrypter):
__name__ = "TusfilesNet"
__type__ = "crypter"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P<ID>\w+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -35,6 +35,7 @@ class TusfilesNetFolder(XFSCrypter):
def handle_pages(self, pyfile):
pages = re.search(self.PAGES_PATTERN, self.html)
+
if pages:
pages = int(math.ceil(int(pages.group('pages')) / 25.0))
else:
@@ -42,7 +43,7 @@ class TusfilesNetFolder(XFSCrypter):
for p in xrange(2, pages + 1):
self.html = self.load_page(p)
- self.links += self.get_links()
+ self.urls.append(self.get_links())
getInfo = create_getInfo(TusfilesNetFolder)
diff --git a/module/plugins/crypter/UlozToFolder.py b/module/plugins/crypter/UlozToFolder.py
index b78838cea..37fd8892e 100644
--- a/module/plugins/crypter/UlozToFolder.py
+++ b/module/plugins/crypter/UlozToFolder.py
@@ -1,17 +1,18 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.Crypter import Crypter
+
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class UlozToFolder(Crypter):
__name__ = "UlozTo"
__type__ = "crypter"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(m|soubory)/.+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -46,3 +47,6 @@ class UlozToFolder(Crypter):
if new_links:
self.urls = [map(lambda s: "http://ulozto.net/%s" % s, new_links)]
+
+
+getInfo = create_getInfo(UlozToFolder)
diff --git a/module/plugins/crypter/UploadableChFolder.py b/module/plugins/crypter/UploadableChFolder.py
index 0809b0f37..5d1527952 100644
--- a/module/plugins/crypter/UploadableChFolder.py
+++ b/module/plugins/crypter/UploadableChFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class UploadableChFolder(SimpleCrypter):
__name__ = "UploadableCh"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?uploadable\.ch/list/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py
index 0d4e621b2..7decbd17a 100644
--- a/module/plugins/crypter/UploadedToFolder.py
+++ b/module/plugins/crypter/UploadedToFolder.py
@@ -8,11 +8,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class UploadedToFolder(SimpleCrypter):
__name__ = "UploadedTo"
__type__ = "crypter"
- __version__ = "0.44"
+ __version__ = "0.45"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(uploaded|ul)\.(to|net)/(f|folder|list)/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/WiiReloadedOrg.py b/module/plugins/crypter/WiiReloadedOrg.py
index 7679836d2..8474ed8ae 100644
--- a/module/plugins/crypter/WiiReloadedOrg.py
+++ b/module/plugins/crypter/WiiReloadedOrg.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class WiiReloadedOrg(DeadCrypter):
__name__ = "WiiReloadedOrg"
__type__ = "crypter"
- __version__ = "0.12"
- __status__ = "testing"
+ __version__ = "0.13"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?wii-reloaded\.org/protect/get\.php\?i=.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/WuploadComFolder.py b/module/plugins/crypter/WuploadComFolder.py
index 2cf6f81fd..9f35cf41a 100644
--- a/module/plugins/crypter/WuploadComFolder.py
+++ b/module/plugins/crypter/WuploadComFolder.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class WuploadComFolder(DeadCrypter):
__name__ = "WuploadCom"
__type__ = "crypter"
- __version__ = "0.02"
- __status__ = "testing"
+ __version__ = "0.03"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?wupload\.com/folder/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py
index 6790916b4..1d47d59d6 100644
--- a/module/plugins/crypter/XFileSharingProFolder.py
+++ b/module/plugins/crypter/XFileSharingProFolder.py
@@ -8,11 +8,11 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class XFileSharingProFolder(XFSCrypter):
__name__ = "XFileSharingPro"
__type__ = "crypter"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
- __pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:user|folder)s?/\w+'
- __config__ = [("activated", "bool", "Activated", True),
+ __pattern__ = r'https?://(?:www\.)?(?:\w+\.)*(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,63}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:user|folder)s?/\w+'
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py
index 41abc861e..3361c05f8 100644
--- a/module/plugins/crypter/XupPl.py
+++ b/module/plugins/crypter/XupPl.py
@@ -1,16 +1,16 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter, create_getInfo
class XupPl(Crypter):
__name__ = "XupPl"
__type__ = "crypter"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'https?://(?:[^/]*\.)?xup\.pl/.+'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -25,3 +25,6 @@ class XupPl(Crypter):
self.urls = [header.get('location')]
else:
self.fail(_("Unable to find link"))
+
+
+getInfo = create_getInfo(XupPl)
diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py
index 3c794e956..de00067b4 100644
--- a/module/plugins/crypter/YoutubeComFolder.py
+++ b/module/plugins/crypter/YoutubeComFolder.py
@@ -3,19 +3,18 @@
import re
import urlparse
-from module.common.json_layer import json_loads
-from module.plugins.internal.Crypter import Crypter
-from module.utils import save_join as fs_join
+from module.plugins.internal.Crypter import Crypter, create_getInfo
+from module.plugins.internal.utils import fs_join, json
class YoutubeComFolder(Crypter):
__name__ = "YoutubeCom"
__type__ = "crypter"
- __version__ = "1.03"
+ __version__ = "1.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.|m\.)?youtube\.com/(?P<TYPE>user|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P<ID>[\w\-]+)'
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated" , "bool", "Activated" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True ),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True ),
("likes" , "bool", "Grab user (channel) liked videos" , False),
@@ -34,7 +33,7 @@ class YoutubeComFolder(Crypter):
req.update({'key': self.API_KEY})
url = urlparse.urljoin("https://www.googleapis.com/youtube/v3/", ref)
html = self.load(url, get=req)
- return json_loads(html)
+ return json.loads(html)
def get_channel(self, user):
@@ -147,3 +146,6 @@ class YoutubeComFolder(Crypter):
self.packages.append((p_name, p_urls, p_folder)) #: Folder is NOT recognized by pyload 0.4.9!
addedvideos.extend(p_videos)
+
+
+getInfo = create_getInfo(YoutubeComFolder)
diff --git a/module/plugins/hooks/AndroidPhoneNotify.py b/module/plugins/hooks/AndroidPhoneNotify.py
index 60e9297e1..6ac250e7b 100644
--- a/module/plugins/hooks/AndroidPhoneNotify.py
+++ b/module/plugins/hooks/AndroidPhoneNotify.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Addon import Addon, Expose
class AndroidPhoneNotify(Addon):
__name__ = "AndroidPhoneNotify"
__type__ = "hook"
- __version__ = "0.11"
+ __version__ = "0.12"
__status__ = "testing"
__config__ = [("activated" , "bool", "Activated" , False),
diff --git a/module/plugins/hooks/AntiStandby.py b/module/plugins/hooks/AntiStandby.py
index aa7a028a5..5ad95d6e8 100644
--- a/module/plugins/hooks/AntiStandby.py
+++ b/module/plugins/hooks/AntiStandby.py
@@ -13,7 +13,7 @@ except ImportError:
pass
from module.plugins.internal.Addon import Addon, Expose
-from module.utils import fs_encode, save_join as fs_join
+from module.plugins.internal.utils import encode, fs_join
class Kernel32(object):
@@ -27,7 +27,7 @@ class Kernel32(object):
class AntiStandby(Addon):
__name__ = "AntiStandby"
__type__ = "hook"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated" , True ),
@@ -43,8 +43,6 @@ class AntiStandby(Addon):
TMP_FILE = ".antistandby"
- PERIODICAL_INTERVAL = 5
-
def init(self):
self.pid = None
@@ -155,7 +153,7 @@ class AntiStandby(Addon):
def max_mtime(self, path):
return max(0, 0,
*(os.path.getmtime(fs_join(root, file))
- for root, dirs, files in os.walk(fs_encode(path), topdown=False)
+ for root, dirs, files in os.walk(encode(path), topdown=False)
for file in files))
@@ -168,8 +166,8 @@ class AntiStandby(Addon):
not self.pyload.threadManager.getActiveFiles()):
return
- download_folder = self.pyload.config.get("general", "download_folder")
- if (self.max_mtime(download_folder) - self.mtime) < self.interval:
+ dl_folder = self.pyload.config.get("general", "download_folder")
+ if (self.max_mtime(dl_folder) - self.mtime) < self.interval:
return
self.touch(self.TMP_FILE)
diff --git a/module/plugins/hooks/AntiVirus.py b/module/plugins/hooks/AntiVirus.py
index c68e86c77..b9a7e93bf 100644
--- a/module/plugins/hooks/AntiVirus.py
+++ b/module/plugins/hooks/AntiVirus.py
@@ -11,13 +11,13 @@ except ImportError:
from module.plugins.internal.Addon import Addon, Expose, threaded
from module.plugins.internal.Plugin import exists
-from module.utils import fs_encode, save_join as fs_join
+from module.plugins.internal.utils import encode, fs_join
class AntiVirus(Addon):
__name__ = "AntiVirus"
__type__ = "hook"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
#@TODO: add trash option (use Send2Trash lib)
@@ -39,8 +39,8 @@ class AntiVirus(Addon):
@Expose
@threaded
def scan(self, pyfile, thread):
- avfile = fs_encode(self.get_config('avfile'))
- avargs = fs_encode(self.get_config('avargs').strip())
+ avfile = encode(self.get_config('avfile'))
+ avargs = encode(self.get_config('avargs').strip())
if not os.path.isfile(avfile):
self.fail(_("Antivirus executable not found"))
@@ -48,12 +48,12 @@ class AntiVirus(Addon):
scanfolder = self.get_config('avtarget') is "folder"
if scanfolder:
- download_folder = self.pyload.config.get("general", "download_folder")
- package_folder = pyfile.package().folder if self.pyload.config.get("general", "folder_per_package") else ""
- target = fs_join(download_folder, package_folder, pyfile.name)
- target_repr = "Folder: " + package_folder or download_folder
+ dl_folder = self.pyload.config.get("general", "download_folder")
+ package_folder = pyfile.package().folder if self.pyload.config.get("general", "folder_per_package") else ""
+ target = fs_join(dl_folder, package_folder, pyfile.name)
+ target_repr = "Folder: " + package_folder or dl_folder
else:
- target = fs_encode(pyfile.plugin.last_download)
+ target = encode(pyfile.plugin.last_download)
target_repr = "File: " + os.path.basename(pyfile.plugin.last_download)
if not exists(target):
diff --git a/module/plugins/hooks/BypassCaptcha.py b/module/plugins/hooks/BypassCaptcha.py
index df8562431..581d2f6dd 100644
--- a/module/plugins/hooks/BypassCaptcha.py
+++ b/module/plugins/hooks/BypassCaptcha.py
@@ -28,7 +28,7 @@ class BypassCaptchaException(Exception):
class BypassCaptcha(Addon):
__name__ = "BypassCaptcha"
__type__ = "hook"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__config__ = [("activated" , "bool" , "Activated" , False),
diff --git a/module/plugins/hooks/Captcha9Kw.py b/module/plugins/hooks/Captcha9Kw.py
index b2883534d..3d2861bbf 100644
--- a/module/plugins/hooks/Captcha9Kw.py
+++ b/module/plugins/hooks/Captcha9Kw.py
@@ -14,7 +14,7 @@ from module.plugins.internal.Addon import Addon, threaded
class Captcha9Kw(Addon):
__name__ = "Captcha9Kw"
__type__ = "hook"
- __version__ = "0.30"
+ __version__ = "0.31"
__status__ = "testing"
__config__ = [("activated" , "bool" , "Activated" , False ),
diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py
index 24254ffbb..5411322de 100644
--- a/module/plugins/hooks/CaptchaBrotherhood.py
+++ b/module/plugins/hooks/CaptchaBrotherhood.py
@@ -38,7 +38,7 @@ class CaptchaBrotherhoodException(Exception):
class CaptchaBrotherhood(Addon):
__name__ = "CaptchaBrotherhood"
__type__ = "hook"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__config__ = [("activated" , "bool" , "Activated" , False),
diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py
index 4d0493212..cf5ed2147 100644
--- a/module/plugins/hooks/Checksum.py
+++ b/module/plugins/hooks/Checksum.py
@@ -8,7 +8,7 @@ import re
import zlib
from module.plugins.internal.Addon import Addon
-from module.utils import save_join as fs_join, fs_encode
+from module.plugins.internal.utils import encode, fs_join
def compute_checksum(local_file, algorithm):
@@ -38,7 +38,7 @@ def compute_checksum(local_file, algorithm):
class Checksum(Addon):
__name__ = "Checksum"
__type__ = "hook"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__config__ = [("activated" , "bool" , "Activated" , False ),
@@ -103,9 +103,9 @@ class Checksum(Addon):
if not pyfile.plugin.last_download:
self.check_failed(pyfile, None, "No file downloaded")
- local_file = fs_encode(pyfile.plugin.last_download)
- # download_folder = self.pyload.config.get("general", "download_folder")
- # local_file = fs_encode(fs_join(download_folder, pyfile.package().folder, pyfile.name))
+ local_file = encode(pyfile.plugin.last_download)
+ # dl_folder = self.pyload.config.get("general", "download_folder")
+ # local_file = encode(fs_join(dl_folder, pyfile.package().folder, pyfile.name))
if not os.path.isfile(local_file):
self.check_failed(pyfile, None, "File does not exist")
@@ -166,7 +166,7 @@ class Checksum(Addon):
def package_finished(self, pypack):
- download_folder = fs_join(self.pyload.config.get("general", "download_folder"), pypack.folder, "")
+ dl_folder = fs_join(self.pyload.config.get("general", "download_folder"), pypack.folder, "")
for link in pypack.getChildren().values():
file_type = os.path.splitext(link['name'])[1][1:].lower()
@@ -174,7 +174,7 @@ class Checksum(Addon):
if file_type not in self.formats:
continue
- hash_file = fs_encode(fs_join(download_folder, link['name']))
+ hash_file = encode(fs_join(dl_folder, link['name']))
if not os.path.isfile(hash_file):
self.log_warning(_("File not found"), link['name'])
continue
@@ -186,7 +186,7 @@ class Checksum(Addon):
data = m.groupdict()
self.log_debug(link['name'], data)
- local_file = fs_encode(fs_join(download_folder, data['NAME']))
+ local_file = encode(fs_join(dl_folder, data['NAME']))
algorithm = self.methods.get(file_type, file_type)
checksum = compute_checksum(local_file, algorithm)
diff --git a/module/plugins/hooks/ClickNLoad.py b/module/plugins/hooks/ClickNLoad.py
index fa99ac12c..722e4fbe0 100644
--- a/module/plugins/hooks/ClickNLoad.py
+++ b/module/plugins/hooks/ClickNLoad.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import socket
+import threading
import time
try:
@@ -8,8 +9,6 @@ try:
except ImportError:
pass
-from threading import Lock
-
from module.plugins.internal.Addon import Addon, threaded
@@ -22,14 +21,13 @@ def forward(source, destination):
bufdata = source.recv(bufsize)
finally:
destination.shutdown(socket.SHUT_WR)
- #: destination.close()
#@TODO: IPv6 support
class ClickNLoad(Addon):
__name__ = "ClickNLoad"
__type__ = "hook"
- __version__ = "0.48"
+ __version__ = "0.49"
__status__ = "testing"
__config__ = [("activated", "bool" , "Activated" , True ),
@@ -51,7 +49,7 @@ class ClickNLoad(Addon):
webport = self.pyload.config.get("webinterface", "port")
cnlport = self.get_config('port')
- self.proxy(ip, webport, cnlport)
+ self.pyload.scheduler.addJob(5, self.proxy, [ip, webport, cnlport], threaded=False)
@threaded
@@ -69,13 +67,11 @@ class ClickNLoad(Addon):
@threaded
def proxy(self, ip, webport, cnlport):
- time.sleep(10) #@TODO: Remove in 0.4.10 (implement addon delay on startup)
-
self.log_info(_("Proxy listening on %s:%s") % (ip or "0.0.0.0", cnlport))
self._server(ip, webport, cnlport)
- lock = Lock()
+ lock = threading.Lock()
lock.acquire()
lock.acquire()
diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py
index 00d6453a4..229c85791 100644
--- a/module/plugins/hooks/DeathByCaptcha.py
+++ b/module/plugins/hooks/DeathByCaptcha.py
@@ -8,7 +8,7 @@ import time
from base64 import b64encode
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.network.HTTPRequest import BadHeader
from module.network.RequestFactory import getRequest as get_request
from module.plugins.internal.Addon import Addon, threaded
@@ -51,7 +51,7 @@ class DeathByCaptchaException(Exception):
class DeathByCaptcha(Addon):
__name__ = "DeathByCaptcha"
__type__ = "hook"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__config__ = [("activated" , "bool" , "Activated" , False),
@@ -80,13 +80,13 @@ class DeathByCaptcha(Addon):
res = None
try:
- json = self.load("%s%s" % (self.API_URL, api),
+ html = self.load("%s%s" % (self.API_URL, api),
post=post,
multipart=multipart,
req=req)
- self.log_debug(json)
- res = json_loads(json)
+ self.log_debug(html)
+ res = json.loads(html)
if "error" in res:
raise DeathByCaptchaException(res['error'])
@@ -94,14 +94,18 @@ class DeathByCaptcha(Addon):
raise DeathByCaptchaException(str(res))
except BadHeader, e:
- if 403 is e.code:
+ if e.code is 403:
raise DeathByCaptchaException('not-logged-in')
- elif 413 is e.code:
+
+ elif e.code is 413:
raise DeathByCaptchaException('invalid-captcha')
- elif 503 is e.code:
+
+ elif e.code is 503:
raise DeathByCaptchaException('service-overload')
+
elif e.code in (400, 405):
raise DeathByCaptchaException('invalid-request')
+
else:
raise
diff --git a/module/plugins/hooks/DeleteFinished.py b/module/plugins/hooks/DeleteFinished.py
index e72439c0a..17b85959a 100644
--- a/module/plugins/hooks/DeleteFinished.py
+++ b/module/plugins/hooks/DeleteFinished.py
@@ -7,7 +7,7 @@ from module.plugins.internal.Addon import Addon
class DeleteFinished(Addon):
__name__ = "DeleteFinished"
__type__ = "hook"
- __version__ = "1.16"
+ __version__ = "1.17"
__status__ = "testing"
__config__ = [("activated" , "bool", "Activated" , False),
@@ -22,10 +22,6 @@ class DeleteFinished(Addon):
PERIODICAL_INTERVAL = 1 * 60 * 60 #: 1 hour
- def activate(self):
- self.start_periodical()
-
-
def periodical(self):
if not self.info['sleep']:
deloffline = self.get_config('deloffline')
@@ -43,7 +39,7 @@ class DeleteFinished(Addon):
def activate(self):
self.info['sleep'] = True
- self.interval = max(self.PERIODICAL_INTERVAL, self.get_config('interval') * 60 * 60)
+ self.set_interval(self.get_config('interval') * 60 * 60)
self.add_event('package_finished', self.wakeup)
diff --git a/module/plugins/hooks/DownloadScheduler.py b/module/plugins/hooks/DownloadScheduler.py
index 8454438a1..9c644ab20 100644
--- a/module/plugins/hooks/DownloadScheduler.py
+++ b/module/plugins/hooks/DownloadScheduler.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Addon import Addon
class DownloadScheduler(Addon):
__name__ = "DownloadScheduler"
__type__ = "hook"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated" , False ),
diff --git a/module/plugins/hooks/ExpertDecoders.py b/module/plugins/hooks/ExpertDecoders.py
index e94a966f2..55c07d4b9 100644
--- a/module/plugins/hooks/ExpertDecoders.py
+++ b/module/plugins/hooks/ExpertDecoders.py
@@ -15,7 +15,7 @@ from module.plugins.internal.Addon import Addon, threaded
class ExpertDecoders(Addon):
__name__ = "ExpertDecoders"
__type__ = "hook"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__config__ = [("activated" , "bool" , "Activated" , False),
diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py
index 3459eb3aa..8914cfa6c 100644
--- a/module/plugins/hooks/ExternalScripts.py
+++ b/module/plugins/hooks/ExternalScripts.py
@@ -3,26 +3,22 @@
import os
import subprocess
-from module.plugins.internal.Plugin import encode
from module.plugins.internal.Addon import Addon, Expose
-from module.utils import fs_encode, save_join as fs_join
+from module.plugins.internal.utils import encode, fs_join
class ExternalScripts(Addon):
__name__ = "ExternalScripts"
__type__ = "hook"
- __version__ = "0.49"
+ __version__ = "0.51"
__status__ = "testing"
- __config__ = [("activated", "bool", "Activated" , True ),
- ("lock" , "bool", "Wait script ending", False)]
+ __config__ = [("activated", "bool", "Activated" , True ),
+ ("lock" , "bool", "Wait for script to terminate", False)]
__description__ = """Run external scripts"""
__license__ = "GPLv3"
- __authors__ = [("mkaay" , "mkaay@mkaay.de" ),
- ("RaNaN" , "ranan@pyload.org" ),
- ("spoob" , "spoob@pyload.org" ),
- ("Walter Purcaro", "vuolter@gmail.com")]
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
def init(self):
@@ -85,7 +81,10 @@ class ExternalScripts(Addon):
@Expose
- def call(self, script, args=[], lock=False):
+ def call(self, script, args=[], lock=None):
+ if lock is None:
+ lock = self.get_config('lock')
+
try:
script = os.path.abspath(script)
args = [script] + map(lambda arg: encode(arg) if isinstance(arg, basestring) else encode(str(arg)), args)
@@ -100,153 +99,118 @@ class ExternalScripts(Addon):
e or _("Unknown error"))
+ def _call(self, folder, args=[], lock=None):
+ for script in self.scripts[folder]:
+ self.call(script, args, lock)
+
+
def pyload_start(self):
- lock = self.get_config('lock')
- for script in self.scripts['pyload_start']:
- self.call(script, lock=lock)
+ self._call('pyload_start')
def exit(self):
- lock = self.get_config('lock')
- for script in self.scripts['pyload_restart' if self.pyload.do_restart else 'pyload_stop']:
- self.call(script, lock=True)
+ folder = "pyload_restart" if self.pyload.do_restart else "pyload_stop"
+ self._call(folder, lock=True)
def before_reconnect(self, ip):
- lock = self.get_config('lock')
- for script in self.scripts['before_reconnect']:
- args = [ip]
- self.call(script, args, lock)
+ self._call("before_reconnect", [ip])
def after_reconnect(self, ip, oldip):
- lock = self.get_config('lock')
- for script in self.scripts['after_reconnect']:
- args = [ip, oldip]
- self.call(script, args, lock)
+ self._call("after_reconnect", [ip, oldip])
def download_preparing(self, pyfile):
- lock = self.get_config('lock')
- for script in self.scripts['download_preparing']:
- args = [pyfile.id, pyfile.name, None, pyfile.pluginname, pyfile.url]
- self.call(script, args, lock)
+ args = [pyfile.id, pyfile.name, None, pyfile.pluginname, pyfile.url]
+ self._call("download_preparing", args)
def download_failed(self, pyfile):
- lock = self.get_config('lock')
-
if self.pyload.config.get("general", "folder_per_package"):
- download_folder = fs_join(self.pyload.config.get("general", "download_folder"), pyfile.package().folder)
+ dl_folder = fs_join(self.pyload.config.get("general", "download_folder"), pyfile.package().folder)
else:
- download_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get("general", "download_folder")
- for script in self.scripts['download_failed']:
- file = fs_join(download_folder, pyfile.name)
- args = [script, pyfile.id, pyfile.name, file, pyfile.pluginname, pyfile.url]
- self.call(script, args, lock)
+ file = fs_join(dl_folder, pyfile.name)
+ args = [script, pyfile.id, pyfile.name, file, pyfile.pluginname, pyfile.url]
+ self._call("download_failed", args)
def download_finished(self, pyfile):
- lock = self.get_config('lock')
-
if self.pyload.config.get("general", "folder_per_package"):
- download_folder = fs_join(self.pyload.config.get("general", "download_folder"), pyfile.package().folder)
+ dl_folder = fs_join(self.pyload.config.get("general", "download_folder"), pyfile.package().folder)
else:
- download_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get("general", "download_folder")
- for script in self.scripts['download_finished']:
- file = fs_join(download_folder, pyfile.name)
- args = [pyfile.id, pyfile.name, file, pyfile.pluginname, pyfile.url]
- self.call(script, args, lock)
+ file = fs_join(dl_folder, pyfile.name)
+ args = [pyfile.id, pyfile.name, file, pyfile.pluginname, pyfile.url]
+ self._call("download_finished", args)
def archive_extract_failed(self, pyfile, archive):
- lock = self.get_config('lock')
- for script in self.scripts['archive_extract_failed']:
- args = [pyfile.id, pyfile.name, archive.filename, archive.out, archive.files]
- self.call(script, args, lock)
+ args = [pyfile.id, pyfile.name, archive.filename, archive.out, archive.files]
+ self._call("archive_extract_failed", args)
def archive_extracted(self, pyfile, archive):
- lock = self.get_config('lock')
- for script in self.scripts['archive_extracted']:
- args = [script, pyfile.id, pyfile.name, archive.filename, archive.out, archive.files]
- self.call(script, args, lock)
+ args = [script, pyfile.id, pyfile.name, archive.filename, archive.out, archive.files]
+ self._call("archive_extracted", args)
def package_finished(self, pypack):
- lock = self.get_config('lock')
-
if self.pyload.config.get("general", "folder_per_package"):
- download_folder = fs_join(self.pyload.config.get("general", "download_folder"), pypack.folder)
+ dl_folder = fs_join(self.pyload.config.get("general", "download_folder"), pypack.folder)
else:
- download_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get("general", "download_folder")
- for script in self.scripts['package_finished']:
- args = [pypack.id, pypack.name, download_folder, pypack.password]
- self.call(script, args, lock)
+ args = [pypack.id, pypack.name, dl_folder, pypack.password]
+ self._call("package_finished", args)
def package_deleted(self, pid):
- lock = self.get_config('lock')
pack = self.pyload.api.getPackageInfo(pid)
if self.pyload.config.get("general", "folder_per_package"):
- download_folder = fs_join(self.pyload.config.get("general", "download_folder"), pack.folder)
+ dl_folder = fs_join(self.pyload.config.get("general", "download_folder"), pack.folder)
else:
- download_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get("general", "download_folder")
- for script in self.scripts['package_deleted']:
- args = [pack.id, pack.name, download_folder, pack.password]
- self.call(script, args, lock)
+ args = [pack.id, pack.name, dl_folder, pack.password]
+ self._call("package_deleted", args)
def package_extract_failed(self, pypack):
- lock = self.get_config('lock')
-
if self.pyload.config.get("general", "folder_per_package"):
- download_folder = fs_join(self.pyload.config.get("general", "download_folder"), pypack.folder)
+ dl_folder = fs_join(self.pyload.config.get("general", "download_folder"), pypack.folder)
else:
- download_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get("general", "download_folder")
- for script in self.scripts['package_extract_failed']:
- args = [pypack.id, pypack.name, download_folder, pypack.password]
- self.call(script, args, lock)
+ args = [pypack.id, pypack.name, dl_folder, pypack.password]
+ self._call("package_extract_failed", args)
def package_extracted(self, pypack):
- lock = self.get_config('lock')
-
if self.pyload.config.get("general", "folder_per_package"):
- download_folder = fs_join(self.pyload.config.get("general", "download_folder"), pypack.folder)
+ dl_folder = fs_join(self.pyload.config.get("general", "download_folder"), pypack.folder)
else:
- download_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get("general", "download_folder")
- for script in self.scripts['package_extracted']:
- args = [pypack.id, pypack.name, download_folder]
- self.call(script, args, lock)
+ args = [pypack.id, pypack.name, dl_folder]
+ self._call("package_extracted", args)
def all_downloads_finished(self):
- lock = self.get_config('lock')
- for script in self.scripts['all_downloads_finished']:
- self.call(script, lock=lock)
+ self._call("all_downloads_finished")
def all_downloads_processed(self):
- lock = self.get_config('lock')
- for script in self.scripts['all_downloads_processed']:
- self.call(script, lock=lock)
+ self._call("all_downloads_processed")
def all_archives_extracted(self):
- lock = self.get_config('lock')
- for script in self.scripts['all_archives_extracted']:
- self.call(script, lock=lock)
+ self._call("all_archives_extracted")
def all_archives_processed(self):
- lock = self.get_config('lock')
- for script in self.scripts['all_archives_processed']:
- self.call(script, lock=lock)
+ self._call("all_archives_processed")
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index 034a4b81a..93107810c 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -50,9 +50,8 @@ except ImportError:
pass
from module.plugins.internal.Addon import Addon, Expose, threaded
-from module.plugins.internal.Plugin import exists, replace_patterns
from module.plugins.internal.Extractor import ArchiveError, CRCError, PasswordError
-from module.utils import fs_encode, save_join as fs_join, uniqify
+from module.plugins.internal.utils import encode, exists, fs_join, replace_patterns, uniqify
class ArchiveQueue(object):
@@ -99,7 +98,7 @@ class ArchiveQueue(object):
class ExtractArchive(Addon):
__name__ = "ExtractArchive"
__type__ = "hook"
- __version__ = "1.52"
+ __version__ = "1.53"
__status__ = "testing"
__config__ = [("activated" , "bool" , "Activated" , True ),
@@ -117,7 +116,7 @@ class ExtractArchive(Addon):
("excludefiles" , "str" , "Don't extract the following files" , "*.nfo,*.DS_Store,index.dat,thumb.db" ),
("recursive" , "bool" , "Extract archives in archives" , True ),
("waitall" , "bool" , "Run after all downloads was processed" , False ),
- ("renice" , "int" , "CPU priority" , 0 )]
+ ("priority" , "int" , "Process priority" , 0 )]
__description__ = """Extract different kind of archives"""
__license__ = "GPLv3"
@@ -242,9 +241,8 @@ class ExtractArchive(Addon):
subfolder = self.get_config('subfolder')
fullpath = self.get_config('fullpath')
overwrite = self.get_config('overwrite')
- renice = self.get_config('renice')
+ priority = self.get_config('priority')
recursive = self.get_config('recursive')
- delete = self.get_config('delete')
keepbroken = self.get_config('keepbroken')
extensions = [x.lstrip('.').lower() for x in toList(self.get_config('extensions'))]
@@ -256,7 +254,7 @@ class ExtractArchive(Addon):
#: Reload from txt file
self.reload_passwords()
- download_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get("general", "download_folder")
#: Iterate packages -> extractors -> targets
for pid in ids:
@@ -269,7 +267,7 @@ class ExtractArchive(Addon):
self.log_info(_("Check package: %s") % pypack.name)
#: Determine output folder
- out = fs_join(download_folder, pypack.folder, destination, "") #: Force trailing slash
+ out = fs_join(dl_folder, pypack.folder, destination, "") #: Force trailing slash
if subfolder:
out = fs_join(out, pypack.folder)
@@ -279,7 +277,7 @@ class ExtractArchive(Addon):
matched = False
success = True
- files_ids = dict((pylink['name'], ((fs_join(download_folder, pypack.folder, pylink['name'])), pylink['id'], out)) for pylink \
+ files_ids = dict((pylink['name'], ((fs_join(dl_folder, pypack.folder, pylink['name'])), pylink['id'], out)) for pylink \
in sorted(pypack.getChildren().values(), key=lambda k: k['name'])).values() #: Remove duplicates
#: Check as long there are unseen files
@@ -312,8 +310,7 @@ class ExtractArchive(Addon):
fullpath,
overwrite,
excludefiles,
- renice,
- delete,
+ priority,
keepbroken,
fid)
@@ -341,7 +338,7 @@ class ExtractArchive(Addon):
self.set_permissions(file)
for filename in new_files:
- file = fs_encode(fs_join(os.path.dirname(archive.filename), filename))
+ file = encode(fs_join(os.path.dirname(archive.filename), filename))
if not exists(file):
self.log_debug("New file %s does not exists" % filename)
continue
@@ -458,7 +455,7 @@ class ExtractArchive(Addon):
deltotrash = self.get_config('deltotrash')
for f in delfiles:
- file = fs_encode(f)
+ file = encode(f)
if not exists(file):
continue
@@ -526,7 +523,7 @@ class ExtractArchive(Addon):
try:
passwords = []
- file = fs_encode(self.get_config('passwordfile'))
+ file = encode(self.get_config('passwordfile'))
with open(file) as f:
for pw in f.read().splitlines():
passwords.append(pw)
@@ -555,7 +552,7 @@ class ExtractArchive(Addon):
try:
self.passwords = uniqify([password] + self.passwords)
- file = fs_encode(self.get_config('passwordfile'))
+ file = encode(self.get_config('passwordfile'))
with open(file, "wb") as f:
for pw in self.passwords:
f.write(pw + '\n')
diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/hooks/HotFolder.py
index c7631a1fc..c89083fb1 100644
--- a/module/plugins/hooks/HotFolder.py
+++ b/module/plugins/hooks/HotFolder.py
@@ -7,13 +7,13 @@ import shutil
import time
from module.plugins.internal.Addon import Addon
-from module.utils import fs_encode, save_join as fs_join
+from module.plugins.internal.utils import encode, fs_join
class HotFolder(Addon):
__name__ = "HotFolder"
__type__ = "hook"
- __version__ = "0.19"
+ __version__ = "0.20"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated" , False ),
@@ -32,8 +32,8 @@ class HotFolder(Addon):
def periodical(self):
- folder = fs_encode(self.get_config('folder'))
- file = fs_encode(self.get_config('file'))
+ folder = encode(self.get_config('folder'))
+ file = encode(self.get_config('file'))
try:
if not os.path.isdir(os.path.join(folder, "finished")):
diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py
index 16640df0b..1f337d686 100644
--- a/module/plugins/hooks/IRCInterface.py
+++ b/module/plugins/hooks/IRCInterface.py
@@ -18,7 +18,7 @@ from module.utils import formatSize
class IRCInterface(Thread, Addon):
__name__ = "IRCInterface"
__type__ = "hook"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated" , False ),
diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py
index 86b1dae2b..656ad0c25 100644
--- a/module/plugins/hooks/ImageTyperz.py
+++ b/module/plugins/hooks/ImageTyperz.py
@@ -32,7 +32,7 @@ class ImageTyperzException(Exception):
class ImageTyperz(Addon):
__name__ = "ImageTyperz"
__type__ = "hook"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__config__ = [("activated" , "bool" , "Activated" , False),
diff --git a/module/plugins/hooks/JustPremium.py b/module/plugins/hooks/JustPremium.py
index f4c48cfa9..3f7388020 100644
--- a/module/plugins/hooks/JustPremium.py
+++ b/module/plugins/hooks/JustPremium.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Addon import Addon
class JustPremium(Addon):
__name__ = "JustPremium"
__type__ = "hook"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated" , False),
diff --git a/module/plugins/hooks/LinkdecrypterComHook.py b/module/plugins/hooks/LinkdecrypterComHook.py
index 1ef5bb72a..f9ab1f3ff 100644
--- a/module/plugins/hooks/LinkdecrypterComHook.py
+++ b/module/plugins/hooks/LinkdecrypterComHook.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Addon import Addon
class LinkdecrypterComHook(Addon):
__name__ = "LinkdecrypterCom"
__type__ = "hook"
- __version__ = "1.08"
+ __version__ = "1.09"
__status__ = "testing"
__config__ = [("activated" , "bool" , "Activated" , False),
diff --git a/module/plugins/hooks/LogMarker.py b/module/plugins/hooks/LogMarker.py
index 0efab602f..4bf8e290a 100644
--- a/module/plugins/hooks/LogMarker.py
+++ b/module/plugins/hooks/LogMarker.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Plugin import seconds_to_nexthour
class LogMarker(Addon):
__name__ = "LogMarker"
__type__ = "hook"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated" , False),
diff --git a/module/plugins/hooks/MergeFiles.py b/module/plugins/hooks/MergeFiles.py
index a7d6fc7ba..dbe7b1f5f 100644
--- a/module/plugins/hooks/MergeFiles.py
+++ b/module/plugins/hooks/MergeFiles.py
@@ -6,13 +6,13 @@ import os
import re
from module.plugins.internal.Addon import Addon, threaded
-from module.utils import save_join as fs_join
+from module.plugins.internal.utils import fs_join
class MergeFiles(Addon):
__name__ = "MergeFiles"
__type__ = "hook"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated", True)]
@@ -37,15 +37,15 @@ class MergeFiles(Addon):
files[data['name'][:-4]].sort()
fid_dict[data['name']] = fid
- download_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get("general", "download_folder")
if self.pyload.config.get("general", "folder_per_package"):
- download_folder = fs_join(download_folder, pack.folder)
+ dl_folder = fs_join(dl_folder, pack.folder)
for name, file_list in files.items():
self.log_info(_("Starting merging of"), name)
- with open(fs_join(download_folder, name), "wb") as final_file:
+ with open(fs_join(dl_folder, name), "wb") as final_file:
for splitted_file in file_list:
self.log_debug("Merging part", splitted_file)
@@ -54,9 +54,9 @@ class MergeFiles(Addon):
pyfile.setStatus("processing")
try:
- with open(fs_join(download_folder, splitted_file), "rb") as s_file:
+ with open(fs_join(dl_folder, splitted_file), "rb") as s_file:
size_written = 0
- s_file_size = int(os.path.getsize(os.path.join(download_folder, splitted_file)))
+ s_file_size = int(os.path.getsize(os.path.join(dl_folder, splitted_file)))
while True:
f_buffer = s_file.read(self.BUFFER_SIZE)
if f_buffer:
diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py
index 90e8a60d2..353753c1a 100644
--- a/module/plugins/hooks/MultiHome.py
+++ b/module/plugins/hooks/MultiHome.py
@@ -44,7 +44,7 @@ class Interface(object):
class MultiHome(Addon):
__name__ = "MultiHome"
__type__ = "hook"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__config__ = [("activated" , "bool", "Activated" , False ),
diff --git a/module/plugins/hooks/RestartFailed.py b/module/plugins/hooks/RestartFailed.py
index 74d570425..0e35c4629 100644
--- a/module/plugins/hooks/RestartFailed.py
+++ b/module/plugins/hooks/RestartFailed.py
@@ -6,7 +6,7 @@ from module.plugins.internal.Addon import Addon
class RestartFailed(Addon):
__name__ = "RestartFailed"
__type__ = "hook"
- __version__ = "1.62"
+ __version__ = "1.63"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated" , False),
@@ -26,4 +26,4 @@ class RestartFailed(Addon):
def activate(self):
- self.start_periodical(self.get_config('interval') * 60)
+ self.set_interval(self.get_config('interval') * 60)
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py
index 891d2db6d..6ce1750d3 100644
--- a/module/plugins/hooks/SkipRev.py
+++ b/module/plugins/hooks/SkipRev.py
@@ -12,7 +12,7 @@ from module.plugins.internal.Addon import Addon
class SkipRev(Addon):
__name__ = "SkipRev"
__type__ = "hook"
- __version__ = "0.34"
+ __version__ = "0.35"
__status__ = "testing"
__config__ = [("activated", "bool" , "Activated" , False ),
diff --git a/module/plugins/hooks/TransmissionRPC.py b/module/plugins/hooks/TransmissionRPC.py
index 9df19e320..fa19a5f91 100644
--- a/module/plugins/hooks/TransmissionRPC.py
+++ b/module/plugins/hooks/TransmissionRPC.py
@@ -5,7 +5,7 @@ import re
import pycurl
-from module.common.json_layer import json_loads, json_dumps
+from module.plugins.internal.utils import json
from module.network.HTTPRequest import BadHeader
from module.network.RequestFactory import getRequest as get_request
from module.plugins.internal.Addon import Addon
@@ -14,7 +14,7 @@ from module.plugins.internal.Addon import Addon
class TransmissionRPC(Addon):
__name__ = "TransmissionRPC"
__type__ = "hook"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r"https?://.+\.torrent|magnet:\?.+"
@@ -47,7 +47,7 @@ class TransmissionRPC(Addon):
try:
response = self.load(transmission_rpc_url,
- post=json_dumps({'arguments': {'filename': url},
+ post=json.dumps({'arguments': {'filename': url},
'method' : 'torrent-add',
'tag' : client_request_id}),
req=req)
@@ -59,7 +59,7 @@ class TransmissionRPC(Addon):
req.c.setopt(pycurl.HTTPHEADER, ["X-Transmission-Session-Id: %s" % session_id])
try:
response = self.load(transmission_rpc_url,
- post=json_dumps({'arguments': {'filename': url},
+ post=json.dumps({'arguments': {'filename': url},
'method' : 'torrent-add',
'tag' : client_request_id}),
req=req)
@@ -77,7 +77,7 @@ class TransmissionRPC(Addon):
return
try:
- res = json_loads(response)
+ res = json.loads(response)
if "result" in res:
self.log_debug("Result: %s" % res['result'])
diff --git a/module/plugins/hooks/UnSkipOnFail.py b/module/plugins/hooks/UnSkipOnFail.py
index d467b8a01..6842cbc51 100644
--- a/module/plugins/hooks/UnSkipOnFail.py
+++ b/module/plugins/hooks/UnSkipOnFail.py
@@ -7,7 +7,7 @@ from module.plugins.internal.Addon import Addon
class UnSkipOnFail(Addon):
__name__ = "UnSkipOnFail"
__type__ = "hook"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated", True)]
diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py
index caebdaa9b..41c11ed98 100644
--- a/module/plugins/hooks/UpdateManager.py
+++ b/module/plugins/hooks/UpdateManager.py
@@ -10,13 +10,13 @@ import time
from module.plugins.internal.Addon import Expose, Addon, threaded
from module.plugins.internal.Plugin import exists
-from module.utils import fs_encode, save_join as fs_join
+from module.plugins.internal.utils import encode, fs_join
class UpdateManager(Addon):
__name__ = "UpdateManager"
__type__ = "hook"
- __version__ = "1.00"
+ __version__ = "1.01"
__status__ = "testing"
__config__ = [("activated" , "bool", "Activated" , True ),
@@ -34,9 +34,8 @@ class UpdateManager(Addon):
_VERSION = re.compile(r'__version__.*=.*("|\')([\d.]+)')
- SERVER_URL = "http://updatemanager.pyload.org"
-
- PERIODICAL_INTERVAL = 3 * 60 * 60 #: 3 hours
+ SERVER_URL = "http://updatemanager.pyload.org"
+ CHECK_INTERVAL = 3 * 60 * 60 #: 3 hours
def activate(self):
@@ -66,7 +65,6 @@ class UpdateManager(Addon):
def all_downloads_processed(self):
if self.do_restart is True:
- self.log_warning(_("Downloads are done, restarting pyLoad to reload the updated plugins"))
self.pyload.api.restart()
@@ -79,7 +77,7 @@ class UpdateManager(Addon):
return
if self.get_config('checkperiod') and \
- time.time() - max(self.PERIODICAL_INTERVAL, self.get_config('checkinterval') * 60 * 60) > self.info['last_check']:
+ time.time() - max(self.CHECK_INTERVAL, self.get_config('checkinterval') * 60 * 60) > self.info['last_check']:
self.update()
@@ -129,7 +127,7 @@ class UpdateManager(Addon):
get={'v': self.pyload.api.getServerVersion()})
except Exception:
- self.log_warning(_("Unable to retrieve server to get updates"))
+ self.log_warning(_("Unable to connect to the server to retrieve updates"))
else:
res = html.splitlines()
@@ -156,7 +154,7 @@ class UpdateManager(Addon):
self.pyload.api.restart()
else:
self.do_restart = True
- self.log_warning(_("Downloads are active, will restart once the download is done"))
+ self.log_warning(_("pyLoad restart scheduled"), _("Downloads are active, pyLoad restart postponed once the download is done"))
self.pyload.api.pauseServer()
@@ -170,11 +168,11 @@ class UpdateManager(Addon):
exitcode = 0
elif newversion == "None":
- self.log_info(_("No new pyLoad version available"))
+ self.log_info(_("pyLoad is up to date!"))
exitcode = self.update_plugins()
else:
- self.log_info(_("*** New pyLoad Version %s available ***") % newversion)
+ self.log_info(_("*** New pyLoad %s available ***") % newversion)
self.log_info(_("*** Get it here: https://github.com/pyload/pyload/releases ***"))
self.info['pyload'] = True
exitcode = 3
@@ -202,13 +200,13 @@ class UpdateManager(Addon):
if self.pyload.pluginManager.reloadPlugins(updated):
exitcode = 1
else:
- self.log_warning(_("You have to restart pyLoad to reload the updated plugins"))
+ self.log_warning(_("You have to restart pyLoad to use the updated plugins"))
self.info['plugins'] = True
exitcode = 2
self.manager.dispatchEvent("plugin_updated", updated)
else:
- self.log_info(_("*** No plugin updates available ***"))
+ self.log_info(_("All plugins are up to date!"))
exitcode = 0
#: Exit codes:
@@ -278,6 +276,7 @@ class UpdateManager(Addon):
'name': n,
})
+ req = self.pyload.requestFactory.getRequest(self.classname)
for plugin in updatelist:
name = plugin['name']
type = plugin['type']
@@ -300,9 +299,12 @@ class UpdateManager(Addon):
'oldver': oldver,
'newver': newver})
try:
- content = self.load(url % plugin + ".py", decode=False)
- m = self._VERSION.search(content)
+ content = self.load(url % plugin + ".py", decode=False, req=req)
+ if req.code == 404:
+ raise Exception(_("Plugin URL not found (404)"))
+
+ m = self._VERSION.search(content)
if m and m.group(2) == version:
#@TODO: Remove in 0.4.10
if type in ("account", "hook"):
@@ -311,11 +313,11 @@ class UpdateManager(Addon):
folder = type
with open(fs_join("userplugins", folder, name + ".py"), "wb") as f:
- f.write(fs_encode(content))
+ f.write(encode(content))
updated.append((type, name))
else:
- raise Exception(_("Version mismatch"))
+ raise Exception(_("Plugin version mismatch"))
except Exception, e:
self.log_error(_("Error updating plugin: %s %s") % (type.upper(), name), e)
@@ -372,7 +374,7 @@ class UpdateManager(Addon):
os.remove(filename)
except OSError, e:
- self.log_warning(_("Error removing: %s") % filename, e)
+ self.log_error(_("Error removing: %s") % filename, e)
else:
id = (type, name)
diff --git a/module/plugins/hooks/UserAgentSwitcher.py b/module/plugins/hooks/UserAgentSwitcher.py
index 52f542268..bd51b30bd 100644
--- a/module/plugins/hooks/UserAgentSwitcher.py
+++ b/module/plugins/hooks/UserAgentSwitcher.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Plugin import encode
class UserAgentSwitcher(Addon):
__name__ = "UserAgentSwitcher"
__type__ = "hook"
- __version__ = "0.11"
+ __version__ = "0.12"
__status__ = "testing"
__config__ = [("activated" , "bool", "Activated" , True ),
diff --git a/module/plugins/hooks/WindowsPhoneNotify.py b/module/plugins/hooks/WindowsPhoneNotify.py
index 4343d16f2..e032508c0 100644
--- a/module/plugins/hooks/WindowsPhoneNotify.py
+++ b/module/plugins/hooks/WindowsPhoneNotify.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Addon import Addon, Expose
class WindowsPhoneNotify(Addon):
__name__ = "WindowsPhoneNotify"
__type__ = "hook"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__config__ = [("activated" , "bool", "Activated" , False),
diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py
index 92933fb11..75f8323ef 100644
--- a/module/plugins/hooks/XFileSharingPro.py
+++ b/module/plugins/hooks/XFileSharingPro.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Addon import Addon
class XFileSharingPro(Addon):
__name__ = "XFileSharingPro"
__type__ = "hook"
- __version__ = "0.44"
+ __version__ = "0.46"
__status__ = "testing"
__config__ = [("activated" , "bool", "Activated" , True ),
@@ -23,9 +23,9 @@ class XFileSharingPro(Addon):
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- regexp = {'hoster' : (r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)',
+ regexp = {'hoster' : (r'https?://(?:www\.)?(?:\w+\.)*(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,63}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)',
r'https?://(?:[^/]+\.)?(?P<DOMAIN>%s)/(?:embed-)?\w+'),
- 'crypter': (r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:user|folder)s?/\w+',
+ 'crypter': (r'https?://(?:www\.)?(?:\w+\.)*(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,63}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:user|folder)s?/\w+',
r'https?://(?:[^/]+\.)?(?P<DOMAIN>%s)/(?:user|folder)s?/\w+')}
BUILTIN_HOSTERS = [#WORKING HOSTERS:
diff --git a/module/plugins/hooks/XMPPInterface.py b/module/plugins/hooks/XMPPInterface.py
index 811e2f5f4..b8fe14239 100644
--- a/module/plugins/hooks/XMPPInterface.py
+++ b/module/plugins/hooks/XMPPInterface.py
@@ -12,7 +12,7 @@ from module.plugins.hooks.IRCInterface import IRCInterface
class XMPPInterface(IRCInterface, JabberClient):
__name__ = "XMPPInterface"
__type__ = "hook"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated" , False ),
diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py
index c6c4365c7..b3d42a381 100644
--- a/module/plugins/hoster/AlldebridCom.py
+++ b/module/plugins/hoster/AlldebridCom.py
@@ -3,15 +3,14 @@
import re
import urllib
-from module.common.json_layer import json_loads
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
-from module.plugins.internal.Plugin import parse_size
+from module.plugins.internal.utils import json, parse_size
class AlldebridCom(MultiHoster):
__name__ = "AlldebridCom"
__type__ = "hoster"
- __version__ = "0.48"
+ __version__ = "0.49"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.|s\d+\.)?alldebrid\.com/dl/[\w^_]+'
@@ -31,7 +30,7 @@ class AlldebridCom(MultiHoster):
def handle_premium(self, pyfile):
password = self.get_password()
- data = json_loads(self.load("http://www.alldebrid.com/service.php",
+ data = json.loads(self.load("http://www.alldebrid.com/service.php",
get={'link': pyfile.url, 'json': "true", 'pw': password}))
self.log_debug("Json data", data)
diff --git a/module/plugins/hoster/AndroidfilehostCom.py b/module/plugins/hoster/AndroidfilehostCom.py
index 910e09533..6be7131d5 100644
--- a/module/plugins/hoster/AndroidfilehostCom.py
+++ b/module/plugins/hoster/AndroidfilehostCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class AndroidfilehostCom(SimpleHoster):
__name__ = "AndroidfilehostCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?androidfilehost\.com/\?fid=\d+'
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index be53a33c2..e1bb7c36a 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -1,95 +1,28 @@
# -*- coding: utf-8 -*-
-import re
-import urllib
-import urlparse
+from module.plugins.internal.hoster.Http import Http, create_getInfo
-from module.network.HTTPRequest import BadHeader
-from module.plugins.internal.SimpleHoster import create_getInfo
-from module.plugins.internal.Hoster import Hoster
-
-class BasePlugin(Hoster):
+class BasePlugin(Http):
__name__ = "BasePlugin"
__type__ = "hoster"
- __version__ = "0.46"
+ __version__ = "0.48"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
__config__ = [("activated", "bool", "Activated", True)]
- __description__ = """Base Plugin when any other didnt fit"""
+ __description__ = """Default hoster plugin when any other didnt fit"""
__license__ = "GPLv3"
- __authors__ = [("RaNaN", "RaNaN@pyload.org"),
- ("Walter Purcaro", "vuolter@gmail.com")]
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
def setup(self):
self.chunk_limit = -1
- self.multiDL = True
self.resume_download = True
-
- def process(self, pyfile):
- """
- Main function
- """
- netloc = urlparse.urlparse(pyfile.url).netloc
-
- pyfile.name = self.get_info(pyfile.url)['name']
-
- if not pyfile.url.startswith("http"):
+ if not self.pyfile.url.startswith("http"):
self.fail(_("No plugin matched"))
- try:
- link = self.direct_link(urllib.unquote(pyfile.url))
-
- if link:
- self.download(link, ref=False, disposition=True)
- else:
- self.fail(_("File not found"))
-
- except BadHeader, e:
- if e.code == 404:
- self.offline()
-
- elif e.code in (401, 403):
- self.log_debug("Auth required", "Received HTTP status code: %d" % e.code)
-
- #@TODO: Recheck in 0.4.10
- if self.account:
- servers = [x['login'] for x in self.account.getAllAccounts()]
- else:
- servers = []
-
- if netloc in servers:
- self.log_debug("Logging on to %s" % netloc)
- self.req.addAuth(self.account.get_login('password'))
-
- else:
- pwd = self.get_password()
- if ':' in pwd:
- self.req.addAuth(pwd)
- else:
- self.fail(_("Authorization required"))
- else:
- self.fail(e)
-
- errmsg = self.check_file({'Empty file' : re.compile(r'\A\s*\Z'),
- 'Html error' : re.compile(r'\A(?:\s*<.+>)?((?:[\w\s]*(?:[Ee]rror|ERROR)\s*\:?)?\s*\d{3})(?:\Z|\s+)'),
- 'Html file' : re.compile(r'\A\s*<!DOCTYPE html'),
- 'Request error': re.compile(r'([Aa]n error occured while processing your request)')})
- if not errmsg:
- return
-
- try:
- errmsg += " | " + self.last_check.group(1).strip()
-
- except Exception:
- pass
-
- self.log_warning(_("Check result: ") + errmsg, _("Waiting 1 minute and retry"))
- self.retry(3, 60, errmsg)
-
getInfo = create_getInfo(BasePlugin)
diff --git a/module/plugins/hoster/BasketbuildCom.py b/module/plugins/hoster/BasketbuildCom.py
index 95d665715..db4ad92ed 100644
--- a/module/plugins/hoster/BasketbuildCom.py
+++ b/module/plugins/hoster/BasketbuildCom.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class BasketbuildCom(SimpleHoster):
__name__ = "BasketbuildCom"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(?:\w\.)?basketbuild\.com/filedl/.+'
diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py
index 6e9397d4f..bf9275c0d 100644
--- a/module/plugins/hoster/BayfilesCom.py
+++ b/module/plugins/hoster/BayfilesCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class BayfilesCom(DeadHoster):
__name__ = "BayfilesCom"
__type__ = "hoster"
- __version__ = "0.10"
- __status__ = "testing"
+ __version__ = "0.11"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?bayfiles\.(com|net)/file/(?P<ID>\w+/\w+/[^/]+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py
index f557d3b39..b80890208 100644
--- a/module/plugins/hoster/BezvadataCz.py
+++ b/module/plugins/hoster/BezvadataCz.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class BezvadataCz(SimpleHoster):
__name__ = "BezvadataCz"
__type__ = "hoster"
- __version__ = "0.30"
+ __version__ = "0.31"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+'
diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py
index a142f4ab3..c4236231b 100644
--- a/module/plugins/hoster/BillionuploadsCom.py
+++ b/module/plugins/hoster/BillionuploadsCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class BillionuploadsCom(DeadHoster):
__name__ = "BillionuploadsCom"
__type__ = "hoster"
- __version__ = "0.07"
- __status__ = "testing"
+ __version__ = "0.08"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?billionuploads\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py
index 94e16c617..36eac0c22 100644
--- a/module/plugins/hoster/BitshareCom.py
+++ b/module/plugins/hoster/BitshareCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class BitshareCom(SimpleHoster):
__name__ = "BitshareCom"
__type__ = "hoster"
- __version__ = "0.56"
+ __version__ = "0.57"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?bitshare\.com/(files/)?(?(1)|\?f=)(?P<ID>\w+)(?(1)/(?P<NAME>.+?)\.html)'
diff --git a/module/plugins/hoster/BoltsharingCom.py b/module/plugins/hoster/BoltsharingCom.py
index c33049e01..5217426ab 100644
--- a/module/plugins/hoster/BoltsharingCom.py
+++ b/module/plugins/hoster/BoltsharingCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class BoltsharingCom(DeadHoster):
__name__ = "BoltsharingCom"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?boltsharing\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py
index 8a9a42669..4ceb075f3 100644
--- a/module/plugins/hoster/CatShareNet.py
+++ b/module/plugins/hoster/CatShareNet.py
@@ -9,7 +9,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha
class CatShareNet(SimpleHoster):
__name__ = "CatShareNet"
__type__ = "hoster"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?catshare\.net/\w{15,16}'
diff --git a/module/plugins/hoster/CloudzerNet.py b/module/plugins/hoster/CloudzerNet.py
index fa0bccba3..7d9b9f5fc 100644
--- a/module/plugins/hoster/CloudzerNet.py
+++ b/module/plugins/hoster/CloudzerNet.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class CloudzerNet(DeadHoster):
__name__ = "CloudzerNet"
__type__ = "hoster"
- __version__ = "0.06"
- __status__ = "testing"
+ __version__ = "0.07"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?(cloudzer\.net/file/|clz\.to/(file/)?)\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py
index 5c6c5158e..34c1581f3 100644
--- a/module/plugins/hoster/CloudzillaTo.py
+++ b/module/plugins/hoster/CloudzillaTo.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class CloudzillaTo(SimpleHoster):
__name__ = "CloudzillaTo"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)'
diff --git a/module/plugins/hoster/CramitIn.py b/module/plugins/hoster/CramitIn.py
index 9dcb94ca8..e41ff0dd2 100644
--- a/module/plugins/hoster/CramitIn.py
+++ b/module/plugins/hoster/CramitIn.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class CramitIn(XFSHoster):
__name__ = "CramitIn"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?cramit\.in/\w{12}'
diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py
index 1ec9bd85b..db1941409 100644
--- a/module/plugins/hoster/CrockoCom.py
+++ b/module/plugins/hoster/CrockoCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class CrockoCom(SimpleHoster):
__name__ = "CrockoCom"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(crocko|easy-share)\.com/\w+'
diff --git a/module/plugins/hoster/CyberlockerCh.py b/module/plugins/hoster/CyberlockerCh.py
index 8cb9f7851..315fa49a9 100644
--- a/module/plugins/hoster/CyberlockerCh.py
+++ b/module/plugins/hoster/CyberlockerCh.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class CyberlockerCh(DeadHoster):
__name__ = "CyberlockerCh"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?cyberlocker\.ch/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py
index ea56caef4..e98568385 100644
--- a/module/plugins/hoster/CzshareCom.py
+++ b/module/plugins/hoster/CzshareCom.py
@@ -5,14 +5,14 @@
import re
-from module.plugins.internal.Plugin import parse_size
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+from module.plugins.internal.utils import parse_size
class CzshareCom(SimpleHoster):
__name__ = "CzshareCom"
__type__ = "hoster"
- __version__ = "1.05"
+ __version__ = "1.06"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+'
diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py
index 1634bb12d..e133416e7 100644
--- a/module/plugins/hoster/DailymotionCom.py
+++ b/module/plugins/hoster/DailymotionCom.py
@@ -3,7 +3,7 @@
import re
from module.PyFile import statusMap
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.network.RequestFactory import getURL as get_url
from module.plugins.internal.Hoster import Hoster
@@ -17,7 +17,7 @@ def get_info(urls):
for url in urls:
id = regex.match(url).group('ID')
html = get_url(apiurl % id, get=request)
- info = json_loads(html)
+ info = json.loads(html)
name = info['title'] + ".mp4" if "title" in info else url
@@ -44,7 +44,7 @@ def get_info(urls):
class DailymotionCom(Hoster):
__name__ = "DailymotionCom"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*video/(?P<ID>[\w^_]+)'
diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py
index 295e60873..bda967018 100644
--- a/module/plugins/hoster/DataHu.py
+++ b/module/plugins/hoster/DataHu.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DataHu(SimpleHoster):
__name__ = "DataHu"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?data\.hu/get/\w+'
diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py
index d5ab0787f..da33fd10e 100644
--- a/module/plugins/hoster/DataportCz.py
+++ b/module/plugins/hoster/DataportCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DataportCz(SimpleHoster):
__name__ = "DataportCz"
__type__ = "hoster"
- __version__ = "0.43"
+ __version__ = "0.44"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?dataport\.cz/file/(.+)'
diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py
index 23aeff47b..8261f52da 100644
--- a/module/plugins/hoster/DateiTo.py
+++ b/module/plugins/hoster/DateiTo.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DateiTo(SimpleHoster):
__name__ = "DateiTo"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?datei\.to/datei/(?P<ID>\w+)\.html'
diff --git a/module/plugins/hoster/DdlstorageCom.py b/module/plugins/hoster/DdlstorageCom.py
index 5a826452b..4370e97f3 100644
--- a/module/plugins/hoster/DdlstorageCom.py
+++ b/module/plugins/hoster/DdlstorageCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class DdlstorageCom(DeadHoster):
__name__ = "DdlstorageCom"
__type__ = "hoster"
- __version__ = "1.03"
- __status__ = "testing"
+ __version__ = "1.04"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?ddlstorage\.com/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py
index e18d86323..6dd01277c 100644
--- a/module/plugins/hoster/DebridItaliaCom.py
+++ b/module/plugins/hoster/DebridItaliaCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class DebridItaliaCom(MultiHoster):
__name__ = "DebridItaliaCom"
__type__ = "hoster"
- __version__ = "0.19"
+ __version__ = "0.20"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+'
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index 352a38dd2..bc1bb4660 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DepositfilesCom(SimpleHoster):
__name__ = "DepositfilesCom"
__type__ = "hoster"
- __version__ = "0.58"
+ __version__ = "0.59"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(depositfiles\.com|dfiles\.(eu|ru))(/\w{1,3})?/files/(?P<ID>\w+)'
diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py
index 27e1ea85a..5c11b28a6 100644
--- a/module/plugins/hoster/DevhostSt.py
+++ b/module/plugins/hoster/DevhostSt.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DevhostSt(SimpleHoster):
__name__ = "DevhostSt"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}'
diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py
index b6e618235..1b82ffa32 100644
--- a/module/plugins/hoster/DlFreeFr.py
+++ b/module/plugins/hoster/DlFreeFr.py
@@ -35,7 +35,7 @@ class CustomBrowser(Browser):
class DlFreeFr(SimpleHoster):
__name__ = "DlFreeFr"
__type__ = "hoster"
- __version__ = "0.32"
+ __version__ = "0.33"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?dl\.free\.fr/(\w+|getfile\.pl\?file=/\w+)'
@@ -91,7 +91,7 @@ class DlFreeFr(SimpleHoster):
self.offline()
else:
- self.fail(_("Invalid return code: ") + str(headers.get('code')))
+ self.fail(_("Invalid return code: %s") % headers.get('code'))
def handle_free(self, pyfile):
diff --git a/module/plugins/hoster/DodanePl.py b/module/plugins/hoster/DodanePl.py
index 3a2c732d8..4ff6a664d 100644
--- a/module/plugins/hoster/DodanePl.py
+++ b/module/plugins/hoster/DodanePl.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class DodanePl(DeadHoster):
__name__ = "DodanePl"
__type__ = "hoster"
- __version__ = "0.04"
- __status__ = "testing"
+ __version__ = "0.05"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?dodane\.pl/file/\d+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/DropboxCom.py b/module/plugins/hoster/DropboxCom.py
index 265f61c6f..1bddefd95 100644
--- a/module/plugins/hoster/DropboxCom.py
+++ b/module/plugins/hoster/DropboxCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DropboxCom(SimpleHoster):
__name__ = "DropboxCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?dropbox\.com/.+'
diff --git a/module/plugins/hoster/DuploadOrg.py b/module/plugins/hoster/DuploadOrg.py
index 124919d91..fad6ec951 100644
--- a/module/plugins/hoster/DuploadOrg.py
+++ b/module/plugins/hoster/DuploadOrg.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class DuploadOrg(DeadHoster):
__name__ = "DuploadOrg"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?dupload\.org/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py
index 272832e2f..b89e69104 100644
--- a/module/plugins/hoster/EasybytezCom.py
+++ b/module/plugins/hoster/EasybytezCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class EasybytezCom(XFSHoster):
__name__ = "EasybytezCom"
__type__ = "hoster"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?easybytez\.com/\w{12}'
diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py
index 3b368ade7..0b3d7fc45 100644
--- a/module/plugins/hoster/EdiskCz.py
+++ b/module/plugins/hoster/EdiskCz.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class EdiskCz(SimpleHoster):
__name__ = "EdiskCz"
__type__ = "hoster"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.+'
diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py
index d91c70fdc..9758089ac 100644
--- a/module/plugins/hoster/EgoFilesCom.py
+++ b/module/plugins/hoster/EgoFilesCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class EgoFilesCom(DeadHoster):
__name__ = "EgoFilesCom"
__type__ = "hoster"
- __version__ = "0.17"
- __status__ = "testing"
+ __version__ = "0.18"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?egofiles\.com/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/EnteruploadCom.py b/module/plugins/hoster/EnteruploadCom.py
index bc7d2415a..225db9c07 100644
--- a/module/plugins/hoster/EnteruploadCom.py
+++ b/module/plugins/hoster/EnteruploadCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class EnteruploadCom(DeadHoster):
__name__ = "EnteruploadCom"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?enterupload\.com/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/EpicShareNet.py b/module/plugins/hoster/EpicShareNet.py
index 498a43395..53e4c0f1d 100644
--- a/module/plugins/hoster/EpicShareNet.py
+++ b/module/plugins/hoster/EpicShareNet.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class EpicShareNet(DeadHoster):
__name__ = "EpicShareNet"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?epicshare\.net/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py
index 7ec6dc428..31044919a 100644
--- a/module/plugins/hoster/EuroshareEu.py
+++ b/module/plugins/hoster/EuroshareEu.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class EuroshareEu(SimpleHoster):
__name__ = "EuroshareEu"
__type__ = "hoster"
- __version__ = "0.34"
+ __version__ = "0.35"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+'
@@ -22,7 +22,7 @@ class EuroshareEu(SimpleHoster):
NAME_PATTERN = r'<h1 class="nazev-souboru">(?P<N>.+?)</h1>'
SIZE_PATTERN = r'<p class="posledni vpravo">.*\| (?P<S>.+?) (?P<U>.+?)</p>'
-
+
OFFLINE_PATTERN = ur'<h2>S.bor sa nena.iel</h2>|Poşadovaná stránka neexistuje!'
LINK_FREE_PATTERN = r'onclick="return checkLoad\(\);" href="(.+?)" class="tlacitko velky"'
@@ -40,8 +40,10 @@ class EuroshareEu(SimpleHoster):
self.link = pyfile.url.rstrip('/') + "/download/"
- check = self.check_file({'login': re.compile(self.ERROR_PATTERN),
- 'json' : re.compile(r'\{"status":"error".*?"message":"(.*?)"')})
+ check = self.check_file({
+ 'login': re.compile(self.ERROR_PATTERN),
+ 'json' : re.compile(r'\{"status":"error".*?"message":"(.*?)"')
+ })
if check == "login" or (check == "json" and self.last_check.group(1) == "Access token expired"):
self.account.relogin()
diff --git a/module/plugins/hoster/ExashareCom.py b/module/plugins/hoster/ExashareCom.py
index 010314491..ac8ed999b 100644
--- a/module/plugins/hoster/ExashareCom.py
+++ b/module/plugins/hoster/ExashareCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class ExashareCom(XFSHoster):
__name__ = "ExashareCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?exashare\.com/\w{12}'
diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py
index 0311ada4b..28a6effa7 100644
--- a/module/plugins/hoster/ExtabitCom.py
+++ b/module/plugins/hoster/ExtabitCom.py
@@ -2,7 +2,7 @@
import re
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, seconds_to_midnight
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, s
class ExtabitCom(SimpleHoster):
__name__ = "ExtabitCom"
__type__ = "hoster"
- __version__ = "0.68"
+ __version__ = "0.69"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?extabit\.com/(file|go|fid)/(?P<ID>\w+)'
@@ -54,7 +54,7 @@ class ExtabitCom(SimpleHoster):
get_data = {'type': "recaptcha"}
get_data['capture'], get_data['challenge'] = recaptcha.challenge(captcha_key)
- res = json_loads(self.load("http://extabit.com/file/%s/" % fileID, get=get_data))
+ res = json.loads(self.load("http://extabit.com/file/%s/" % fileID, get=get_data))
if "ok" in res:
self.captcha.correct()
diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py
index dac8e9404..9e0c799a5 100644
--- a/module/plugins/hoster/FastixRu.py
+++ b/module/plugins/hoster/FastixRu.py
@@ -3,14 +3,14 @@
import re
import urllib
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class FastixRu(MultiHoster):
__name__ = "FastixRu"
__type__ = "hoster"
- __version__ = "0.16"
+ __version__ = "0.17"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fastix\.(ru|it)/file/\w{24}'
@@ -32,7 +32,7 @@ class FastixRu(MultiHoster):
get={'apikey': self.account.get_data('apikey'),
'sub' : "getdirectlink",
'link' : pyfile.url})
- data = json_loads(self.html)
+ data = json.loads(self.html)
self.log_debug("Json data", data)
diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py
index c53e42f1e..1908002e3 100644
--- a/module/plugins/hoster/FastshareCz.py
+++ b/module/plugins/hoster/FastshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FastshareCz(SimpleHoster):
__name__ = "FastshareCz"
__type__ = "hoster"
- __version__ = "0.36"
+ __version__ = "0.37"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+'
diff --git a/module/plugins/hoster/FileApeCom.py b/module/plugins/hoster/FileApeCom.py
index c91024824..7b6bb64f9 100644
--- a/module/plugins/hoster/FileApeCom.py
+++ b/module/plugins/hoster/FileApeCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FileApeCom(DeadHoster):
__name__ = "FileApeCom"
__type__ = "hoster"
- __version__ = "0.13"
- __status__ = "testing"
+ __version__ = "0.14"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?fileape\.com/(index\.php\?act=download\&id=|dl/)\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py
index d3d7ebd40..2091baf30 100644
--- a/module/plugins/hoster/FileSharkPl.py
+++ b/module/plugins/hoster/FileSharkPl.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileSharkPl(SimpleHoster):
__name__ = "FileSharkPl"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+'
diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py
index e7ba300cd..174655444 100644
--- a/module/plugins/hoster/FileStoreTo.py
+++ b/module/plugins/hoster/FileStoreTo.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileStoreTo(SimpleHoster):
__name__ = "FileStoreTo"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?filestore\.to/\?d=(?P<ID>\w+)'
diff --git a/module/plugins/hoster/FilebeerInfo.py b/module/plugins/hoster/FilebeerInfo.py
index 9db53fe19..201d28a30 100644
--- a/module/plugins/hoster/FilebeerInfo.py
+++ b/module/plugins/hoster/FilebeerInfo.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FilebeerInfo(DeadHoster):
__name__ = "FilebeerInfo"
__type__ = "hoster"
- __version__ = "0.04"
- __status__ = "testing"
+ __version__ = "0.05"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?filebeer\.info/(?!\d*~f)(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FileboomMe.py b/module/plugins/hoster/FileboomMe.py
index 56432130a..7472cde10 100644
--- a/module/plugins/hoster/FileboomMe.py
+++ b/module/plugins/hoster/FileboomMe.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileboomMe(SimpleHoster):
__name__ = "FileboomMe"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://f(?:ile)?boom\.me/file/(?P<ID>\w+)'
diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py
index c83813111..c5e126b51 100644
--- a/module/plugins/hoster/FilecloudIo.py
+++ b/module/plugins/hoster/FilecloudIo.py
@@ -2,7 +2,7 @@
import re
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilecloudIo(SimpleHoster):
__name__ = "FilecloudIo"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(?:filecloud\.io|ifile\.it|mihd\.net)/(?P<ID>\w+)'
@@ -71,7 +71,7 @@ class FilecloudIo(SimpleHoster):
json_url = "http://filecloud.io/download-request.json"
res = self.load(json_url, post=data)
self.log_debug(res)
- res = json_loads(res)
+ res = json.loads(res)
if "error" in res and res['error']:
self.fail(res)
@@ -84,7 +84,7 @@ class FilecloudIo(SimpleHoster):
json_url = "http://filecloud.io/download-request.json"
res = self.load(json_url, post=data)
self.log_debug(res)
- res = json_loads(res)
+ res = json.loads(res)
if "retry" in res and res['retry']:
self.retry_captcha()
@@ -114,7 +114,7 @@ class FilecloudIo(SimpleHoster):
rep = self.load("http://api.filecloud.io/api-fetch_download_url.api",
post={'akey': akey, 'ukey': ukey})
self.log_debug("FetchDownloadUrl: " + rep)
- rep = json_loads(rep)
+ rep = json.loads(rep)
if rep['status'] == "ok":
self.link = rep['download_url']
else:
diff --git a/module/plugins/hoster/FiledropperCom.py b/module/plugins/hoster/FiledropperCom.py
index df1000681..1a193c0f7 100644
--- a/module/plugins/hoster/FiledropperCom.py
+++ b/module/plugins/hoster/FiledropperCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FiledropperCom(SimpleHoster):
__name__ = "FiledropperCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?filedropper\.com/\w+'
diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py
index e608d6db0..75d98d5cc 100644
--- a/module/plugins/hoster/FilefactoryCom.py
+++ b/module/plugins/hoster/FilefactoryCom.py
@@ -21,7 +21,7 @@ def get_info(urls):
class FilefactoryCom(SimpleHoster):
__name__ = "FilefactoryCom"
__type__ = "hoster"
- __version__ = "0.59"
+ __version__ = "0.60"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+'
@@ -63,8 +63,10 @@ class FilefactoryCom(SimpleHoster):
def check_download(self):
- check = self.check_file({'multiple': "You are currently downloading too many files at once.",
- 'error' : '<div id="errorMessage">'})
+ check = self.check_file({
+ 'multiple': "You are currently downloading too many files at once.",
+ 'error' : '<div id="errorMessage">'
+ })
if check == "multiple":
self.log_debug("Parallel downloads detected; waiting 15 minutes")
diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py
index 642f39c55..ba13c5665 100644
--- a/module/plugins/hoster/FilejungleCom.py
+++ b/module/plugins/hoster/FilejungleCom.py
@@ -7,7 +7,7 @@ from module.plugins.internal.Plugin import chunks
class FilejungleCom(FileserveCom):
__name__ = "FilejungleCom"
__type__ = "hoster"
- __version__ = "0.53"
+ __version__ = "0.54"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?filejungle\.com/f/(?P<ID>[^/]+)'
diff --git a/module/plugins/hoster/FileomCom.py b/module/plugins/hoster/FileomCom.py
index 678351238..ab886992a 100644
--- a/module/plugins/hoster/FileomCom.py
+++ b/module/plugins/hoster/FileomCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class FileomCom(XFSHoster):
__name__ = "FileomCom"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?fileom\.com/\w{12}'
diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py
index 10af73ff9..726d15b67 100644
--- a/module/plugins/hoster/FilepostCom.py
+++ b/module/plugins/hoster/FilepostCom.py
@@ -3,7 +3,7 @@
import re
import time
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilepostCom(SimpleHoster):
__name__ = "FilepostCom"
__type__ = "hoster"
- __version__ = "0.36"
+ __version__ = "0.37"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(?:filepost\.com/files|fp\.io)/(?P<ID>[^/]+)'
@@ -81,7 +81,7 @@ class FilepostCom(SimpleHoster):
def get_json_response(self, get_dict, post_dict, field):
- res = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
+ res = json.loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
self.log_debug(res)
diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py
index 7e0fd9c29..05a55b233 100644
--- a/module/plugins/hoster/FilepupNet.py
+++ b/module/plugins/hoster/FilepupNet.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilepupNet(SimpleHoster):
__name__ = "FilepupNet"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?filepup\.net/files/\w+'
diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py
index a44728895..068552ce9 100644
--- a/module/plugins/hoster/FilerNet.py
+++ b/module/plugins/hoster/FilerNet.py
@@ -14,7 +14,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilerNet(SimpleHoster):
__name__ = "FilerNet"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+'
diff --git a/module/plugins/hoster/FilerioCom.py b/module/plugins/hoster/FilerioCom.py
index 5d58ecf22..a943b4cad 100644
--- a/module/plugins/hoster/FilerioCom.py
+++ b/module/plugins/hoster/FilerioCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class FilerioCom(XFSHoster):
__name__ = "FilerioCom"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(filerio\.(in|com)|filekeen\.com)/\w{12}'
diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py
index eae9ec1c4..aedd37f8f 100644
--- a/module/plugins/hoster/FilesMailRu.py
+++ b/module/plugins/hoster/FilesMailRu.py
@@ -33,7 +33,7 @@ def get_info(urls):
class FilesMailRu(Hoster):
__name__ = "FilesMailRu"
__type__ = "hoster"
- __version__ = "0.35"
+ __version__ = "0.36"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?files\.mail\.ru/.+'
@@ -105,9 +105,7 @@ class FilesMailRu(Hoster):
#: so i set it to check every download because sometimes there are downloads
#: that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file
#: (Loading 100MB in to ram is not an option)
- check = self.check_file({'html': "<meta name="}, read_size=50000)
- if check == "html":
- self.log_info(_(
- "There was HTML Code in the Downloaded File (%s)...redirect error? The Download will be restarted." %
- self.pyfile.name))
+ if self.check_file({'html': "<meta name="}, read_size=50000) is "html":
+ self.log_info(_("There was HTML Code in the Downloaded File (%s)...redirect error? The Download will be restarted." %
+ self.pyfile.name))
self.retry()
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index c6abbc843..2d797eeb3 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -2,12 +2,11 @@
import re
-from module.common.json_layer import json_loads
from module.network.RequestFactory import getURL as get_url
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.internal.Hoster import Hoster
-from module.plugins.internal.Plugin import chunks, parse_size
from module.plugins.internal.SimpleHoster import seconds_to_midnight
+from module.plugins.internal.utils import chunks, json, parse_size
def check_file(plugin, urls):
@@ -33,7 +32,7 @@ def check_file(plugin, urls):
class FileserveCom(Hoster):
__name__ = "FileserveCom"
__type__ = "hoster"
- __version__ = "0.62"
+ __version__ = "0.63"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fileserve\.com/file/(?P<ID>[^/]+)'
@@ -84,7 +83,7 @@ class FileserveCom(Hoster):
def handle_free(self):
self.html = self.load(self.url)
action = self.load(self.url, post={'checkDownload': "check"})
- action = json_loads(action)
+ action = json.loads(action)
self.log_debug(action)
if "fail" in action:
@@ -162,7 +161,7 @@ class FileserveCom(Hoster):
recaptcha = ReCaptcha(self)
response, challenge = recaptcha.challenge(captcha_key)
- res = json_loads(self.load(self.URLS[2],
+ res = json.loads(self.load(self.URLS[2],
post={'recaptcha_challenge_field' : challenge,
'recaptcha_response_field' : response,
'recaptcha_shortencode_field': self.file_id}))
@@ -187,7 +186,7 @@ class FileserveCom(Hoster):
'password': self.account.get_login('password'),
'shorten': self.file_id})
if res:
- res = json_loads(res)
+ res = json.loads(res)
if res['error_code'] == "302":
premium_url = res['next']
@@ -205,7 +204,8 @@ class FileserveCom(Hoster):
self.download(premium_url or self.pyfile.url)
- if not premium_url and self.check_file({'login': re.compile(self.NOT_LOGGED_IN_PATTERN)}):
+ if not premium_url and \
+ self.check_file({'login': re.compile(self.NOT_LOGGED_IN_PATTERN)}):
self.account.relogin()
self.retry(msg=_("Not logged in"))
diff --git a/module/plugins/hoster/FileshareInUa.py b/module/plugins/hoster/FileshareInUa.py
index 3fb181348..0546db0fc 100644
--- a/module/plugins/hoster/FileshareInUa.py
+++ b/module/plugins/hoster/FileshareInUa.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FileshareInUa(DeadHoster):
__name__ = "FileshareInUa"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?fileshare\.in\.ua/\w{7}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py
index 59c0ea246..a9f41b3ed 100644
--- a/module/plugins/hoster/FilesonicCom.py
+++ b/module/plugins/hoster/FilesonicCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FilesonicCom(DeadHoster):
__name__ = "FilesonicCom"
__type__ = "hoster"
- __version__ = "0.36"
- __status__ = "testing"
+ __version__ = "0.37"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?filesonic\.com/file/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FileuploadNet.py b/module/plugins/hoster/FileuploadNet.py
index 0f1aa6420..9a2736e66 100644
--- a/module/plugins/hoster/FileuploadNet.py
+++ b/module/plugins/hoster/FileuploadNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileuploadNet(SimpleHoster):
__name__ = "FileuploadNet"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(en\.)?file-upload\.net/download-\d+/.+'
diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py
index 249548d13..3bbab7f5d 100644
--- a/module/plugins/hoster/FilezyNet.py
+++ b/module/plugins/hoster/FilezyNet.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FilezyNet(DeadHoster):
__name__ = "FilezyNet"
__type__ = "hoster"
- __version__ = "0.21"
- __status__ = "testing"
+ __version__ = "0.22"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FiredriveCom.py b/module/plugins/hoster/FiredriveCom.py
index cc530a3c5..4ee9ae851 100644
--- a/module/plugins/hoster/FiredriveCom.py
+++ b/module/plugins/hoster/FiredriveCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FiredriveCom(DeadHoster):
__name__ = "FiredriveCom"
__type__ = "hoster"
- __version__ = "0.06"
- __status__ = "testing"
+ __version__ = "0.07"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/(mobile/)?(file|embed)/(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py
index 76ff8d9b4..009a3493a 100644
--- a/module/plugins/hoster/FlyFilesNet.py
+++ b/module/plugins/hoster/FlyFilesNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster
class FlyFilesNet(SimpleHoster):
__name__ = "FlyFilesNet"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?flyfiles\.net/.+'
diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py
index d2c31c837..b357d7a15 100644
--- a/module/plugins/hoster/FourSharedCom.py
+++ b/module/plugins/hoster/FourSharedCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FourSharedCom(SimpleHoster):
__name__ = "FourSharedCom"
__type__ = "hoster"
- __version__ = "0.33"
+ __version__ = "0.34"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?4shared(-china)?\.com/(account/)?(download|get|file|document|photo|video|audio|mp3|office|rar|zip|archive|music)/.+'
diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py
index bb3daf35d..53fc839ad 100644
--- a/module/plugins/hoster/FreakshareCom.py
+++ b/module/plugins/hoster/FreakshareCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import seconds_to_midnight
class FreakshareCom(Hoster):
__name__ = "FreakshareCom"
__type__ = "hoster"
- __version__ = "0.44"
+ __version__ = "0.45"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?freakshare\.(net|com)/files/\S*?/'
@@ -45,11 +45,13 @@ class FreakshareCom(Hoster):
self.download(pyfile.url, post=self.req_opts)
- check = self.check_file({'bad' : "bad try",
- 'paralell' : "> Sorry, you cant download more then 1 files at time. <",
- 'empty' : "Warning: Unknown: Filename cannot be empty",
- 'wrong_captcha' : "Wrong Captcha!",
- 'downloadserver': "No Downloadserver. Please try again later!"})
+ check = self.check_file({
+ 'bad' : "bad try",
+ 'paralell' : "> Sorry, you cant download more then 1 files at time. <",
+ 'empty' : "Warning: Unknown: Filename cannot be empty",
+ 'wrong_captcha' : "Wrong Captcha!",
+ 'downloadserver': "No Downloadserver. Please try again later!"
+ })
if check == "bad":
self.fail(_("Bad Try"))
diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py
index 6a3476813..9f95f43a4 100644
--- a/module/plugins/hoster/FreeWayMe.py
+++ b/module/plugins/hoster/FreeWayMe.py
@@ -6,7 +6,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class FreeWayMe(MultiHoster):
__name__ = "FreeWayMe"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?free-way\.(bz|me)/.+'
diff --git a/module/plugins/hoster/FreevideoCz.py b/module/plugins/hoster/FreevideoCz.py
index ec8734b6a..d4c64328c 100644
--- a/module/plugins/hoster/FreevideoCz.py
+++ b/module/plugins/hoster/FreevideoCz.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FreevideoCz(DeadHoster):
__name__ = "FreevideoCz"
__type__ = "hoster"
- __version__ = "0.31"
- __status__ = "testing"
+ __version__ = "0.32"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?freevideo\.cz/vase-videa/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py
index e0220fff7..c80a18377 100644
--- a/module/plugins/hoster/FshareVn.py
+++ b/module/plugins/hoster/FshareVn.py
@@ -23,7 +23,7 @@ def double_decode(m):
class FshareVn(SimpleHoster):
__name__ = "FshareVn"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fshare\.vn/file/.+'
diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py
index c30ad3c37..260d85ee4 100644
--- a/module/plugins/hoster/Ftp.py
+++ b/module/plugins/hoster/Ftp.py
@@ -2,16 +2,15 @@
import pycurl
import re
-import urllib
import urlparse
-from module.plugins.internal.Hoster import Hoster
+from module.plugins.internal.Hoster import Hoster, parse_name
class Ftp(Hoster):
__name__ = "Ftp"
__type__ = "hoster"
- __version__ = "0.55"
+ __version__ = "0.56"
__status__ = "testing"
__pattern__ = r'(?:ftps?|sftp)://([\w\-.]+(:[\w\-.]+)?@)?[\w\-.]+(:\d+)?/.+'
@@ -25,20 +24,15 @@ class Ftp(Hoster):
def setup(self):
- self.chunk_limit = -1
+ self.chunk_limit = -1
self.resume_download = True
def process(self, pyfile):
- p_url = urlparse.urlparse(pyfile.url)
+ p_url = urlparse.urlparse(pyfile.url)
netloc = p_url.netloc
- pyfile.name = p_url.path.rpartition('/')[2]
- try:
- pyfile.name = urllib.unquote(str(pyfile.name)).decode('utf8')
-
- except Exception:
- pass
+ pyfile.name = parse_name(p_url.path.rpartition('/')[2])
if not "@" in netloc:
self.log_debug("Auth required")
@@ -74,6 +68,7 @@ class Ftp(Hoster):
m = re.search(r"Content-Length:\s*(\d+)", res)
if m is not None:
pyfile.size = int(m.group(1))
+
self.download(pyfile.url)
else:
diff --git a/module/plugins/hoster/GamefrontCom.py b/module/plugins/hoster/GamefrontCom.py
index ef50003fd..c94017946 100644
--- a/module/plugins/hoster/GamefrontCom.py
+++ b/module/plugins/hoster/GamefrontCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class GamefrontCom(SimpleHoster):
__name__ = "GamefrontCom"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?gamefront\.com/files/(?P<ID>\d+)'
diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py
index 2d1ffe7bf..09b2bc29d 100644
--- a/module/plugins/hoster/GigapetaCom.py
+++ b/module/plugins/hoster/GigapetaCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class GigapetaCom(SimpleHoster):
__name__ = "GigapetaCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\w+'
diff --git a/module/plugins/hoster/GooIm.py b/module/plugins/hoster/GooIm.py
index 427d9630a..b92e366b5 100644
--- a/module/plugins/hoster/GooIm.py
+++ b/module/plugins/hoster/GooIm.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class GooIm(SimpleHoster):
__name__ = "GooIm"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?goo\.im/.+'
diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py
index 27141dbe8..00a540e47 100644
--- a/module/plugins/hoster/GoogledriveCom.py
+++ b/module/plugins/hoster/GoogledriveCom.py
@@ -7,13 +7,13 @@ import re
import urlparse
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-from module.utils import html_unescape
+from module.plugins.internal.utils import html_unescape
class GoogledriveCom(SimpleHoster):
__name__ = "GoogledriveCom"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc\?.*id=)'
@@ -45,12 +45,12 @@ class GoogledriveCom(SimpleHoster):
return
link = self.fixurl(link, "https://docs.google.com/")
- direct_link = self.direct_link(link, False)
+ dl = self.is_download(link, redirect=False)
- if not direct_link:
+ if not dl:
self.html = self.load(link)
else:
- self.link = direct_link
+ self.link = dl
break
diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py
index ca2e39b10..1dba2959c 100644
--- a/module/plugins/hoster/HellshareCz.py
+++ b/module/plugins/hoster/HellshareCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class HellshareCz(SimpleHoster):
__name__ = "HellshareCz"
__type__ = "hoster"
- __version__ = "0.86"
+ __version__ = "0.87"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+'
diff --git a/module/plugins/hoster/HellspyCz.py b/module/plugins/hoster/HellspyCz.py
index 499a94413..7faa2edaa 100644
--- a/module/plugins/hoster/HellspyCz.py
+++ b/module/plugins/hoster/HellspyCz.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class HellspyCz(DeadHoster):
__name__ = "HellspyCz"
__type__ = "hoster"
- __version__ = "0.29"
- __status__ = "testing"
+ __version__ = "0.30"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?(?:hellspy\.(?:cz|com|sk|hu|pl)|sciagaj\.pl)(/\S+/\d+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py
index baf80a4d0..c3baf326d 100644
--- a/module/plugins/hoster/HighWayMe.py
+++ b/module/plugins/hoster/HighWayMe.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import seconds_to_midnight
class HighWayMe(MultiHoster):
__name__ = "HighWayMe"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__pattern__ = r'https?://.+high-way\.my'
diff --git a/module/plugins/hoster/HostujeNet.py b/module/plugins/hoster/HostujeNet.py
index 81bcecc58..8b184159e 100644
--- a/module/plugins/hoster/HostujeNet.py
+++ b/module/plugins/hoster/HostujeNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class HostujeNet(SimpleHoster):
__name__ = "HostujeNet"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?hostuje\.net/\w+'
diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py
index 032bd350e..d56c43cdd 100644
--- a/module/plugins/hoster/HotfileCom.py
+++ b/module/plugins/hoster/HotfileCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class HotfileCom(DeadHoster):
__name__ = "HotfileCom"
__type__ = "hoster"
- __version__ = "0.38"
- __status__ = "testing"
+ __version__ = "0.39"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?hotfile\.com/dl/\d+/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/Http.py b/module/plugins/hoster/Http.py
new file mode 100644
index 000000000..ad5f36d43
--- /dev/null
+++ b/module/plugins/hoster/Http.py
@@ -0,0 +1,93 @@
+# -*- coding: utf-8 -*-
+
+import re
+import urlparse
+
+from module.network.HTTPRequest import BadHeader
+from module.plugins.internal.SimpleHoster import create_getInfo
+from module.plugins.internal.Hoster import Hoster
+
+
+class Http(Hoster):
+ __name__ = "Http"
+ __type__ = "hoster"
+ __version__ = "0.02"
+ __status__ = "testing"
+
+ __pattern__ = r'(?:jd|pys?)://.+'
+ __config__ = [("activated", "bool", "Activated", True)]
+
+ __description__ = """Download from http link"""
+ __license__ = "GPLv3"
+ __authors__ = [("RaNaN", "RaNaN@pyload.org"),
+ ("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ def setup(self):
+ self.chunk_limit = -1
+ self.resume_download = True
+
+
+ def process(self, pyfile):
+ url = re.sub(r'^(jd|py)', "http", pyfile.url)
+ netloc = urlparse.urlparse(url).netloc
+
+ link = self.is_download(url)
+
+ if not link:
+ return
+
+ for _i in xrange(2):
+ try:
+ self.download(link, ref=False, disposition=True)
+
+ except BadHeader, e:
+ if e.code in (404, 410):
+ self.offline()
+
+ elif e.code in (401, 403):
+ self.log_debug("Auth required", "Received HTTP status code: %d" % e.code)
+
+ #@TODO: Recheck in 0.4.10
+ if self.account:
+ servers = [x['login'] for x in self.account.getAllAccounts()]
+ else:
+ servers = []
+
+ if netloc in servers:
+ self.log_debug("Logging on to %s" % netloc)
+ self.req.addAuth(self.account.get_login('password'))
+
+ else:
+ pwd = self.get_password()
+ if ':' in pwd:
+ self.req.addAuth(pwd)
+ else:
+ self.fail(_("Authorization required"))
+ else:
+ self.fail(e)
+
+ else:
+ break
+
+ self.check_download()
+
+
+ def check_download(self):
+ errmsg = self.check_file({'Html error' : re.compile(r'\A(?:\s*<.+>)?((?:[\w\s]*(?:[Ee]rror|ERROR)\s*\:?)?\s*\d{3})(?:\Z|\s+)'),
+ 'Html file' : re.compile(r'\A\s*<!DOCTYPE html'),
+ 'Request error': re.compile(r'([Aa]n error occured while processing your request)')})
+ if not errmsg:
+ return
+
+ try:
+ errmsg += " | " + self.last_check.group(1).strip()
+
+ except Exception:
+ pass
+
+ self.log_warning(_("Check result: ") + errmsg, _("Waiting 1 minute and retry"))
+ self.retry(3, 60, errmsg)
+
+
+getInfo = create_getInfo(Http)
diff --git a/module/plugins/hoster/HugefilesNet.py b/module/plugins/hoster/HugefilesNet.py
index 050b8ab98..90391a4e2 100644
--- a/module/plugins/hoster/HugefilesNet.py
+++ b/module/plugins/hoster/HugefilesNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class HugefilesNet(XFSHoster):
__name__ = "HugefilesNet"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?hugefiles\.net/\w{12}'
diff --git a/module/plugins/hoster/HundredEightyUploadCom.py b/module/plugins/hoster/HundredEightyUploadCom.py
index 4dc397caa..00bd9d0cc 100644
--- a/module/plugins/hoster/HundredEightyUploadCom.py
+++ b/module/plugins/hoster/HundredEightyUploadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class HundredEightyUploadCom(XFSHoster):
__name__ = "HundredEightyUploadCom"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?180upload\.com/\w{12}'
diff --git a/module/plugins/hoster/IFileWs.py b/module/plugins/hoster/IFileWs.py
index 2444846d7..061a912ed 100644
--- a/module/plugins/hoster/IFileWs.py
+++ b/module/plugins/hoster/IFileWs.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class IFileWs(DeadHoster):
__name__ = "IFileWs"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?ifile\.ws/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/IcyFilesCom.py b/module/plugins/hoster/IcyFilesCom.py
index 975e6bfc0..d8bdc610e 100644
--- a/module/plugins/hoster/IcyFilesCom.py
+++ b/module/plugins/hoster/IcyFilesCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class IcyFilesCom(DeadHoster):
__name__ = "IcyFilesCom"
__type__ = "hoster"
- __version__ = "0.07"
- __status__ = "testing"
+ __version__ = "0.08"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?icyfiles\.com/(.+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/IfileIt.py b/module/plugins/hoster/IfileIt.py
index a0c435762..5e2e0db1e 100644
--- a/module/plugins/hoster/IfileIt.py
+++ b/module/plugins/hoster/IfileIt.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class IfileIt(DeadHoster):
__name__ = "IfileIt"
__type__ = "hoster"
- __version__ = "0.30"
- __status__ = "testing"
+ __version__ = "0.31"
+ __status__ = "stable"
__pattern__ = r'^unmatchable$'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py
index 76c6c669b..1e41b2564 100644
--- a/module/plugins/hoster/IfolderRu.py
+++ b/module/plugins/hoster/IfolderRu.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class IfolderRu(SimpleHoster):
__name__ = "IfolderRu"
__type__ = "hoster"
- __version__ = "0.40"
+ __version__ = "0.41"
__status__ = "testing"
__pattern__ = r'http://(?:www)?(files\.)?(ifolder\.ru|metalarea\.org|rusfolder\.(com|net|ru))/(files/)?(?P<ID>\d+)'
diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py
index 8784742eb..ee08a4e6b 100644
--- a/module/plugins/hoster/JumbofilesCom.py
+++ b/module/plugins/hoster/JumbofilesCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class JumbofilesCom(SimpleHoster):
__name__ = "JumbofilesCom"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?jumbofiles\.com/(?P<ID>\w{12})'
diff --git a/module/plugins/hoster/JunocloudMe.py b/module/plugins/hoster/JunocloudMe.py
index 37e06afab..63b430f2b 100644
--- a/module/plugins/hoster/JunocloudMe.py
+++ b/module/plugins/hoster/JunocloudMe.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class JunocloudMe(XFSHoster):
__name__ = "JunocloudMe"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'http://(?:\w+\.)?junocloud\.me/\w{12}'
diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py
index f59821feb..d9901abbc 100644
--- a/module/plugins/hoster/Keep2ShareCc.py
+++ b/module/plugins/hoster/Keep2ShareCc.py
@@ -10,8 +10,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class Keep2ShareCc(SimpleHoster):
__name__ = "Keep2ShareCc"
__type__ = "hoster"
- __version__ = "0.26"
- __status__ = "testing"
+ __version__ = "0.27"
+ __status__ = "broken"
__pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)'
__config__ = [("activated", "bool", "Activated", True),
diff --git a/module/plugins/hoster/KickloadCom.py b/module/plugins/hoster/KickloadCom.py
index 2b23b1616..017fbab19 100644
--- a/module/plugins/hoster/KickloadCom.py
+++ b/module/plugins/hoster/KickloadCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class KickloadCom(DeadHoster):
__name__ = "KickloadCom"
__type__ = "hoster"
- __version__ = "0.22"
- __status__ = "testing"
+ __version__ = "0.23"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?kickload\.com/get/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py
index e9b6d00c7..e0f74743c 100644
--- a/module/plugins/hoster/KingfilesNet.py
+++ b/module/plugins/hoster/KingfilesNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class KingfilesNet(SimpleHoster):
__name__ = "KingfilesNet"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P<ID>\w{12})'
diff --git a/module/plugins/hoster/LemUploadsCom.py b/module/plugins/hoster/LemUploadsCom.py
index 1f4f96a1f..fbe0bb798 100644
--- a/module/plugins/hoster/LemUploadsCom.py
+++ b/module/plugins/hoster/LemUploadsCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class LemUploadsCom(DeadHoster):
__name__ = "LemUploadsCom"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?lemuploads\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py
index 7ac1a7d71..99f05a530 100644
--- a/module/plugins/hoster/LetitbitNet.py
+++ b/module/plugins/hoster/LetitbitNet.py
@@ -9,7 +9,7 @@
import re
import urlparse
-from module.common.json_layer import json_loads, json_dumps
+from module.plugins.internal.utils import json
from module.network.RequestFactory import getURL as get_url
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.internal.SimpleHoster import SimpleHoster, seconds_to_midnight
@@ -18,8 +18,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, seconds_to_midnig
def api_response(url):
json_data = ["yw7XQy2v9", ["download/info", {'link': url}]]
api_rep = get_url("http://api.letitbit.net/json",
- post={'r': json_dumps(json_data)})
- return json_loads(api_rep)
+ post={'r': json.dumps(json_data)})
+ return json.loads(api_rep)
def get_info(urls):
@@ -35,7 +35,7 @@ def get_info(urls):
class LetitbitNet(SimpleHoster):
__name__ = "LetitbitNet"
__type__ = "hoster"
- __version__ = "0.33"
+ __version__ = "0.34"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(letitbit|shareflare)\.net/download/.+'
@@ -108,7 +108,7 @@ class LetitbitNet(SimpleHoster):
self.wait(seconds_to_midnight(), True)
elif res.startswith('['):
- urls = json_loads(res)
+ urls = json.loads(res)
elif res.startswith('http://'):
urls = [res]
@@ -123,9 +123,9 @@ class LetitbitNet(SimpleHoster):
premium_key = self.account.get_login('password')
json_data = [self.account.user, ["download/direct_links", {'pass': premium_key, 'link': pyfile.url}]]
- api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)})
+ api_rep = self.load('http://api.letitbit.net/json', post={'r': json.dumps(json_data)})
self.log_debug("API Data: " + api_rep)
- api_rep = json_loads(api_rep)
+ api_rep = json.loads(api_rep)
if api_rep['status'] == "FAIL":
self.fail(api_rep['data'])
diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py
index aa9d9bdcb..809332d9a 100644
--- a/module/plugins/hoster/LinksnappyCom.py
+++ b/module/plugins/hoster/LinksnappyCom.py
@@ -3,14 +3,14 @@
import re
import urlparse
-from module.common.json_layer import json_loads, json_dumps
+from module.plugins.internal.utils import json
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class LinksnappyCom(MultiHoster):
__name__ = "LinksnappyCom"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'https?://(?:[^/]+\.)?linksnappy\.com'
@@ -25,7 +25,7 @@ class LinksnappyCom(MultiHoster):
def handle_premium(self, pyfile):
host = self._get_host(pyfile.url)
- json_params = json_dumps({'link' : pyfile.url,
+ json_params = json.dumps({'link' : pyfile.url,
'type' : host,
'username': self.account.user,
'password': self.account.get_login('password')})
@@ -35,7 +35,7 @@ class LinksnappyCom(MultiHoster):
self.log_debug("JSON data: " + r)
- j = json_loads(r)['links'][0]
+ j = json.loads(r)['links'][0]
if j['error']:
self.error(_("Error converting the link"))
diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py
index 3066e3561..d572f95a4 100644
--- a/module/plugins/hoster/LoadTo.py
+++ b/module/plugins/hoster/LoadTo.py
@@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class LoadTo(SimpleHoster):
__name__ = "LoadTo"
__type__ = "hoster"
- __version__ = "0.25"
+ __version__ = "0.26"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?load\.to/\w+'
diff --git a/module/plugins/hoster/LolabitsEs.py b/module/plugins/hoster/LolabitsEs.py
index 18c845d8e..e91708a10 100644
--- a/module/plugins/hoster/LolabitsEs.py
+++ b/module/plugins/hoster/LolabitsEs.py
@@ -3,13 +3,13 @@
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-from module.utils import html_unescape
+from module.plugins.internal.utils import html_unescape
class LolabitsEs(SimpleHoster):
__name__ = "LolabitsEs"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?lolabits\.es/.+'
diff --git a/module/plugins/hoster/LomafileCom.py b/module/plugins/hoster/LomafileCom.py
index 9e625a1eb..5b11ac257 100644
--- a/module/plugins/hoster/LomafileCom.py
+++ b/module/plugins/hoster/LomafileCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class LomafileCom(DeadHoster):
__name__ = "LomafileCom"
__type__ = "hoster"
- __version__ = "0.53"
- __status__ = "testing"
+ __version__ = "0.54"
+ __status__ = "stable"
__pattern__ = r'http://lomafile\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py
index dc8f6448b..d12f84623 100644
--- a/module/plugins/hoster/LuckyShareNet.py
+++ b/module/plugins/hoster/LuckyShareNet.py
@@ -2,7 +2,7 @@
import re
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class LuckyShareNet(SimpleHoster):
__name__ = "LuckyShareNet"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P<ID>\d{10,})'
@@ -38,7 +38,7 @@ class LuckyShareNet(SimpleHoster):
self.error(_("Unable to detect wait time between free downloads"))
elif 'Hash expired' in rep:
self.retry(msg=_("Hash expired"))
- return json_loads(rep)
+ return json.loads(rep)
#@TODO: There should be a filesize limit for free downloads
@@ -48,14 +48,14 @@ class LuckyShareNet(SimpleHoster):
self.log_debug("JSON: " + rep)
- json = self.parse_json(rep)
- self.wait(json['time'])
+ jso = self.parse_json(rep)
+ self.wait(jso['time'])
recaptcha = ReCaptcha(self)
response, challenge = recaptcha.challenge()
rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" %
- (challenge, response, json['hash']))
+ (challenge, response, jso['hash']))
self.log_debug("JSON: " + rep)
@@ -64,9 +64,9 @@ class LuckyShareNet(SimpleHoster):
elif 'link' in rep:
self.captcha.correct()
- json.update(self.parse_json(rep))
- if json['link']:
- self.link = json['link']
+ jso.update(self.parse_json(rep))
+ if jso['link']:
+ self.link = jso['link']
getInfo = create_getInfo(LuckyShareNet)
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index 9418b4996..7e83f275f 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MediafireCom(SimpleHoster):
__name__ = "MediafireCom"
__type__ = "hoster"
- __version__ = "0.91"
+ __version__ = "0.92"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)(?P<ID>\w+)'
diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py
index 36ad929f4..59d75d445 100644
--- a/module/plugins/hoster/MegaCoNz.py
+++ b/module/plugins/hoster/MegaCoNz.py
@@ -2,18 +2,18 @@
import array
import os
-# import pycurl
import random
import re
+# import pycurl
+
from base64 import standard_b64decode
from Crypto.Cipher import AES
from Crypto.Util import Counter
-from module.common.json_layer import json_loads, json_dumps
from module.plugins.internal.Hoster import Hoster
-from module.utils import decode, fs_decode, fs_encode
+from module.plugins.internal.utils import decode, encode, json
############################ General errors ###################################
@@ -48,7 +48,7 @@ from module.utils import decode, fs_decode, fs_encode
class MegaCoNz(Hoster):
__name__ = "MegaCoNz"
__type__ = "hoster"
- __version__ = "0.31"
+ __version__ = "0.32"
__status__ = "testing"
__pattern__ = r'(https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#(?P<TYPE>N|)!(?P<ID>[\w^_]+)!(?P<KEY>[\w\-,]+)'
@@ -89,9 +89,9 @@ class MegaCoNz(Hoster):
#: Generate a session id, no idea where to obtain elsewhere
uid = random.randint(10 << 9, 10 ** 10)
- res = self.load(self.API_URL, get={'id': uid}, post=json_dumps([kwargs]))
+ res = self.load(self.API_URL, get={'id': uid}, post=json.dumps([kwargs]))
self.log_debug("Api Response: " + res)
- return json_loads(res)
+ return json.loads(res)
def decrypt_attr(self, data, key):
@@ -104,7 +104,7 @@ class MegaCoNz(Hoster):
self.fail(_("Decryption failed"))
#: Data is padded, 0-bytes must be stripped
- return json_loads(re.search(r'{.+?}', attr).group(0))
+ return json.loads(re.search(r'{.+?}', attr).group(0))
def decrypt_file(self, key):
@@ -122,7 +122,7 @@ class MegaCoNz(Hoster):
self.pyfile.setStatus("decrypting")
self.pyfile.setProgress(0)
- file_crypted = fs_encode(self.last_download)
+ file_crypted = encode(self.last_download)
file_decrypted = file_crypted.rsplit(self.FILE_SUFFIX)[0]
try:
@@ -169,7 +169,7 @@ class MegaCoNz(Hoster):
# self.fail(_("Checksum mismatch"))
os.remove(file_crypted)
- self.last_download = fs_decode(file_decrypted)
+ self.last_download = decode(file_decrypted)
def check_error(self, code):
diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py
index b6c7c513c..fa157cc20 100644
--- a/module/plugins/hoster/MegaDebridEu.py
+++ b/module/plugins/hoster/MegaDebridEu.py
@@ -3,14 +3,14 @@
import re
import urllib
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class MegaDebridEu(MultiHoster):
__name__ = "MegaDebridEu"
__type__ = "hoster"
- __version__ = "0.50"
+ __version__ = "0.51"
__status__ = "testing"
__pattern__ = r'http://((?:www\d+\.|s\d+\.)?mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[\w^_]+'
@@ -34,7 +34,7 @@ class MegaDebridEu(MultiHoster):
user, info = self.account.select()
jsonResponse = self.load(self.API_URL,
get={'action': 'connectUser', 'login': user, 'password': info['login']['password']})
- res = json_loads(jsonResponse)
+ res = json.loads(jsonResponse)
if res['response_code'] == "ok":
self.token = res['token']
@@ -55,7 +55,7 @@ class MegaDebridEu(MultiHoster):
get={'action': 'getLink', 'token': self.token},
post={'link': pyfile.url})
- res = json_loads(jsonResponse)
+ res = json.loads(jsonResponse)
if res['response_code'] == "ok":
self.link = res['debridLink'][1:-1]
diff --git a/module/plugins/hoster/MegaFilesSe.py b/module/plugins/hoster/MegaFilesSe.py
index 03c684751..490ced6a7 100644
--- a/module/plugins/hoster/MegaFilesSe.py
+++ b/module/plugins/hoster/MegaFilesSe.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class MegaFilesSe(DeadHoster):
__name__ = "MegaFilesSe"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?megafiles\.se/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py
index 429902307..28746c435 100644
--- a/module/plugins/hoster/MegaRapidCz.py
+++ b/module/plugins/hoster/MegaRapidCz.py
@@ -22,7 +22,7 @@ def get_info(urls):
class MegaRapidCz(SimpleHoster):
__name__ = "MegaRapidCz"
__type__ = "hoster"
- __version__ = "0.59"
+ __version__ = "0.60"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/soubor/\d+/.+'
diff --git a/module/plugins/hoster/MegaRapidoNet.py b/module/plugins/hoster/MegaRapidoNet.py
index caee97fd8..bc002865e 100644
--- a/module/plugins/hoster/MegaRapidoNet.py
+++ b/module/plugins/hoster/MegaRapidoNet.py
@@ -23,7 +23,7 @@ def random_with_n_digits(n):
class MegaRapidoNet(MultiHoster):
__name__ = "MegaRapidoNet"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?\w+\.megarapido\.net/\?file=\w+'
diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py
index 655258e1d..1b0ace9c1 100644
--- a/module/plugins/hoster/MegacrypterCom.py
+++ b/module/plugins/hoster/MegacrypterCom.py
@@ -2,7 +2,7 @@
import re
-from module.common.json_layer import json_loads, json_dumps
+from module.plugins.internal.utils import json
from module.plugins.hoster.MegaCoNz import MegaCoNz
@@ -10,7 +10,7 @@ from module.plugins.hoster.MegaCoNz import MegaCoNz
class MegacrypterCom(MegaCoNz):
__name__ = "MegacrypterCom"
__type__ = "hoster"
- __version__ = "0.23"
+ __version__ = "0.24"
__status__ = "testing"
__pattern__ = r'https?://\w{0,10}\.?megacrypter\.com/[\w\-!]+'
@@ -29,10 +29,10 @@ class MegacrypterCom(MegaCoNz):
"""
Dispatch a call to the api, see megacrypter.com/api_doc
"""
- self.log_debug("JSON request: " + json_dumps(kwargs))
- res = self.load(self.API_URL, post=json_dumps(kwargs))
+ self.log_debug("JSON request: " + json.dumps(kwargs))
+ res = self.load(self.API_URL, post=json.dumps(kwargs))
self.log_debug("API Response: " + res)
- return json_loads(res)
+ return json.loads(res)
def process(self, pyfile):
diff --git a/module/plugins/hoster/MegareleaseOrg.py b/module/plugins/hoster/MegareleaseOrg.py
index ab9a864c9..ec446cbd5 100644
--- a/module/plugins/hoster/MegareleaseOrg.py
+++ b/module/plugins/hoster/MegareleaseOrg.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class MegareleaseOrg(DeadHoster):
__name__ = "MegareleaseOrg"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?megarelease\.org/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py
index 7673032ec..c049e5f5d 100644
--- a/module/plugins/hoster/MegasharesCom.py
+++ b/module/plugins/hoster/MegasharesCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MegasharesCom(SimpleHoster):
__name__ = "MegasharesCom"
__type__ = "hoster"
- __version__ = "0.33"
+ __version__ = "0.34"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(d\d{2}\.)?megashares\.com/((index\.php)?\?d\d{2}=|dl/)\w+'
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index 468734c35..cfa5a0bfc 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class MegauploadCom(DeadHoster):
__name__ = "MegauploadCom"
__type__ = "hoster"
- __version__ = "0.32"
- __status__ = "testing"
+ __version__ = "0.33"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?megaupload\.com/\?.*&?(d|v)=\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/MegavideoCom.py b/module/plugins/hoster/MegavideoCom.py
index a3339a932..96a3683b8 100644
--- a/module/plugins/hoster/MegavideoCom.py
+++ b/module/plugins/hoster/MegavideoCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class MegavideoCom(DeadHoster):
__name__ = "MegavideoCom"
__type__ = "hoster"
- __version__ = "0.22"
- __status__ = "testing"
+ __version__ = "0.23"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?megavideo\.com/\?.*&?(d|v)=\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/MovReelCom.py b/module/plugins/hoster/MovReelCom.py
index f4f32c25c..86d1b2106 100644
--- a/module/plugins/hoster/MovReelCom.py
+++ b/module/plugins/hoster/MovReelCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class MovReelCom(XFSHoster):
__name__ = "MovReelCom"
__type__ = "hoster"
- __version__ = "1.25"
+ __version__ = "1.26"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?movreel\.com/\w{12}'
diff --git a/module/plugins/hoster/MultihostersCom.py b/module/plugins/hoster/MultihostersCom.py
index d951b086b..ee752d2f4 100644
--- a/module/plugins/hoster/MultihostersCom.py
+++ b/module/plugins/hoster/MultihostersCom.py
@@ -6,7 +6,7 @@ from module.plugins.hoster.ZeveraCom import ZeveraCom
class MultihostersCom(ZeveraCom):
__name__ = "MultihostersCom"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)multihosters\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+'
diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py
index d6c31dcb0..b16be7cfc 100644
--- a/module/plugins/hoster/MultishareCz.py
+++ b/module/plugins/hoster/MultishareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MultishareCz(SimpleHoster):
__name__ = "MultishareCz"
__type__ = "hoster"
- __version__ = "0.43"
+ __version__ = "0.44"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P<ID>\d+)'
@@ -41,7 +41,7 @@ class MultishareCz(SimpleHoster):
def handle_multi(self, pyfile):
self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={'link': pyfile.url})
- self.check_info()
+ self.update_info()
if not self.check_traffic():
self.fail(_("Not enough credit left to download file"))
diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py
index 2885a5634..29b40e4c8 100644
--- a/module/plugins/hoster/MyfastfileCom.py
+++ b/module/plugins/hoster/MyfastfileCom.py
@@ -2,14 +2,14 @@
import re
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class MyfastfileCom(MultiHoster):
__name__ = "MyfastfileCom"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__status__ = "testing"
__pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/'
@@ -33,7 +33,7 @@ class MyfastfileCom(MultiHoster):
'link': pyfile.url})
self.log_debug("JSON data: " + self.html)
- self.html = json_loads(self.html)
+ self.html = json.loads(self.html)
if self.html['status'] != 'ok':
self.fail(_("Unable to unrestrict link"))
diff --git a/module/plugins/hoster/MystoreTo.py b/module/plugins/hoster/MystoreTo.py
index 433537e5a..a22e71cb7 100644
--- a/module/plugins/hoster/MystoreTo.py
+++ b/module/plugins/hoster/MystoreTo.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MystoreTo(SimpleHoster):
__name__ = "MystoreTo"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?mystore\.to/dl/.+'
diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py
index 5df1669b8..eb1d283e2 100644
--- a/module/plugins/hoster/MyvideoDe.py
+++ b/module/plugins/hoster/MyvideoDe.py
@@ -3,13 +3,13 @@
import re
from module.plugins.internal.Hoster import Hoster
-from module.utils import html_unescape
+from module.plugins.internal.utils import html_unescape
class MyvideoDe(Hoster):
__name__ = "MyvideoDe"
__type__ = "hoster"
- __version__ = "0.92"
+ __version__ = "0.93"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?myvideo\.de/watch/'
diff --git a/module/plugins/hoster/NahrajCz.py b/module/plugins/hoster/NahrajCz.py
index 0d710c9b0..39511ff1a 100644
--- a/module/plugins/hoster/NahrajCz.py
+++ b/module/plugins/hoster/NahrajCz.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class NahrajCz(DeadHoster):
__name__ = "NahrajCz"
__type__ = "hoster"
- __version__ = "0.22"
- __status__ = "testing"
+ __version__ = "0.23"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?nahraj\.cz/content/download/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py
index 1802f058d..1184bb124 100644
--- a/module/plugins/hoster/NarodRu.py
+++ b/module/plugins/hoster/NarodRu.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class NarodRu(SimpleHoster):
__name__ = "NarodRu"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?narod(\.yandex)?\.ru/(disk|start/\d+\.\w+\-narod\.yandex\.ru)/(?P<ID>\d+)/.+'
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index ff9e75c72..f892d222a 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class NetloadIn(DeadHoster):
__name__ = "NetloadIn"
__type__ = "hoster"
- __version__ = "0.51"
- __status__ = "testing"
+ __version__ = "0.52"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?netload\.(in|me)/(?P<PATH>datei|index\.php\?id=10&file_id=)(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py
index 7e704b8a2..4bd27e741 100644
--- a/module/plugins/hoster/NitroflareCom.py
+++ b/module/plugins/hoster/NitroflareCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster
class NitroflareCom(SimpleHoster):
__name__ = "NitroflareCom"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P<ID>[\w^_]+)'
diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py
index c4f07fbae..9d0b3331e 100644
--- a/module/plugins/hoster/NoPremiumPl.py
+++ b/module/plugins/hoster/NoPremiumPl.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.MultiHoster import MultiHoster
class NoPremiumPl(MultiHoster):
__name__ = "NoPremiumPl"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'https?://direct\.nopremium\.pl.+'
@@ -70,7 +70,7 @@ class NoPremiumPl(MultiHoster):
self.temp_offline("Query error #1")
try:
- parsed = json_loads(data)
+ parsed = json.loads(data)
except Exception:
self.temp_offline("Data not found")
diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py
index 18de2aeeb..3b726b904 100644
--- a/module/plugins/hoster/NosuploadCom.py
+++ b/module/plugins/hoster/NosuploadCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class NosuploadCom(XFSHoster):
__name__ = "NosuploadCom"
__type__ = "hoster"
- __version__ = "0.32"
+ __version__ = "0.33"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?nosupload\.com/\?d=\w{12}'
diff --git a/module/plugins/hoster/NovafileCom.py b/module/plugins/hoster/NovafileCom.py
index a07de6802..0d83a8aee 100644
--- a/module/plugins/hoster/NovafileCom.py
+++ b/module/plugins/hoster/NovafileCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class NovafileCom(XFSHoster):
__name__ = "NovafileCom"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?novafile\.com/\w{12}'
diff --git a/module/plugins/hoster/NowDownloadSx.py b/module/plugins/hoster/NowDownloadSx.py
index 79e964236..5b86746c8 100644
--- a/module/plugins/hoster/NowDownloadSx.py
+++ b/module/plugins/hoster/NowDownloadSx.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class NowDownloadSx(SimpleHoster):
__name__ = "NowDownloadSx"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(nowdownload\.[a-zA-Z]{2,}/(dl/|download\.php.+?id=|mobile/(#/files/|.+?id=))|likeupload\.org/)\w+'
diff --git a/module/plugins/hoster/NowVideoSx.py b/module/plugins/hoster/NowVideoSx.py
index d209d6475..f75072d17 100644
--- a/module/plugins/hoster/NowVideoSx.py
+++ b/module/plugins/hoster/NowVideoSx.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class NowVideoSx(SimpleHoster):
__name__ = "NowVideoSx"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?nowvideo\.[a-zA-Z]{2,}/(video/|mobile/(#/videos/|.+?id=))(?P<ID>\w+)'
diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py
index a73d646e1..cbfda10c7 100644
--- a/module/plugins/hoster/OboomCom.py
+++ b/module/plugins/hoster/OboomCom.py
@@ -5,7 +5,7 @@
import re
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.Hoster import Hoster
from module.plugins.captcha.ReCaptcha import ReCaptcha
@@ -13,7 +13,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha
class OboomCom(Hoster):
__name__ = "OboomCom"
__type__ = "hoster"
- __version__ = "0.39"
+ __version__ = "0.40"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P<ID>\w{8})'
@@ -50,7 +50,7 @@ class OboomCom(Hoster):
def load_url(self, url, get=None):
if get is None:
get = {}
- return json_loads(self.load(url, get))
+ return json.loads(self.load(url, get))
def get_file_id(self, url):
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index 8de529643..7df253e55 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OneFichierCom(SimpleHoster):
__name__ = "OneFichierCom"
__type__ = "hoster"
- __version__ = "0.93"
+ __version__ = "0.94"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(?:\w+\.)?(?P<HOST>1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?\w+)?'
@@ -76,27 +76,11 @@ class OneFichierCom(SimpleHoster):
else:
info = {'status' : 8,
- 'error' : _("Too many redirects")}
+ 'error' : _("Too many redirects")}
return info
- def handle_direct(self, pyfile):
- redirect = pyfile.url
- for i in xrange(self.get_config("maxredirs", plugin="UserAgentSwitcher")):
-
- headers = self.load(redirect, just_header=True)
- if 'location' in headers and headers['location']:
- self.log_debug("Redirect #%d to: %s" % (i, redirect))
- redirect = headers['location']
- else:
- if 'content-type' in headers and headers['content-type'] == "application/octet-stream":
- self.link = pyfile.url
- break
- else:
- self.fail(_("Too many redirects"))
-
-
def handle_free(self, pyfile):
self.check_errors()
@@ -114,7 +98,7 @@ class OneFichierCom(SimpleHoster):
def handle_premium(self, pyfile):
- self.download(pyfile.url, post={'dl': "Download", 'did': 0})
+ self.download(pyfile.url, post={'did': 0, 'dl_no_ssl': "on"})
getInfo = create_getInfo(OneFichierCom)
diff --git a/module/plugins/hoster/OpenloadIo.py b/module/plugins/hoster/OpenloadIo.py
index 8fff581fe..0b394d51c 100644
--- a/module/plugins/hoster/OpenloadIo.py
+++ b/module/plugins/hoster/OpenloadIo.py
@@ -1,16 +1,16 @@
# -*- coding: utf-8 -*-
-import json
import re
from module.network.RequestFactory import getURL
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+from module.plugins.internal.utils import json
class OpenloadIo(SimpleHoster):
__name__ = "OpenloadIo"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.12"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?openload\.(co|io)/(f|embed)/(?P<ID>[\w\-]+)'
@@ -38,12 +38,12 @@ class OpenloadIo(SimpleHoster):
@classmethod
def api_info(cls, url):
- file_id = cls.info['pattern']['ID']
+ file_id = re.match(cls.__pattern__, url).group('ID')
info_json = cls._load_json(cls._FILE_INFO_URI_PATTERN.format(file_id))
file_info = info_json['result'][file_id]
- return {'name' : file_info['name'],
- 'size' : file_info['size']}
+ return {'name': file_info['name'],
+ 'size': file_info['size']}
def setup(self):
diff --git a/module/plugins/hoster/OronCom.py b/module/plugins/hoster/OronCom.py
index e1887ce76..edc800973 100644
--- a/module/plugins/hoster/OronCom.py
+++ b/module/plugins/hoster/OronCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class OronCom(DeadHoster):
__name__ = "OronCom"
__type__ = "hoster"
- __version__ = "0.15"
- __status__ = "testing"
+ __version__ = "0.16"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?oron\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py
index b03d263b9..49d2c305f 100644
--- a/module/plugins/hoster/OverLoadMe.py
+++ b/module/plugins/hoster/OverLoadMe.py
@@ -3,15 +3,14 @@
import re
import urllib
-from module.common.json_layer import json_loads
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
-from module.plugins.internal.Plugin import parse_size
+from module.plugins.internal.utils import json, parse_size
class OverLoadMe(MultiHoster):
__name__ = "OverLoadMe"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__pattern__ = r'https?://.*overload\.me/.+'
@@ -34,7 +33,7 @@ class OverLoadMe(MultiHoster):
get={'auth': data['password'],
'link': pyfile.url})
- data = json_loads(page)
+ data = json.loads(page)
self.log_debug(data)
diff --git a/module/plugins/hoster/PandaplaNet.py b/module/plugins/hoster/PandaplaNet.py
index 4efe20b5a..1e7b5d3bb 100644
--- a/module/plugins/hoster/PandaplaNet.py
+++ b/module/plugins/hoster/PandaplaNet.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class PandaplaNet(DeadHoster):
__name__ = "PandaplaNet"
__type__ = "hoster"
- __version__ = "0.04"
- __status__ = "testing"
+ __version__ = "0.05"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?pandapla\.net/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py
index 13a8dff4d..7520e261f 100644
--- a/module/plugins/hoster/PornhostCom.py
+++ b/module/plugins/hoster/PornhostCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster
class PornhostCom(Hoster):
__name__ = "PornhostCom"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?pornhost\.com/(\d+/\d+\.html|\d+)'
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index fb0299b85..5946497f1 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster
class PornhubCom(Hoster):
__name__ = "PornhubCom"
__type__ = "hoster"
- __version__ = "0.52"
+ __version__ = "0.53"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?pornhub\.com/view_video\.php\?viewkey=\w+'
diff --git a/module/plugins/hoster/PotloadCom.py b/module/plugins/hoster/PotloadCom.py
index 8279412e4..e4f38b000 100644
--- a/module/plugins/hoster/PotloadCom.py
+++ b/module/plugins/hoster/PotloadCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class PotloadCom(DeadHoster):
__name__ = "PotloadCom"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?potload\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py
index 874e19c93..5b90f4d5a 100644
--- a/module/plugins/hoster/PremiumTo.py
+++ b/module/plugins/hoster/PremiumTo.py
@@ -5,13 +5,13 @@ from __future__ import with_statement
import os
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
-from module.utils import fs_encode
+from module.plugins.internal.utils import encode
class PremiumTo(MultiHoster):
__name__ = "PremiumTo"
__type__ = "hoster"
- __version__ = "0.26"
+ __version__ = "0.27"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -45,7 +45,7 @@ class PremiumTo(MultiHoster):
err = ""
if self.req.http.code == "420":
#: Custom error code send - fail
- file = fs_encode(self.last_download)
+ file = encode(self.last_download)
with open(file, "rb") as f:
err = f.read(256).strip()
os.remove(file)
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py
index 918526355..f9f14cb3e 100644
--- a/module/plugins/hoster/PremiumizeMe.py
+++ b/module/plugins/hoster/PremiumizeMe.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class PremiumizeMe(MultiHoster):
__name__ = "PremiumizeMe"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__status__ = "testing"
__pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate
@@ -35,7 +35,7 @@ class PremiumizeMe(MultiHoster):
user, info = self.account.select()
#: Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api)
- data = json_loads(self.load("http://api.premiumize.me/pm-api/v1.php", #@TODO: Revert to `https` in 0.4.10
+ data = json.loads(self.load("http://api.premiumize.me/pm-api/v1.php", #@TODO: Revert to `https` in 0.4.10
get={'method' : "directdownloadlink",
'params[login]': user,
'params[pass]' : info['login']['password'],
diff --git a/module/plugins/hoster/PromptfileCom.py b/module/plugins/hoster/PromptfileCom.py
index ed3daa18e..9db1a495a 100644
--- a/module/plugins/hoster/PromptfileCom.py
+++ b/module/plugins/hoster/PromptfileCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class PromptfileCom(SimpleHoster):
__name__ = "PromptfileCom"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?promptfile\.com/'
diff --git a/module/plugins/hoster/PrzeklejPl.py b/module/plugins/hoster/PrzeklejPl.py
index b066444da..ac6aec196 100644
--- a/module/plugins/hoster/PrzeklejPl.py
+++ b/module/plugins/hoster/PrzeklejPl.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class PrzeklejPl(DeadHoster):
__name__ = "PrzeklejPl"
__type__ = "hoster"
- __version__ = "0.12"
- __status__ = "testing"
+ __version__ = "0.13"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?przeklej\.pl/plik/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/PutdriveCom.py b/module/plugins/hoster/PutdriveCom.py
index d917bf812..ee81596cd 100644
--- a/module/plugins/hoster/PutdriveCom.py
+++ b/module/plugins/hoster/PutdriveCom.py
@@ -6,7 +6,7 @@ from module.plugins.hoster.ZeveraCom import ZeveraCom
class PutdriveCom(ZeveraCom):
__name__ = "PutdriveCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)putdrive\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+'
diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py
index b6600478d..73b4aa48c 100644
--- a/module/plugins/hoster/QuickshareCz.py
+++ b/module/plugins/hoster/QuickshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class QuickshareCz(SimpleHoster):
__name__ = "QuickshareCz"
__type__ = "hoster"
- __version__ = "0.58"
+ __version__ = "0.59"
__status__ = "testing"
__pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+'
diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py
index af3d41946..cc4b0589c 100644
--- a/module/plugins/hoster/RPNetBiz.py
+++ b/module/plugins/hoster/RPNetBiz.py
@@ -3,13 +3,13 @@
import re
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
class RPNetBiz(MultiHoster):
__name__ = "RPNetBiz"
__type__ = "hoster"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__pattern__ = r'https?://.+rpnet\.biz'
@@ -36,7 +36,7 @@ class RPNetBiz(MultiHoster):
'links' : pyfile.url})
self.log_debug("JSON data: %s" % res)
- link_status = json_loads(res)['links'][0] #: Get the first link... since we only queried one
+ link_status = json.loads(res)['links'][0] #: Get the first link... since we only queried one
#: Check if we only have an id as a HDD link
if 'id' in link_status:
@@ -54,7 +54,7 @@ class RPNetBiz(MultiHoster):
'action' : "downloadInformation",
'id' : link_status['id']})
self.log_debug("JSON data hdd query: %s" % res)
- download_status = json_loads(res)['download']
+ download_status = json.loads(res)['download']
if download_status['status'] == "100":
link_status['generated'] = download_status['rpnet_link']
diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py
index 7a5c25297..eedf1a9e4 100644
--- a/module/plugins/hoster/RapideoPl.py
+++ b/module/plugins/hoster/RapideoPl.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.MultiHoster import MultiHoster
class RapideoPl(MultiHoster):
__name__ = "RapideoPl"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -70,7 +70,7 @@ class RapideoPl(MultiHoster):
self.temp_offline("Query error #1")
try:
- parsed = json_loads(data)
+ parsed = json.loads(data)
except Exception:
self.temp_offline("Data not found")
diff --git a/module/plugins/hoster/RapidfileshareNet.py b/module/plugins/hoster/RapidfileshareNet.py
index 9c91ab9b8..4f139d443 100644
--- a/module/plugins/hoster/RapidfileshareNet.py
+++ b/module/plugins/hoster/RapidfileshareNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class RapidfileshareNet(XFSHoster):
__name__ = "RapidfileshareNet"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?rapidfileshare\.net/\w{12}'
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index bb4622386..0b302abd5 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -3,7 +3,7 @@
import pycurl
import re
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.network.HTTPRequest import BadHeader
from module.plugins.captcha.AdsCaptcha import AdsCaptcha
from module.plugins.captcha.ReCaptcha import ReCaptcha
@@ -14,7 +14,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RapidgatorNet(SimpleHoster):
__name__ = "RapidgatorNet"
__type__ = "hoster"
- __version__ = "0.36"
+ __version__ = "0.37"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+'
@@ -65,13 +65,13 @@ class RapidgatorNet(SimpleHoster):
def api_response(self, cmd):
try:
- json = self.load('%s/%s' % (self.API_URL, cmd),
+ html = self.load('%s/%s' % (self.API_URL, cmd),
get={'sid': self.sid,
'url': self.pyfile.url})
- self.log_debug("API:%s" % cmd, json, "SID: %s" % self.sid)
- json = json_loads(json)
- status = json['response_status']
- msg = json['response_details']
+ self.log_debug("API:%s" % cmd, html, "SID: %s" % self.sid)
+ jso = json.loads(html)
+ status = jso['response_status']
+ msg = jso['response_details']
except BadHeader, e:
self.log_error("API: %s" % cmd, e, "SID: %s" % self.sid)
@@ -79,7 +79,7 @@ class RapidgatorNet(SimpleHoster):
msg = e
if status == 200:
- return json['response']
+ return jso['response']
elif status == 423:
self.account.empty()
@@ -156,7 +156,7 @@ class RapidgatorNet(SimpleHoster):
if not res.startswith('{'):
self.retry()
self.log_debug(url, res)
- return json_loads(res)
+ return json.loads(res)
getInfo = create_getInfo(RapidgatorNet)
diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py
index d86cb4184..c06d7ba44 100644
--- a/module/plugins/hoster/RapiduNet.py
+++ b/module/plugins/hoster/RapiduNet.py
@@ -4,7 +4,7 @@ import pycurl
import re
import time
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RapiduNet(SimpleHoster):
__name__ = "RapiduNet"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P<ID>\d{10})'
@@ -78,7 +78,7 @@ class RapiduNet(SimpleHoster):
self.log_debug(res)
- return json_loads(res)
+ return json.loads(res)
getInfo = create_getInfo(RapiduNet)
diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py
index 326476076..339bcdf6f 100644
--- a/module/plugins/hoster/RarefileNet.py
+++ b/module/plugins/hoster/RarefileNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class RarefileNet(XFSHoster):
__name__ = "RarefileNet"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}'
diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py
index a8685d0f8..7c6615391 100644
--- a/module/plugins/hoster/RealdebridCom.py
+++ b/module/plugins/hoster/RealdebridCom.py
@@ -4,15 +4,14 @@ import re
import time
import urllib
-from module.common.json_layer import json_loads
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
-from module.plugins.internal.Plugin import parse_size
+from module.plugins.internal.utils import json, parse_size
class RealdebridCom(MultiHoster):
__name__ = "RealdebridCom"
__type__ = "hoster"
- __version__ = "0.69"
+ __version__ = "0.70"
__status__ = "testing"
__pattern__ = r'https?://((?:www\.|s\d+\.)?real-debrid\.com/dl/|[\w^_]\.rdb\.so/d/)[\w^_]+'
@@ -30,7 +29,7 @@ class RealdebridCom(MultiHoster):
def handle_premium(self, pyfile):
- data = json_loads(self.load("https://real-debrid.com/ajax/unrestrict.php",
+ data = json.loads(self.load("https://real-debrid.com/ajax/unrestrict.php",
get={'lang' : "en",
'link' : pyfile.url,
'password': self.get_password(),
diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py
index b5897ac80..4d93e0149 100644
--- a/module/plugins/hoster/RedtubeCom.py
+++ b/module/plugins/hoster/RedtubeCom.py
@@ -3,13 +3,13 @@
import re
from module.plugins.internal.Hoster import Hoster
-from module.utils import html_unescape
+from module.plugins.internal.utils import html_unescape
class RedtubeCom(Hoster):
__name__ = "RedtubeCom"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?redtube\.com/\d+'
diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py
index 9ec7e8ee6..9365d36fd 100644
--- a/module/plugins/hoster/RehostTo.py
+++ b/module/plugins/hoster/RehostTo.py
@@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class RehostTo(MultiHoster):
__name__ = "RehostTo"
__type__ = "hoster"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__pattern__ = r'https?://.*rehost\.to\..+'
diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py
index dd8072799..f2edb362c 100644
--- a/module/plugins/hoster/RemixshareCom.py
+++ b/module/plugins/hoster/RemixshareCom.py
@@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RemixshareCom(SimpleHoster):
__name__ = "RemixshareCom"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'https?://remixshare\.com/(download|dl)/\w+'
diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py
index 24f398de0..c20224888 100644
--- a/module/plugins/hoster/RgHostNet.py
+++ b/module/plugins/hoster/RgHostNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RgHostNet(SimpleHoster):
__name__ = "RgHostNet"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?rghost\.(net|ru)/[\d\-]+'
diff --git a/module/plugins/hoster/SafesharingEu.py b/module/plugins/hoster/SafesharingEu.py
index 80e289f69..73d458e24 100644
--- a/module/plugins/hoster/SafesharingEu.py
+++ b/module/plugins/hoster/SafesharingEu.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class SafesharingEu(XFSHoster):
__name__ = "SafesharingEu"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?safesharing\.eu/\w{12}'
diff --git a/module/plugins/hoster/SecureUploadEu.py b/module/plugins/hoster/SecureUploadEu.py
index 4e3dcc6a7..af59f5f3a 100644
--- a/module/plugins/hoster/SecureUploadEu.py
+++ b/module/plugins/hoster/SecureUploadEu.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class SecureUploadEu(XFSHoster):
__name__ = "SecureUploadEu"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?secureupload\.eu/\w{12}'
diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py
index b5f8781a3..9c62bdaaf 100644
--- a/module/plugins/hoster/SendspaceCom.py
+++ b/module/plugins/hoster/SendspaceCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SendspaceCom(SimpleHoster):
__name__ = "SendspaceCom"
__type__ = "hoster"
- __version__ = "0.18"
+ __version__ = "0.19"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?sendspace\.com/file/\w+'
diff --git a/module/plugins/hoster/Share4WebCom.py b/module/plugins/hoster/Share4WebCom.py
index 4b1279407..fa4861a89 100644
--- a/module/plugins/hoster/Share4WebCom.py
+++ b/module/plugins/hoster/Share4WebCom.py
@@ -7,7 +7,7 @@ from module.plugins.internal.SimpleHoster import create_getInfo
class Share4WebCom(UnibytesCom):
__name__ = "Share4WebCom"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?share4web\.com/get/\w+'
diff --git a/module/plugins/hoster/Share76Com.py b/module/plugins/hoster/Share76Com.py
index 863fb0a7e..4f0ed74a0 100644
--- a/module/plugins/hoster/Share76Com.py
+++ b/module/plugins/hoster/Share76Com.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class Share76Com(DeadHoster):
__name__ = "Share76Com"
__type__ = "hoster"
- __version__ = "0.05"
- __status__ = "testing"
+ __version__ = "0.06"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?share76\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/ShareFilesCo.py b/module/plugins/hoster/ShareFilesCo.py
index a42ceb91c..b1b67324c 100644
--- a/module/plugins/hoster/ShareFilesCo.py
+++ b/module/plugins/hoster/ShareFilesCo.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class ShareFilesCo(DeadHoster):
__name__ = "ShareFilesCo"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?sharefiles\.co/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SharebeesCom.py b/module/plugins/hoster/SharebeesCom.py
index c987ac0f9..7ee26c9be 100644
--- a/module/plugins/hoster/SharebeesCom.py
+++ b/module/plugins/hoster/SharebeesCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SharebeesCom(DeadHoster):
__name__ = "SharebeesCom"
__type__ = "hoster"
- __version__ = "0.03"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?sharebees\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index 1cf1d5508..1177a7a24 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ShareonlineBiz(SimpleHoster):
__name__ = "ShareonlineBiz"
__type__ = "hoster"
- __version__ = "0.60"
+ __version__ = "0.61"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(share-online\.biz|egoshare\.com)/(download\.php\?id=|dl/)(?P<ID>\w+)'
@@ -38,12 +38,10 @@ class ShareonlineBiz(SimpleHoster):
@classmethod
def api_info(cls, url):
- info = super(ShareonlineBiz, cls).api_info(url)
-
+ info = {}
field = get_url("http://api.share-online.biz/linkcheck.php",
get={'md5' : "1",
'links': re.match(cls.__pattern__, url).group("ID")}).split(";")
-
try:
if field[1] == "OK":
info['fileid'] = field[0]
diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py
index 56bec3002..88d3ad7e4 100644
--- a/module/plugins/hoster/ShareplaceCom.py
+++ b/module/plugins/hoster/ShareplaceCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Hoster import Hoster
class ShareplaceCom(Hoster):
__name__ = "ShareplaceCom"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?shareplace\.(com|org)/\?\w+'
diff --git a/module/plugins/hoster/SharingmatrixCom.py b/module/plugins/hoster/SharingmatrixCom.py
index e6d5d4ab8..6a7ed1dd8 100644
--- a/module/plugins/hoster/SharingmatrixCom.py
+++ b/module/plugins/hoster/SharingmatrixCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SharingmatrixCom(DeadHoster):
__name__ = "SharingmatrixCom"
__type__ = "hoster"
- __version__ = "0.02"
- __status__ = "testing"
+ __version__ = "0.03"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?sharingmatrix\.com/file/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py
index 1313ba0e0..3f63cb92f 100644
--- a/module/plugins/hoster/ShragleCom.py
+++ b/module/plugins/hoster/ShragleCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class ShragleCom(DeadHoster):
__name__ = "ShragleCom"
__type__ = "hoster"
- __version__ = "0.23"
- __status__ = "testing"
+ __version__ = "0.24"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?(cloudnator|shragle)\.com/files/(?P<ID>.+?)/'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py
index 750928ab0..5dffdd3fb 100644
--- a/module/plugins/hoster/SimplyPremiumCom.py
+++ b/module/plugins/hoster/SimplyPremiumCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import seconds_to_midnight
class SimplyPremiumCom(MultiHoster):
__name__ = "SimplyPremiumCom"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'https?://.+simply-premium\.com'
diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py
index 60d35f211..c5dad0a06 100644
--- a/module/plugins/hoster/SimplydebridCom.py
+++ b/module/plugins/hoster/SimplydebridCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo, rep
class SimplydebridCom(MultiHoster):
__name__ = "SimplydebridCom"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__status__ = "testing"
__pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php'
diff --git a/module/plugins/hoster/SizedriveCom.py b/module/plugins/hoster/SizedriveCom.py
index e545b1d28..9659d9438 100644
--- a/module/plugins/hoster/SizedriveCom.py
+++ b/module/plugins/hoster/SizedriveCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SizedriveCom(SimpleHoster):
__name__ = "SizedriveCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?sizedrive\.com/[rd]/(?P<ID>\w+)'
diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py
index 5676e6190..e1400b3bb 100644
--- a/module/plugins/hoster/SmoozedCom.py
+++ b/module/plugins/hoster/SmoozedCom.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.MultiHoster import MultiHoster
class SmoozedCom(MultiHoster):
__name__ = "SmoozedCom"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate
@@ -40,7 +40,7 @@ class SmoozedCom(MultiHoster):
get_data = {'session_key': self.account.get_data('session'),
'url' : pyfile.url}
- data = json_loads(self.load("http://www2.smoozed.com/api/check", get=get_data))
+ data = json.loads(self.load("http://www2.smoozed.com/api/check", get=get_data))
if data['state'] != "ok":
self.fail(data['message'])
diff --git a/module/plugins/hoster/SockshareCom.py b/module/plugins/hoster/SockshareCom.py
index b45a22b72..30fb748bc 100644
--- a/module/plugins/hoster/SockshareCom.py
+++ b/module/plugins/hoster/SockshareCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SockshareCom(DeadHoster):
__name__ = "SockshareCom"
__type__ = "hoster"
- __version__ = "0.06"
- __status__ = "testing"
+ __version__ = "0.07"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?sockshare\.com/(mobile/)?(file|embed)/(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SolidfilesCom.py b/module/plugins/hoster/SolidfilesCom.py
index ee2f12c92..64c05447f 100644
--- a/module/plugins/hoster/SolidfilesCom.py
+++ b/module/plugins/hoster/SolidfilesCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SolidfilesCom(SimpleHoster):
__name__ = "SolidfilesCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?solidfiles\.com\/d/\w+'
diff --git a/module/plugins/hoster/SoundcloudCom.py b/module/plugins/hoster/SoundcloudCom.py
index 90c8acc11..8baf7190a 100644
--- a/module/plugins/hoster/SoundcloudCom.py
+++ b/module/plugins/hoster/SoundcloudCom.py
@@ -3,13 +3,13 @@
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
class SoundcloudCom(SimpleHoster):
__name__ = "SoundcloudCom"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?soundcloud\.com/[\w\-]+/[\w\-]+'
@@ -40,7 +40,7 @@ class SoundcloudCom(SimpleHoster):
client_id = "b45b1aa10f1ac2941910a7f0d10f8e28"
#: Url to retrieve the actual song url
- streams = json_loads(self.load("https://api.soundcloud.com/tracks/%s/streams" % song_id,
+ streams = json.loads(self.load("https://api.soundcloud.com/tracks/%s/streams" % song_id,
get={'client_id': client_id}))
regex = re.compile(r'[^\d]')
diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py
index abba1be79..1ccdfb96a 100644
--- a/module/plugins/hoster/SpeedLoadOrg.py
+++ b/module/plugins/hoster/SpeedLoadOrg.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SpeedLoadOrg(DeadHoster):
__name__ = "SpeedLoadOrg"
__type__ = "hoster"
- __version__ = "1.03"
- __status__ = "testing"
+ __version__ = "1.04"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?speedload\.org/(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SpeedfileCz.py b/module/plugins/hoster/SpeedfileCz.py
index 75a55d490..a4daff030 100644
--- a/module/plugins/hoster/SpeedfileCz.py
+++ b/module/plugins/hoster/SpeedfileCz.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SpeedfileCz(DeadHoster):
__name__ = "SpeedFileCz"
__type__ = "hoster"
- __version__ = "0.33"
- __status__ = "testing"
+ __version__ = "0.34"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?speedfile\.cz/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SpeedyshareCom.py b/module/plugins/hoster/SpeedyshareCom.py
index 727bafd3d..bd7110445 100644
--- a/module/plugins/hoster/SpeedyshareCom.py
+++ b/module/plugins/hoster/SpeedyshareCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SpeedyshareCom(SimpleHoster):
__name__ = "SpeedyshareCom"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(speedyshare\.com|speedy\.sh)/\w+'
diff --git a/module/plugins/hoster/StorageTo.py b/module/plugins/hoster/StorageTo.py
index 3d0852204..0bab30f5d 100644
--- a/module/plugins/hoster/StorageTo.py
+++ b/module/plugins/hoster/StorageTo.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class StorageTo(DeadHoster):
__name__ = "StorageTo"
__type__ = "hoster"
- __version__ = "0.02"
- __status__ = "testing"
+ __version__ = "0.03"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?storage\.to/get/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py
index b52998a15..c5f53d90a 100644
--- a/module/plugins/hoster/StreamCz.py
+++ b/module/plugins/hoster/StreamCz.py
@@ -23,7 +23,7 @@ def get_info(urls):
class StreamCz(Hoster):
__name__ = "StreamCz"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/\d+'
diff --git a/module/plugins/hoster/StreamcloudEu.py b/module/plugins/hoster/StreamcloudEu.py
index f98e2fec9..a440ebc88 100644
--- a/module/plugins/hoster/StreamcloudEu.py
+++ b/module/plugins/hoster/StreamcloudEu.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class StreamcloudEu(XFSHoster):
__name__ = "StreamcloudEu"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?streamcloud\.eu/\w{12}'
diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py
index d6ec4b643..7edb4c80b 100644
--- a/module/plugins/hoster/TurbobitNet.py
+++ b/module/plugins/hoster/TurbobitNet.py
@@ -17,8 +17,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class TurbobitNet(SimpleHoster):
__name__ = "TurbobitNet"
__type__ = "hoster"
- __version__ = "0.23"
- __status__ = "testing"
+ __version__ = "0.24"
+ __status__ = "broken"
__pattern__ = r'http://(?:www\.)?turbobit\.net/(?:download/free/)?(?P<ID>\w+)'
__config__ = [("activated", "bool", "Activated", True),
diff --git a/module/plugins/hoster/TurbouploadCom.py b/module/plugins/hoster/TurbouploadCom.py
index ffb88d53b..79a3d12b8 100644
--- a/module/plugins/hoster/TurbouploadCom.py
+++ b/module/plugins/hoster/TurbouploadCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class TurbouploadCom(DeadHoster):
__name__ = "TurbouploadCom"
__type__ = "hoster"
- __version__ = "0.04"
- __status__ = "testing"
+ __version__ = "0.05"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?turboupload\.com/(\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py
index 74c402a6d..58b0c79f5 100644
--- a/module/plugins/hoster/TusfilesNet.py
+++ b/module/plugins/hoster/TusfilesNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class TusfilesNet(XFSHoster):
__name__ = "TusfilesNet"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?tusfiles\.net/\w{12}'
@@ -25,7 +25,8 @@ class TusfilesNet(XFSHoster):
def setup(self):
self.chunk_limit = -1
- self.multiDL = True
+ self.multiDL = True
+ self.limitDL = 2
self.resume_download = True
diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py
index 8125d0f1e..f81372000 100644
--- a/module/plugins/hoster/TwoSharedCom.py
+++ b/module/plugins/hoster/TwoSharedCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class TwoSharedCom(SimpleHoster):
__name__ = "TwoSharedCom"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+'
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index ce63107e8..938efd118 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -3,7 +3,7 @@
import re
import time
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.Plugin import timestamp
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -16,7 +16,7 @@ def convert_decimal_prefix(m):
class UlozTo(SimpleHoster):
__name__ = "UlozTo"
__type__ = "hoster"
- __version__ = "1.16"
+ __version__ = "1.17"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P<ID>\w+/[^/?]*)'
@@ -75,7 +75,7 @@ class UlozTo(SimpleHoster):
xapca = xapca.replace('sound":"', 'sound":"http:').replace('image":"', 'image":"http:')
self.log_debug("xapca: %s" % xapca)
- data = json_loads(xapca)
+ data = json.loads(xapca)
captcha_value = self.captcha.decrypt(data['image'])
self.log_debug("CAPTCHA HASH: " + data['hash'], "CAPTCHA SALT: %s" % data['salt'], "CAPTCHA VALUE: " + captcha_value)
diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py
index 1495cf25a..dd67937b0 100644
--- a/module/plugins/hoster/UloziskoSk.py
+++ b/module/plugins/hoster/UloziskoSk.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UloziskoSk(SimpleHoster):
__name__ = "UloziskoSk"
__type__ = "hoster"
- __version__ = "0.26"
+ __version__ = "0.27"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?ulozisko\.sk/.+'
diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py
index e0cf5ee1b..44e890b13 100644
--- a/module/plugins/hoster/UnibytesCom.py
+++ b/module/plugins/hoster/UnibytesCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UnibytesCom(SimpleHoster):
__name__ = "UnibytesCom"
__type__ = "hoster"
- __version__ = "0.16"
+ __version__ = "0.17"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?unibytes\.com/[\w\- .]{11}B'
diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py
index 082ad3e02..f30fc1b0e 100644
--- a/module/plugins/hoster/UnrestrictLi.py
+++ b/module/plugins/hoster/UnrestrictLi.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UnrestrictLi(DeadHoster):
__name__ = "UnrestrictLi"
__type__ = "hoster"
- __version__ = "0.24"
- __status__ = "testing"
+ __version__ = "0.25"
+ __status__ = "stable"
__pattern__ = r'https?://(?:www\.)?(unrestrict|unr)\.li/dl/[\w^_]+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py
index 8d7a07047..4b3b488c2 100644
--- a/module/plugins/hoster/UpleaCom.py
+++ b/module/plugins/hoster/UpleaCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class UpleaCom(XFSHoster):
__name__ = "UpleaCom"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}'
diff --git a/module/plugins/hoster/UploadStationCom.py b/module/plugins/hoster/UploadStationCom.py
index 36b766b7e..7fb9282ed 100644
--- a/module/plugins/hoster/UploadStationCom.py
+++ b/module/plugins/hoster/UploadStationCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UploadStationCom(DeadHoster):
__name__ = "UploadStationCom"
__type__ = "hoster"
- __version__ = "0.53"
- __status__ = "testing"
+ __version__ = "0.54"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?uploadstation\.com/file/(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py
index c816278ed..5fd5c0b59 100644
--- a/module/plugins/hoster/UploadableCh.py
+++ b/module/plugins/hoster/UploadableCh.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadableCh(SimpleHoster):
__name__ = "UploadableCh"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P<ID>\w+)'
diff --git a/module/plugins/hoster/UploadboxCom.py b/module/plugins/hoster/UploadboxCom.py
index a1053a413..f686198bd 100644
--- a/module/plugins/hoster/UploadboxCom.py
+++ b/module/plugins/hoster/UploadboxCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UploadboxCom(DeadHoster):
__name__ = "Uploadbox"
__type__ = "hoster"
- __version__ = "0.06"
- __status__ = "testing"
+ __version__ = "0.07"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?uploadbox\.com/files/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index c3c2ade08..cbfbbf5e5 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadedTo(SimpleHoster):
__name__ = "UploadedTo"
__type__ = "hoster"
- __version__ = "0.97"
+ __version__ = "0.98"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)'
@@ -42,7 +42,7 @@ class UploadedTo(SimpleHoster):
@classmethod
def api_info(cls, url):
- info = super(UploadedTo, cls).api_info(url)
+ info = {}
for _i in xrange(5):
html = get_url("http://uploaded.net/api/filemultiple",
diff --git a/module/plugins/hoster/UploadhereCom.py b/module/plugins/hoster/UploadhereCom.py
index a3c41e824..110d050d6 100644
--- a/module/plugins/hoster/UploadhereCom.py
+++ b/module/plugins/hoster/UploadhereCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UploadhereCom(DeadHoster):
__name__ = "UploadhereCom"
__type__ = "hoster"
- __version__ = "0.13"
- __status__ = "testing"
+ __version__ = "0.14"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?uploadhere\.com/\w{10}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py
index d8f07b5f5..0154b4801 100644
--- a/module/plugins/hoster/UploadheroCom.py
+++ b/module/plugins/hoster/UploadheroCom.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadheroCom(SimpleHoster):
__name__ = "UploadheroCom"
__type__ = "hoster"
- __version__ = "0.19"
+ __version__ = "0.20"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?uploadhero\.com?/dl/\w+'
diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py
index 3ca91e652..5f888b7b2 100644
--- a/module/plugins/hoster/UploadingCom.py
+++ b/module/plugins/hoster/UploadingCom.py
@@ -3,7 +3,7 @@
import pycurl
import re
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.Plugin import encode, timestamp
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadingCom(SimpleHoster):
__name__ = "UploadingCom"
__type__ = "hoster"
- __version__ = "0.44"
+ __version__ = "0.45"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?uploading\.com/files/(?:get/)?(?P<ID>\w+)'
@@ -71,7 +71,7 @@ class UploadingCom(SimpleHoster):
self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"])
self.req.http.lastURL = pyfile.url
- res = json_loads(self.load(ajax_url, post={'action': 'second_page', 'code': self.info['pattern']['ID']}))
+ res = json.loads(self.load(ajax_url, post={'action': 'second_page', 'code': self.info['pattern']['ID']}))
if 'answer' in res and 'wait_time' in res['answer']:
wait_time = int(res['answer']['wait_time'])
@@ -80,7 +80,7 @@ class UploadingCom(SimpleHoster):
else:
self.error(_("No AJAX/WAIT"))
- res = json_loads(self.load(ajax_url, post={'action': 'get_link', 'code': self.info['pattern']['ID'], 'pass': 'false'}))
+ res = json.loads(self.load(ajax_url, post={'action': 'get_link', 'code': self.info['pattern']['ID'], 'pass': 'false'}))
if 'answer' in res and 'link' in res['answer']:
url = res['answer']['link']
diff --git a/module/plugins/hoster/UploadkingCom.py b/module/plugins/hoster/UploadkingCom.py
index 54fe47cc8..9a41f7a5d 100644
--- a/module/plugins/hoster/UploadkingCom.py
+++ b/module/plugins/hoster/UploadkingCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UploadkingCom(DeadHoster):
__name__ = "UploadkingCom"
__type__ = "hoster"
- __version__ = "0.15"
- __status__ = "testing"
+ __version__ = "0.16"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?uploadking\.com/\w{10}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py
index dcc156415..4c3b79f0d 100644
--- a/module/plugins/hoster/UpstoreNet.py
+++ b/module/plugins/hoster/UpstoreNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UpstoreNet(SimpleHoster):
__name__ = "UpstoreNet"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?upstore\.net/'
diff --git a/module/plugins/hoster/UptoboxCom.py b/module/plugins/hoster/UptoboxCom.py
index 08cc26bfd..a0024a56f 100644
--- a/module/plugins/hoster/UptoboxCom.py
+++ b/module/plugins/hoster/UptoboxCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class UptoboxCom(XFSHoster):
__name__ = "UptoboxCom"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(uptobox|uptostream)\.com/\w{12}'
diff --git a/module/plugins/hoster/UserscloudCom.py b/module/plugins/hoster/UserscloudCom.py
index f8b6d7703..9a68b15b5 100644
--- a/module/plugins/hoster/UserscloudCom.py
+++ b/module/plugins/hoster/UserscloudCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UserscloudCom(SimpleHoster):
__name__ = "UserscloudCom"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?userscloud\.com/\w{12}'
diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py
index 7f2ca4780..007505d12 100644
--- a/module/plugins/hoster/VeehdCom.py
+++ b/module/plugins/hoster/VeehdCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster
class VeehdCom(Hoster):
__name__ = "VeehdCom"
__type__ = "hoster"
- __version__ = "0.25"
+ __version__ = "0.26"
__status__ = "testing"
__pattern__ = r'http://veehd\.com/video/\d+_\S+'
diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py
index 423db2dbe..15199ef5c 100644
--- a/module/plugins/hoster/VeohCom.py
+++ b/module/plugins/hoster/VeohCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class VeohCom(SimpleHoster):
__name__ = "VeohCom"
__type__ = "hoster"
- __version__ = "0.23"
+ __version__ = "0.24"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?veoh\.com/(tv/)?(watch|videos)/(?P<ID>v\w+)'
diff --git a/module/plugins/hoster/VidPlayNet.py b/module/plugins/hoster/VidPlayNet.py
index e252535be..8b69e6e98 100644
--- a/module/plugins/hoster/VidPlayNet.py
+++ b/module/plugins/hoster/VidPlayNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class VidPlayNet(XFSHoster):
__name__ = "VidPlayNet"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?vidplay\.net/\w{12}'
diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py
index b206e5574..4d321a1ed 100644
--- a/module/plugins/hoster/VimeoCom.py
+++ b/module/plugins/hoster/VimeoCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class VimeoCom(SimpleHoster):
__name__ = "VimeoCom"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(player\.)?vimeo\.com/(video/)?(?P<ID>\d+)'
diff --git a/module/plugins/hoster/Vipleech4UCom.py b/module/plugins/hoster/Vipleech4UCom.py
index 8eac61341..cb8c61b3a 100644
--- a/module/plugins/hoster/Vipleech4UCom.py
+++ b/module/plugins/hoster/Vipleech4UCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class Vipleech4UCom(DeadHoster):
__name__ = "Vipleech4UCom"
__type__ = "hoster"
- __version__ = "0.21"
- __status__ = "testing"
+ __version__ = "0.22"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/VkCom.py b/module/plugins/hoster/VkCom.py
index 245cb8dff..b32e5d2d0 100644
--- a/module/plugins/hoster/VkCom.py
+++ b/module/plugins/hoster/VkCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class VkCom(SimpleHoster):
__name__ = "VkCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?vk\.com/video_ext\.php/\?.+"
diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py
index a356dccdd..7d3053144 100644
--- a/module/plugins/hoster/WarserverCz.py
+++ b/module/plugins/hoster/WarserverCz.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class WarserverCz(DeadHoster):
__name__ = "WarserverCz"
__type__ = "hoster"
- __version__ = "0.14"
- __status__ = "testing"
+ __version__ = "0.15"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py
index eb91974d7..e4a6f53ff 100644
--- a/module/plugins/hoster/WebshareCz.py
+++ b/module/plugins/hoster/WebshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class WebshareCz(SimpleHoster):
__name__ = "WebshareCz"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(en\.)?webshare\.cz/(?:#/)?file/(?P<ID>\w+)'
@@ -24,19 +24,17 @@ class WebshareCz(SimpleHoster):
@classmethod
def api_info(cls, url):
- info = super(WebshareCz, cls).api_info(url)
+ info = {}
+ api = get_url("https://webshare.cz/api/file_info/",
+ post={'ident': re.match(cls.__pattern__, url).group('ID'),
+ 'wst' : ""})
- info['pattern'] = re.match(cls.__pattern__, url).groupdict()
-
- api_data = get_url("https://webshare.cz/api/file_info/",
- post={'ident': info['pattern']['ID'], 'wst': ""})
-
- if not re.search(r'<status>OK', api_data):
+ if not re.search(r'<status>OK', api):
info['status'] = 1
else:
info['status'] = 2
- info['name'] = re.search(r'<name>(.+?)<', api_data).group(1)
- info['size'] = re.search(r'<size>(.+?)<', api_data).group(1)
+ info['name'] = re.search(r'<name>(.+?)<', api).group(1)
+ info['size'] = re.search(r'<size>(.+?)<', api).group(1)
return info
diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py
index 5ea3ad071..a96dfce25 100644
--- a/module/plugins/hoster/WrzucTo.py
+++ b/module/plugins/hoster/WrzucTo.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class WrzucTo(SimpleHoster):
__name__ = "WrzucTo"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?linki/\w+))'
diff --git a/module/plugins/hoster/WuploadCom.py b/module/plugins/hoster/WuploadCom.py
index 028e557e9..6eb7c8bca 100644
--- a/module/plugins/hoster/WuploadCom.py
+++ b/module/plugins/hoster/WuploadCom.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class WuploadCom(DeadHoster):
__name__ = "WuploadCom"
__type__ = "hoster"
- __version__ = "0.24"
- __status__ = "testing"
+ __version__ = "0.25"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?wupload\..+?/file/((\w+/)?\d+)(/.*)?'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/X7To.py b/module/plugins/hoster/X7To.py
index 285499807..65eba227c 100644
--- a/module/plugins/hoster/X7To.py
+++ b/module/plugins/hoster/X7To.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class X7To(DeadHoster):
__name__ = "X7To"
__type__ = "hoster"
- __version__ = "0.42"
- __status__ = "testing"
+ __version__ = "0.43"
+ __status__ = "stable"
__pattern__ = r'http://(?:www\.)?x7\.to/'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py
index e202d23dd..59cfa8af0 100644
--- a/module/plugins/hoster/XFileSharingPro.py
+++ b/module/plugins/hoster/XFileSharingPro.py
@@ -8,10 +8,10 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class XFileSharingPro(XFSHoster):
__name__ = "XFileSharingPro"
__type__ = "hoster"
- __version__ = "0.54"
+ __version__ = "0.56"
__status__ = "testing"
- __pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)'
+ __pattern__ = r'https?://(?:www\.)?(?:\w+\.)*(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,63}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)'
__config__ = [("activated", "bool", "Activated", True)]
__description__ = """XFileSharingPro dummy hoster plugin for hook"""
@@ -37,7 +37,7 @@ class XFileSharingPro(XFSHoster):
def _setup(self):
- account_name = self.classname if self.account.PLUGIN_DOMAIN is None else self.PLUGIN_NAME
+ account_name = self.classname if not self.account or self.account.PLUGIN_DOMAIN is None else self.PLUGIN_NAME
self.chunk_limit = 1
self.multiDL = True
diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py
index 1673797cc..e13a209d1 100644
--- a/module/plugins/hoster/XHamsterCom.py
+++ b/module/plugins/hoster/XHamsterCom.py
@@ -3,7 +3,7 @@
import re
import urllib
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.Hoster import Hoster
@@ -18,7 +18,7 @@ def clean_json(json_expr):
class XHamsterCom(Hoster):
__name__ = "XHamsterCom"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?xhamster\.com/movies/.+'
@@ -62,7 +62,7 @@ class XHamsterCom(Hoster):
self.error(_("flashvar not found"))
j = clean_json(json_flashvar.group(1))
- flashvars = json_loads(j)
+ flashvars = json.loads(j)
if flashvars['srv']:
srv_url = flashvars['srv'] + '/'
diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py
index 04fb6a57c..7447d0636 100644
--- a/module/plugins/hoster/XVideosCom.py
+++ b/module/plugins/hoster/XVideosCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Hoster import Hoster
class XVideosCom(Hoster):
__name__ = "XVideos.com"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?xvideos\.com/video(\d+)'
diff --git a/module/plugins/hoster/XdadevelopersCom.py b/module/plugins/hoster/XdadevelopersCom.py
index a5d2011fd..c5582ee54 100644
--- a/module/plugins/hoster/XdadevelopersCom.py
+++ b/module/plugins/hoster/XdadevelopersCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class XdadevelopersCom(SimpleHoster):
__name__ = "XdadevelopersCom"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?forum\.xda-developers\.com/devdb/project/dl/\?id=\d+'
diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py
index e107caf51..037176303 100644
--- a/module/plugins/hoster/Xdcc.py
+++ b/module/plugins/hoster/Xdcc.py
@@ -9,14 +9,13 @@ import time
from select import select
from module.plugins.internal.Hoster import Hoster
-# from module.utils import decode
-from module.utils import save_join as fs_join
+from module.plugins.internal.utils import fs_join
class Xdcc(Hoster):
__name__ = "Xdcc"
__type__ = "hoster"
- __version__ = "0.34"
+ __version__ = "0.35"
__status__ = "testing"
__config__ = [("nick", "str", "Nickname", "pyload"),
@@ -189,8 +188,8 @@ class Xdcc(Hoster):
self.pyfile.name = packname
- download_folder = self.pyload.config.get("general", "download_folder")
- filename = fs_join(download_folder, packname)
+ dl_folder = self.pyload.config.get("general", "download_folder")
+ filename = fs_join(dl_folder, packname)
self.log_info(_("Downloading %s from %s:%d") % (packname, ip, port))
diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py
index 4e582219d..579046caf 100644
--- a/module/plugins/hoster/YadiSk.py
+++ b/module/plugins/hoster/YadiSk.py
@@ -3,14 +3,14 @@
import re
import random
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class YadiSk(SimpleHoster):
__name__ = "YadiSk"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__status__ = "testing"
__pattern__ = r'https?://yadi\.sk/d/[\w\-]+'
@@ -36,7 +36,7 @@ class YadiSk(SimpleHoster):
m = re.search(r'<script id="models-client" type="application/json">(.+?)</script>', html)
if m is not None:
- api_data = json_loads(m.group(1))
+ api_data = json.loads(m.group(1))
try:
for sect in api_data:
if 'model' in sect:
@@ -80,7 +80,7 @@ class YadiSk(SimpleHoster):
'sk' : self.info['sk'],
'id.0' : self.info['id']})
- self.link = json_loads(self.html)['models'][0]['data']['file']
+ self.link = json.loads(self.html)['models'][0]['data']['file']
except Exception:
pass
diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py
index 11f907e33..675694162 100644
--- a/module/plugins/hoster/YibaishiwuCom.py
+++ b/module/plugins/hoster/YibaishiwuCom.py
@@ -3,14 +3,14 @@
import re
import urlparse
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import json
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class YibaishiwuCom(SimpleHoster):
__name__ = "YibaishiwuCom"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(?:u\.)?115\.com/file/(?P<ID>\w+)'
@@ -38,7 +38,7 @@ class YibaishiwuCom(SimpleHoster):
self.log_debug(('FREEUSER' if m.group(2) == "download" else 'GUEST') + ' URL', url)
- res = json_loads(self.load(urlparse.urljoin("http://115.com/", url), decode=False))
+ res = json.loads(self.load(urlparse.urljoin("http://115.com/", url), decode=False))
if "urls" in res:
mirrors = res['urls']
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py
index 060b196a6..3a01b55ed 100644
--- a/module/plugins/hoster/YoupornCom.py
+++ b/module/plugins/hoster/YoupornCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster
class YoupornCom(Hoster):
__name__ = "YoupornCom"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?youporn\.com/watch/.+'
diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py
index b03f574a1..b5aca71cc 100644
--- a/module/plugins/hoster/YourfilesTo.py
+++ b/module/plugins/hoster/YourfilesTo.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Hoster import Hoster
class YourfilesTo(Hoster):
__name__ = "YourfilesTo"
__type__ = "hoster"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?yourfiles\.(to|biz)/\?d=\w+'
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 47317a029..5563ec12e 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -7,13 +7,13 @@ import urllib
from module.plugins.internal.Hoster import Hoster
from module.plugins.internal.Plugin import replace_patterns, which
-from module.utils import html_unescape
+from module.plugins.internal.utils import html_unescape
class YoutubeCom(Hoster):
__name__ = "YoutubeCom"
__type__ = "hoster"
- __version__ = "0.46"
+ __version__ = "0.47"
__status__ = "testing"
__pattern__ = r'https?://(?:[^/]*\.)?(youtu\.be/|youtube\.com/watch\?(?:.*&)?v=)\w+'
diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py
index 0eb2aa06b..1876ddb15 100644
--- a/module/plugins/hoster/ZDF.py
+++ b/module/plugins/hoster/ZDF.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Hoster import Hoster
class ZDF(Hoster):
__name__ = "ZDF Mediathek"
__type__ = "hoster"
- __version__ = "0.84"
+ __version__ = "0.85"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*'
diff --git a/module/plugins/hoster/ZShareNet.py b/module/plugins/hoster/ZShareNet.py
index b5dd66769..17fd1d105 100644
--- a/module/plugins/hoster/ZShareNet.py
+++ b/module/plugins/hoster/ZShareNet.py
@@ -6,8 +6,8 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class ZShareNet(DeadHoster):
__name__ = "ZShareNet"
__type__ = "hoster"
- __version__ = "0.22"
- __status__ = "testing"
+ __version__ = "0.23"
+ __status__ = "stable"
__pattern__ = r'https?://(?:ww[2w]\.)?zshares?\.net/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/ZahikiNet.py b/module/plugins/hoster/ZahikiNet.py
index fe1b8e0eb..3206ccba4 100644
--- a/module/plugins/hoster/ZahikiNet.py
+++ b/module/plugins/hoster/ZahikiNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ZahikiNet(SimpleHoster):
__name__ = "ZahikiNet"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?zahiki\.net/\w+/.+'
diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py
index 684221904..4f3940f78 100644
--- a/module/plugins/hoster/ZeveraCom.py
+++ b/module/plugins/hoster/ZeveraCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class ZeveraCom(MultiHoster):
__name__ = "ZeveraCom"
__type__ = "hoster"
- __version__ = "0.33"
+ __version__ = "0.34"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)zevera\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+'
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index 7b25d3ff9..437c4b40f 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ZippyshareCom(SimpleHoster):
__name__ = "ZippyshareCom"
__type__ = "hoster"
- __version__ = "0.83"
+ __version__ = "0.84"
__status__ = "testing"
__pattern__ = r'http://www\d{0,3}\.zippyshare\.com/v(/|iew\.jsp.*key=)(?P<KEY>[\w^_]+)'
diff --git a/module/plugins/internal/Account.py b/module/plugins/internal/Account.py
index a6d2ffbf1..469e27cfa 100644
--- a/module/plugins/internal/Account.py
+++ b/module/plugins/internal/Account.py
@@ -2,18 +2,17 @@
import random
import re
-import time
import threading
+import time
-from module.plugins.Plugin import SkipDownload as Skip
-from module.plugins.internal.Plugin import Plugin, parse_size
-from module.utils import compare_time, lock
+from module.plugins.internal.Plugin import Plugin, Skip
+from module.plugins.internal.utils import compare_time, isiterable, lock, parse_size
class Account(Plugin):
__name__ = "Account"
__type__ = "account"
- __version__ = "0.62"
+ __version__ = "0.63"
__status__ = "testing"
__description__ = """Base account plugin"""
@@ -40,7 +39,7 @@ class Account(Plugin):
#: Callback of periodical job task
self.cb = None
- self.interval = self.PERIODICAL_INTERVAL
+ self.interval = None
self.init()
@@ -144,7 +143,7 @@ class Account(Plugin):
self.signin(self.user, self.info['login']['password'], self.info['data'])
except Skip, e:
- self.log_debug(e)
+ self.log_warning(_("Skipped login user `%s`"), e)
self.info['login']['valid'] = True
new_timeout = timestamp - self.info['login']['timestamp']
@@ -190,14 +189,13 @@ class Account(Plugin):
u.update(self.info['login'])
else:
- d = {'login': {'password' : u['password'],
- 'timestamp': u['timestamp'],
- 'valid' : u['valid']},
- 'data' : {'maxtraffic' : u['maxtraffic'],
- 'options' : u['options'],
- 'premium' : u['premium'],
- 'trafficleft': u['trafficleft'],
- 'validuntil' : u['validuntil']}}
+ d = {'login': {}, 'data': {}}
+
+ for k, v in u.items():
+ if k in ('password', 'timestamp', 'valid'):
+ d['login'][k] = v
+ else:
+ d['data'][k] = v
self.info.update(d)
@@ -209,13 +207,9 @@ class Account(Plugin):
def reset(self):
self.sync()
- d = {'maxtraffic' : None,
- 'options' : {'limitdl': ['0']},
- 'premium' : None,
- 'trafficleft': None,
- 'validuntil' : None}
-
- self.info['data'].update(d)
+ clear = lambda x: {} if isinstance(x, dict) else [] if isiterable(x) else None
+ self.info['data'] = dict((k, clear(v)) for k, v in self.info['data'])
+ self.info['data']['options'] = {'limitdl': ['0']}
self.syncback()
@@ -242,9 +236,7 @@ class Account(Plugin):
self.syncback()
- safe_info = dict(self.info)
- safe_info['login']['password'] = "**********"
- self.log_debug("Account info for user `%s`: %s" % (self.user, safe_info))
+ self.log_debug("Account info for user `%s`: %s" % (self.user, self.info))
return self.info
@@ -460,18 +452,9 @@ class Account(Plugin):
###########################################################################
def parse_traffic(self, size, unit="byte"): #@NOTE: Returns kilobytes in 0.4.9
- unit = unit.lower().strip() #@TODO: Remove in 0.4.10
- size = re.search(r'(\d*[\.,]?\d+)', size).group(1) #@TODO: Recheck in 0.4.10
-
- self.log_debug("Size: %s" % size, "Unit: %s" % unit)
-
- #@NOTE: Remove in 0.4.10
- if unit.startswith('t'):
- traffic = float(size.replace(',', '.')) * 1 << 40
- else:
- traffic = parse_size(size, unit)
-
- return traffic / 1024 #@TODO: Remove `/ 1024` in 0.4.10
+ self.log_debug("Size: %s" % size,
+ "Unit: %s" % (unit if unit is not "byte" else "N/D"))
+ return parse_size(size, unit) / 1024 #@TODO: Remove `/ 1024` in 0.4.10
def fail_login(self, msg=_("Login handshake has failed")):
diff --git a/module/plugins/internal/Addon.py b/module/plugins/internal/Addon.py
index e41325a80..5f2e53bf0 100644
--- a/module/plugins/internal/Addon.py
+++ b/module/plugins/internal/Addon.py
@@ -13,7 +13,6 @@ class Expose(object):
def threaded(fn):
-
def run(*args, **kwargs):
hookManager.startThread(fn, *args, **kwargs)
@@ -23,7 +22,7 @@ def threaded(fn):
class Addon(Plugin):
__name__ = "Addon"
__type__ = "hook" #@TODO: Change to `addon` in 0.4.10
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__threaded__ = [] #@TODO: Remove in 0.4.10
@@ -53,12 +52,18 @@ class Addon(Plugin):
#: Callback of periodical job task, used by HookManager
self.cb = None
- self.interval = self.PERIODICAL_INTERVAL
+ self.interval = None
self.init()
self.init_events()
+ #@TODO: Remove in 0.4.10
+ def _log(self, level, plugintype, pluginname, messages):
+ plugintype = "addon" if plugintype is "hook" else plugintype
+ return super(Addon, self)._log(level, plugintype, pluginname, messages)
+
+
def init_events(self):
if self.event_map:
for event, funcs in self.event_map.items():
@@ -126,14 +131,6 @@ class Addon(Plugin):
raise NotImplementedError
- def save_info(self):
- self.store("info", self.info)
-
-
- def restore_info(self):
- self.retrieve("info", self.info)
-
-
@property
def activated(self):
"""
@@ -156,7 +153,7 @@ class Addon(Plugin):
#: Deprecated method, use `deactivate` instead (Remove in 0.4.10)
def unload(self, *args, **kwargs):
- self.save_info()
+ self.store("info", self.info)
return self.deactivate(*args, **kwargs)
@@ -169,7 +166,11 @@ class Addon(Plugin):
#: Deprecated method, use `activate` instead (Remove in 0.4.10)
def coreReady(self, *args, **kwargs):
- self.restore_info()
+ self.retrieve("info", self.info)
+
+ if self.PERIODICAL_INTERVAL:
+ self.start_periodical(self.PERIODICAL_INTERVAL, delay=5)
+
return self.activate(*args, **kwargs)
diff --git a/module/plugins/internal/Base.py b/module/plugins/internal/Base.py
index 6f0a902f3..494d1a8ac 100644
--- a/module/plugins/internal/Base.py
+++ b/module/plugins/internal/Base.py
@@ -34,20 +34,10 @@ def create_getInfo(klass):
return get_info
-#@NOTE: `check_abort` decorator
-def check_abort(fn):
-
- def wrapper(self, *args, **kwargs):
- self.check_abort()
- return fn(self, *args, **kwargs)
-
- return wrapper
-
-
class Base(Plugin):
__name__ = "Base"
__type__ = "base"
- __version__ = "0.11"
+ __version__ = "0.13"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -106,11 +96,11 @@ class Base(Plugin):
def _log(self, level, plugintype, pluginname, messages):
log = getattr(self.pyload.log, level)
msg = u" | ".join(decode(a).strip() for a in messages if a)
- log("%(plugintype)s %(pluginname)s[%(id)s]: %(msg)s"
- % {'plugintype': plugintype.upper(),
- 'pluginname': pluginname,
- 'id' : self.pyfile.id,
- 'msg' : msg})
+ log("%(plugintype)s %(pluginname)s[%(id)s]: %(msg)s" %
+ {'plugintype': plugintype.upper(),
+ 'pluginname': pluginname,
+ 'id' : self.pyfile.id,
+ 'msg' : msg})
@classmethod
@@ -176,6 +166,7 @@ class Base(Plugin):
self.req = self.pyload.requestFactory.getRequest(self.classname)
self.premium = False
+ self.grab_info()
self.setup_base()
self.setup()
@@ -195,22 +186,101 @@ class Base(Plugin):
self.account = False
+ def _update_name(self):
+ name = self.info.get('name')
+
+ if name and name is not self.info.get('url'):
+ self.pyfile.name = name
+ else:
+ name = self.pyfile.name
+
+ self.log_info(_("Link name: ") + name)
+
+
+ def _update_size(self):
+ size = self.info.get('size')
+
+ if size > 0:
+ self.pyfile.size = int(self.info['size']) #@TODO: Fix int conversion in 0.4.10
+ else:
+ size = self.pyfile.size
+
+ if size:
+ self.log_info(_("Link size: %s bytes") % size)
+ else:
+ self.log_info(_("Link size: N/D"))
+
+
+ def _update_status(self):
+ self.pyfile.status = self.info.get('status', 14)
+ self.pyfile.sync()
+
+ self.log_info(_("Link status: ") + self.pyfile.getStatusName())
+
+
+ def sync_info(self):
+ self._update_name()
+ self._update_size()
+ self._update_status()
+
+
+ def grab_info(self):
+ self.log_info(_("Grabbing link info..."))
+
+ old_info = dict(self.info)
+ new_info = self.get_info(self.pyfile.url, self.html)
+
+ self.info.update(new_info)
+
+ self.log_debug("Link info: %s" % self.info)
+ self.log_debug("Previous link info: %s" % old_info)
+
+ self.sync_info()
+
+
+ def check_status(self):
+ status = self.pyfile.status
+
+ if status is 1:
+ self.offline()
+
+ elif status is 4:
+ self.skip(self.pyfile.statusname)
+
+ elif status is 6:
+ self.temp_offline()
+
+ elif status is 8:
+ self.fail()
+
+ elif status is 9 or self.pyfile.abort:
+ self.abort()
+
+
def _process(self, thread):
"""
Handles important things to do before starting
"""
- self.thread = thread
+ self.log_debug("Plugin version: " + self.__version__)
+ self.log_debug("Plugin status: " + self.__status__)
+
+ if self.__status__ is "broken":
+ self.fail(_("Plugin is temporarily unavailable"))
+ elif self.__status__ is "testing":
+ self.log_warning(_("Plugin may be unstable"))
+
+ self.thread = thread
self._setup()
# self.pyload.hookManager.downloadPreparing(self.pyfile) #@TODO: Recheck in 0.4.10
- self.check_abort()
+ self.check_status()
self.pyfile.setStatus("starting")
- self.log_debug("PROCESS URL " + self.pyfile.url,
- "PLUGIN VERSION %s" % self.__version__)
+ self.log_info(_("Processing url: ") + self.pyfile.url)
self.process(self.pyfile)
+ self.check_status()
#: Deprecated method, use `_process` instead (Remove in 0.4.10)
@@ -276,16 +346,16 @@ class Base(Plugin):
if self.wantReconnect:
self.log_info(_("Requiring reconnection..."))
if self.account:
- self.log_warning("Ignore reconnection due logged account")
+ self.log_warning("Reconnection ignored due logged account")
if not self.wantReconnect or self.account:
while pyfile.waitUntil > time.time():
- self.check_abort()
+ self.check_status()
time.sleep(2)
else:
while pyfile.waitUntil > time.time():
- self.check_abort()
+ self.check_status()
self.thread.m.reconnecting.wait(1)
if self.thread.m.reconnecting.isSet():
@@ -309,7 +379,7 @@ class Base(Plugin):
#@TODO: Remove in 0.4.10
- def fail(self, msg):
+ def fail(self, msg=""):
"""
Fail and give msg
"""
@@ -363,7 +433,7 @@ class Base(Plugin):
if not premium:
if self.premium:
- self.rst_free = True
+ self.restart_free = True
else:
self.fail("%s | %s" % (msg, _("Url was already processed as free")))
@@ -405,10 +475,8 @@ class Base(Plugin):
def fixurl(self, url, baseurl=None, unquote=True):
- #url = fixurl(url, unquote=False)
-
- if not baseurl:
- baseurl = fixurl(self.pyfile.url)
+ url = fixurl(url, unquote=True)
+ baseurl = fixurl(baseurl or self.pyfile.url, unquote=True)
if not urlparse.urlparse(url).scheme:
url_p = urlparse.urlparse(baseurl)
@@ -418,114 +486,11 @@ class Base(Plugin):
return fixurl(url, unquote)
- @check_abort
def load(self, *args, **kwargs):
+ self.check_status()
return super(Base, self).load(*args, **kwargs)
- def check_abort(self):
- if not self.pyfile.abort:
- return
-
- if self.pyfile.status is 8:
- self.fail()
-
- elif self.pyfile.status is 4:
- self.skip(self.pyfile.statusname)
-
- elif self.pyfile.status is 1:
- self.offline()
-
- elif self.pyfile.status is 6:
- self.temp_offline()
-
- else:
- self.abort()
-
-
- def direct_link(self, url, redirect=False):
- link = ""
-
- if not redirect:
- conn = 1
-
- elif type(redirect) is int:
- conn = max(redirect, 1)
-
- else:
- conn = self.get_config("maxredirs", 5, plugin="UserAgentSwitcher")
-
- for i in xrange(conn):
- try:
- self.log_debug("Redirect #%d to: %s" % (i, url))
- header = self.load(url, just_header=True)
-
- except Exception: #: Bad bad bad... rewrite this part in 0.4.10
- res = self.load(url,
- just_header=True,
- req=self.pyload.requestFactory.getRequest(self.classname))
-
- header = {'code': req.code}
- for line in res.splitlines():
- line = line.strip()
- if not line or ":" not in line:
- continue
-
- key, none, value = line.partition(":")
- key = key.lower().strip()
- value = value.strip()
-
- if key in header:
- header_key = header.get(key)
- if type(header_key) is list:
- header_key.append(value)
- else:
- header[key] = [header_key, value]
- else:
- header[key] = value
-
- if 'content-disposition' in header:
- link = url
-
- elif header.get('location'):
- location = self.fixurl(header.get('location'), url)
-
- if header.get('code') == 302:
- link = location
-
- if redirect:
- url = location
- continue
-
- else:
- extension = os.path.splitext(parse_name(url))[-1]
-
- if header.get('content-type'):
- mimetype = header.get('content-type').split(';')[0].strip()
-
- elif extension:
- mimetype = mimetypes.guess_type(extension, False)[0] or "application/octet-stream"
-
- else:
- mimetype = ""
-
- if mimetype and (link or 'html' not in mimetype):
- link = url
- else:
- link = ""
-
- break
-
- else:
- try:
- self.log_error(_("Too many redirects"))
-
- except Exception:
- pass
-
- return link
-
-
def parse_html_form(self, attr_str="", input_names={}):
return parse_html_form(attr_str, self.html, input_names)
diff --git a/module/plugins/internal/Captcha.py b/module/plugins/internal/Captcha.py
index a8f48b5e4..5993f0771 100644
--- a/module/plugins/internal/Captcha.py
+++ b/module/plugins/internal/Captcha.py
@@ -6,12 +6,13 @@ import os
import time
from module.plugins.internal.Plugin import Plugin
+from module.plugins.internal.utils import encode
class Captcha(Plugin):
__name__ = "Captcha"
__type__ = "captcha"
- __version__ = "0.46"
+ __version__ = "0.47"
__status__ = "testing"
__description__ = """Base anti-captcha plugin"""
@@ -36,10 +37,8 @@ class Captcha(Plugin):
def _log(self, level, plugintype, pluginname, messages):
- return self.plugin._log(level,
- plugintype,
- self.plugin.__name__,
- (self.__name__,) + messages)
+ messages = (self.__name__,) + messages
+ return self.plugin._log(level, plugintype, self.plugin.__name__, messages)
def recognize(self, image):
@@ -75,7 +74,7 @@ class Captcha(Plugin):
time_ref = ("%.2f" % time.time())[-6:].replace(".", "")
with open(os.path.join("tmp", "captcha_image_%s_%s.%s" % (self.plugin.__name__, time_ref, input_type)), "wb") as tmp_img:
- tmp_img.write(data)
+ tmp_img.write(encode(data))
if ocr:
if isinstance(ocr, basestring):
@@ -94,7 +93,7 @@ class Captcha(Plugin):
self.task.setWaiting(max(timeout, 50)) #@TODO: Move to `CaptchaManager` in 0.4.10
while self.task.isWaiting():
- self.plugin.check_abort()
+ self.plugin.check_status()
time.sleep(1)
finally:
@@ -124,7 +123,7 @@ class Captcha(Plugin):
if not self.task:
return
- self.log_error(_("Invalid captcha"))
+ self.log_warning(_("Invalid captcha"))
self.task.invalid()
diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py
index 20dc60427..96195a6f2 100644
--- a/module/plugins/internal/CaptchaService.py
+++ b/module/plugins/internal/CaptchaService.py
@@ -6,7 +6,7 @@ from module.plugins.internal.Captcha import Captcha
class CaptchaService(Captcha):
__name__ = "CaptchaService"
__type__ = "captcha"
- __version__ = "0.32"
+ __version__ = "0.33"
__status__ = "testing"
__description__ = """Base anti-captcha service plugin"""
diff --git a/module/plugins/internal/Container.py b/module/plugins/internal/Container.py
index 96c7a450c..946953db5 100644
--- a/module/plugins/internal/Container.py
+++ b/module/plugins/internal/Container.py
@@ -6,14 +6,13 @@ import os
import re
from module.plugins.internal.Crypter import Crypter
-from module.plugins.internal.Plugin import exists
-from module.utils import save_join as fs_join
+from module.plugins.internal.utils import encode, exists, fs_join
class Container(Crypter):
__name__ = "Container"
__type__ = "container"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -55,7 +54,7 @@ class Container(Crypter):
self.pyfile.url = fs_join(self.pyload.config.get("general", "download_folder"), self.pyfile.name)
try:
with open(self.pyfile.url, "wb") as f:
- f.write(content)
+ f.write(encode(content))
except IOError, e:
self.fail(e)
diff --git a/module/plugins/internal/Crypter.py b/module/plugins/internal/Crypter.py
index 77b5d74e9..3e5b1f59d 100644
--- a/module/plugins/internal/Crypter.py
+++ b/module/plugins/internal/Crypter.py
@@ -1,14 +1,13 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Base import Base, check_abort, create_getInfo, parse_fileInfo
-from module.plugins.internal.Plugin import parse_name
-from module.utils import save_path as safe_filename
+from module.plugins.internal.Base import Base, create_getInfo, parse_fileInfo
+from module.plugins.internal.utils import fixname, parse_name
class Crypter(Base):
__name__ = "Crypter"
__type__ = "crypter"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -88,7 +87,7 @@ class Crypter(Base):
self.pyload.api.setPackageData(pid, {'password': package_password})
#: Workaround to do not break API addPackage method
- set_folder = lambda x="": self.pyload.api.setPackageData(pid, {'folder': safe_filename(x)})
+ set_folder = lambda x="": self.pyload.api.setPackageData(pid, {'folder': fixname(x)})
if use_subfolder:
if not subfolder_per_package:
diff --git a/module/plugins/internal/DeadCrypter.py b/module/plugins/internal/DeadCrypter.py
index 28ae6ffdb..5618667ba 100644
--- a/module/plugins/internal/DeadCrypter.py
+++ b/module/plugins/internal/DeadCrypter.py
@@ -6,8 +6,8 @@ from module.plugins.internal.Crypter import Crypter, create_getInfo
class DeadCrypter(Crypter):
__name__ = "DeadCrypter"
__type__ = "crypter"
- __version__ = "0.09"
- __status__ = "testing"
+ __version__ = "0.10"
+ __status__ = "stable"
__pattern__ = r'^unmatchable$'
__config__ = [("activated", "bool", "Activated", True)]
diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py
index b7c90ffee..329f2fdea 100644
--- a/module/plugins/internal/DeadHoster.py
+++ b/module/plugins/internal/DeadHoster.py
@@ -6,8 +6,8 @@ from module.plugins.internal.Hoster import Hoster, create_getInfo
class DeadHoster(Hoster):
__name__ = "DeadHoster"
__type__ = "hoster"
- __version__ = "0.19"
- __status__ = "testing"
+ __version__ = "0.20"
+ __status__ = "stable"
__pattern__ = r'^unmatchable$'
__config__ = [("activated", "bool", "Activated", True)]
diff --git a/module/plugins/internal/Extractor.py b/module/plugins/internal/Extractor.py
index 3ab5d6a0d..6629b0652 100644
--- a/module/plugins/internal/Extractor.py
+++ b/module/plugins/internal/Extractor.py
@@ -5,7 +5,19 @@ import re
from module.PyFile import PyFile
from module.plugins.internal.Plugin import Plugin
-from module.utils import fs_encode
+
+
+def renice(pid, value):
+ if not value or os.name is "nt":
+ return
+
+ try:
+ subprocess.Popen(["renice", str(value), str(pid)],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ bufsize=-1)
+ except Exception:
+ pass
class ArchiveError(Exception):
@@ -23,7 +35,7 @@ class PasswordError(Exception):
class Extractor(Plugin):
__name__ = "Extractor"
__type__ = "extractor"
- __version__ = "0.35"
+ __version__ = "0.36"
__status__ = "testing"
__description__ = """Base extractor plugin"""
@@ -73,15 +85,14 @@ class Extractor(Plugin):
@property
def target(self):
- return fs_encode(self.filename)
+ return encode(self.filename)
def __init__(self, plugin, filename, out,
fullpath=True,
overwrite=False,
excludefiles=[],
- renice=0,
- delete='No',
+ renice=False,
keepbroken=False,
fid=None):
"""
@@ -95,8 +106,7 @@ class Extractor(Plugin):
self.fullpath = fullpath
self.overwrite = overwrite
self.excludefiles = excludefiles
- self.renice = renice
- self.delete = delete
+ self.priority = int(priority)
self.keepbroken = keepbroken
self.files = [] #: Store extracted files here
@@ -114,10 +124,8 @@ class Extractor(Plugin):
def _log(self, level, plugintype, pluginname, messages):
- return self.plugin._log(level,
- plugintype,
- self.plugin.__name__,
- (self.__name__,) + messages)
+ messages = (self.__name__,) + messages
+ return self.plugin._log(level, plugintype, self.plugin.__name__, messages)
def verify(self, password=None):
diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py
index b233f8755..f042fb257 100644
--- a/module/plugins/internal/Hoster.py
+++ b/module/plugins/internal/Hoster.py
@@ -5,22 +5,23 @@ from __future__ import with_statement
import os
import re
-from module.plugins.internal.Base import Base, check_abort, create_getInfo, parse_fileInfo
-from module.plugins.internal.Plugin import Fail, Retry, encode, exists, fixurl, parse_name
-from module.utils import fs_decode, fs_encode, save_join as fs_join, save_path as safe_filename
+from module.network.HTTPRequest import BadHeader
+from module.plugins.internal.Base import Base, create_getInfo, parse_fileInfo
+from module.plugins.internal.Plugin import Fail, Retry
+from module.plugins.internal.utils import encode, exists, fixurl, fs_join, parse_name
class Hoster(Base):
__name__ = "Hoster"
__type__ = "hoster"
- __version__ = "0.37"
+ __version__ = "0.38"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("activated" , "bool", "Activated" , True),
- ("use_premium" , "bool", "Use premium account if available" , True),
- ("fallback_premium", "bool", "Fallback to free download if premium fails", True),
- ("chk_filesize" , "bool", "Check file size" , True)]
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
+ ("fallback" , "bool", "Fallback to free download if premium fails", True),
+ ("chk_filesize", "bool", "Check file size" , True)]
__description__ = """Base hoster plugin"""
__license__ = "GPLv3"
@@ -44,13 +45,13 @@ class Hoster(Base):
self.last_check = None
#: Restart flag
- self.rst_free = False #@TODO: Recheck in 0.4.10
+ self.restart_free = False #@TODO: Recheck in 0.4.10
def setup_base(self):
self.last_download = None
self.last_check = None
- self.rst_free = False
+ self.restart_free = False
if self.account:
self.chunk_limit = -1 #: -1 for unlimited
@@ -61,39 +62,39 @@ class Hoster(Base):
def load_account(self):
- if self.rst_free:
+ if self.restart_free:
self.account = False
self.user = None #@TODO: Remove in 0.4.10
else:
super(Hoster, self).load_account()
- # self.rst_free = False
+ # self.restart_free = False
def _process(self, thread):
- """
- Handles important things to do before starting
- """
- self.thread = thread
+ self.log_debug("Plugin version: " + self.__version__)
+ self.log_debug("Plugin status: " + self.__status__)
+ if self.__status__ is "broken":
+ self.fail(_("Plugin is temporarily unavailable"))
+
+ elif self.__status__ is "testing":
+ self.log_warning(_("Plugin may be unstable"))
+
+ self.thread = thread
self._setup()
# self.pyload.hookManager.downloadPreparing(self.pyfile) #@TODO: Recheck in 0.4.10
- self.check_abort()
+ self.check_status()
self.pyfile.setStatus("starting")
try:
- self.log_debug("PROCESS URL " + self.pyfile.url,
- "PLUGIN VERSION %s" % self.__version__) #@TODO: Remove in 0.4.10
self.process(self.pyfile)
-
- self.check_abort()
-
- self.log_debug("CHECK DOWNLOAD") #@TODO: Recheck in 0.4.10
+ self.check_status()
self._check_download()
except Fail, e: #@TODO: Move to PluginThread in 0.4.10
- if self.get_config('fallback_premium', True) and self.premium:
+ if self.get_config('fallback', True) and self.premium:
self.log_warning(_("Premium download failed"), e)
self.restart(premium=False)
@@ -101,7 +102,62 @@ class Hoster(Base):
raise Fail(e)
- @check_abort
+ def is_download(self, url, resume=None, redirect=True):
+ link = False
+ maxredirs = 10
+
+ if resume is None:
+ resume = self.resume_download
+
+ if type(redirect) is int:
+ maxredirs = max(redirect, 1)
+
+ elif redirect:
+ maxredirs = self.get_config("maxredirs", default=maxredirs, plugin="UserAgentSwitcher")
+
+ for i in xrange(maxredirs):
+ self.log_debug("Redirect #%d to: %s" % (i, url))
+
+ header = self.load(url, just_header=True)
+
+ if 'content-disposition' in header:
+ link = url
+
+ elif header.get('location'):
+ location = self.fixurl(header.get('location'), url)
+ code = header.get('code')
+
+ if code is 302:
+ link = location
+
+ elif code is 301:
+ url = location
+ if redirect:
+ continue
+
+ if resume:
+ url = location
+ continue
+
+ else:
+ mimetype = ""
+ contenttype = header.get('content-type')
+ extension = os.path.splitext(parse_name(url))[-1]
+
+ if contenttype:
+ mimetype = contenttype.split(';')[0].strip()
+
+ elif extension:
+ mimetype = mimetypes.guess_type(extension, False)[0] or "application/octet-stream"
+
+ if mimetype and (link or 'html' not in mimetype):
+ link = url
+ else:
+ link = False
+
+ return link
+
+
def download(self, url, get={}, post={}, ref=True, cookies=True, disposition=True, resume=None, chunks=None):
"""
Downloads the content at url to download folder
@@ -115,13 +171,19 @@ class Hoster(Base):
the filename will be changed if needed
:return: The location where the file was saved
"""
+ self.check_status()
+
if self.pyload.debug:
self.log_debug("DOWNLOAD URL " + url,
*["%s=%s" % (key, val) for key, val in locals().items() if key not in ("self", "url", "_[1]")])
- url = self.fixurl(url)
+ dl_url = self.is_download(url, resume)
+ dl_basename = parse_name(self.pyfile.name)
+
+ self.pyfile.name = dl_basename
- self.pyfile.name = parse_name(self.pyfile.name) #: Safe check
+ if not dl_url:
+ self.error("Invalid download url")
self.captcha.correct()
@@ -130,63 +192,75 @@ class Hoster(Base):
self.pyfile.setStatus("downloading")
- download_folder = self.pyload.config.get("general", "download_folder")
- download_location = fs_join(download_folder, self.pyfile.package().folder)
+ dl_folder = self.pyload.config.get("general", "download_folder")
+ dl_dirname = os.path.join(dl_folder, self.pyfile.package().folder)
+ dl_filename = os.path.join(dl_dirname, dl_basename)
- if not exists(download_location):
+ dl_dir = encode(dl_dirname)
+ dl_file = encode(dl_filename) #@TODO: Move safe-filename check to HTTPDownload in 0.4.10
+
+ if not exists(dl_dir):
try:
- os.makedirs(download_location)
+ os.makedirs(dl_dir)
except Exception, e:
self.fail(e)
- self.set_permissions(download_location)
-
- location = fs_decode(download_location)
- filename = os.path.join(location, safe_filename(self.pyfile.name)) #@TODO: Move `safe_filename` check to HTTPDownload in 0.4.10
+ self.set_permissions(dl_dir)
- self.pyload.hookManager.dispatchEvent("download_start", self.pyfile, url, filename)
+ self.pyload.hookManager.dispatchEvent("download_start", self.pyfile, dl_url, dl_filename)
+ self.check_status()
- self.check_abort()
+ dl_chunks = self.pyload.config.get("download", "chunks")
+ chunk_limit = chunks or self.chunk_limit or -1
- chunks = min(self.pyload.config.get("download", "chunks"), chunks or self.chunk_limit or -1)
+ if dl_chunks is -1 or chunk_limit is -1:
+ chunks = max(dl_chunks, chunk_limit)
+ else:
+ chunks = min(dl_chunks, chunk_limit)
- if resume is None:
- resume = self.resume_download
+ resume = self.resume_download if resume is None else bool(resume)
try:
- newname = self.req.httpDownload(url, filename, get=get, post=post, ref=ref,
+ newname = self.req.httpDownload(dl_url, dl_file, get=get, post=post, ref=ref,
cookies=cookies, chunks=chunks, resume=resume,
progressNotify=self.pyfile.setProgress,
disposition=disposition)
+ except BadHeader, e:
+ if e.code in (404, 410):
+ self.pyfile.setStatus("offline")
+ raise BadHeader(e)
+
finally:
self.pyfile.size = self.req.size
#@TODO: Recheck in 0.4.10
if disposition and newname:
- finalname = parse_name(newname).split(' filename*=')[0]
+ safename = parse_name(newname.split(' filename*=')[0])
- if finalname != newname:
+ if safename != newname:
try:
- oldname_enc = fs_join(download_location, newname)
- newname_enc = fs_join(download_location, finalname)
- os.rename(oldname_enc, newname_enc)
+ old_file = fs_join(dl_dirname, newname)
+ new_file = fs_join(dl_dirname, safename)
+ os.rename(old_file, new_file)
except OSError, e:
self.log_warning(_("Error renaming `%s` to `%s`")
- % (newname, finalname), e)
- finalname = newname
+ % (newname, safename), e)
+ safename = newname
+
+ self.log_info(_("`%s` saved as `%s`") % (self.pyfile.name, safename))
- self.log_info(_("`%s` saved as `%s`") % (self.pyfile.name, finalname))
+ self.pyfile.name = safename
- self.pyfile.name = finalname
- filename = os.path.join(location, finalname)
+ dl_filename = os.path.join(dl_dirname, safename)
+ dl_file = encode(dl_filename)
- self.set_permissions(fs_encode(filename))
+ self.set_permissions(dl_file)
- self.last_download = filename
+ self.last_download = dl_filename
- return filename
+ return dl_filename
def check_filesize(self, file_size, size_tolerance=1024):
@@ -199,18 +273,18 @@ class Hoster(Base):
if not self.last_download:
return
- download_location = fs_encode(self.last_download)
- download_size = os.stat(download_location).st_size
+ dl_location = encode(self.last_download)
+ dl_size = os.stat(dl_location).st_size
- if download_size < 1:
+ if dl_size < 1:
self.fail(_("Empty file"))
elif file_size > 0:
- diff = abs(file_size - download_size)
+ diff = abs(file_size - dl_size)
if diff > size_tolerance:
self.fail(_("File size mismatch | Expected file size: %s | Downloaded file size: %s")
- % (file_size, download_size))
+ % (file_size, dl_size))
elif diff != 0:
self.log_warning(_("File size is not equal to expected size"))
@@ -228,7 +302,7 @@ class Hoster(Base):
:return: dictionary key of the first rule that matched
"""
do_delete = False
- last_download = fs_encode(self.last_download) #@TODO: Recheck in 0.4.10
+ last_download = encode(self.last_download) #@TODO: Recheck in 0.4.10
if not self.last_download or not exists(last_download):
self.fail(self.pyfile.error or _("No file downloaded"))
@@ -267,6 +341,8 @@ class Hoster(Base):
def _check_download(self):
+ self.log_info(_("Checking downloaded file..."))
+
if self.captcha.task and not self.last_download:
self.retry_captcha()
@@ -279,6 +355,9 @@ class Hoster(Base):
# For example displayed size can be 1.46GB for example, but real size can be 1.4649853GB
self.check_filesize(self.info['size'], size_tolerance=10485760)
+ else:
+ self.log_info(_("File is OK"))
+
def check_traffic(self):
if not self.account:
@@ -319,18 +398,18 @@ class Hoster(Base):
if pyfile.status in (0, 5, 7, 12): #: (finished, waiting, starting, downloading)
self.skip(pyfile.pluginname)
- download_folder = self.pyload.config.get("general", "download_folder")
- package_folder = pack.folder if self.pyload.config.get("general", "folder_per_package") else ""
- download_location = fs_join(download_folder, package_folder, self.pyfile.name)
+ dl_folder = self.pyload.config.get("general", "download_folder")
+ package_folder = pack.folder if self.pyload.config.get("general", "folder_per_package") else ""
+ dl_location = fs_join(dl_folder, package_folder, self.pyfile.name)
- if not exists(download_location):
+ if not exists(dl_location):
return
pyfile = self.pyload.db.findDuplicates(self.pyfile.id, package_folder, self.pyfile.name)
if pyfile:
self.skip(pyfile[0])
- size = os.stat(download_location).st_size
+ size = os.stat(dl_location).st_size
if size >= self.pyfile.size:
self.skip(_("File exists"))
diff --git a/module/plugins/internal/MultiAccount.py b/module/plugins/internal/MultiAccount.py
index b38670ce7..f9252cc10 100644
--- a/module/plugins/internal/MultiAccount.py
+++ b/module/plugins/internal/MultiAccount.py
@@ -4,27 +4,28 @@ import re
import time
from module.plugins.internal.Account import Account
-from module.utils import decode, remove_chars
+from module.plugins.internal.utils import decode, remove_chars, uniqify
class MultiAccount(Account):
__name__ = "MultiAccount"
__type__ = "account"
- __version__ = "0.02"
- __status__ = "testing"
+ __version__ = "0.04"
+ __status__ = "broken"
- __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
- ("pluginlist" , "str" , "Plugin list (comma separated)", "" ),
- ("reload" , "bool" , "Reload plugin list" , True ),
- ("reloadinterval", "int" , "Reload interval in hours" , 12 )]
+ __config__ = [("activated" , "bool" , "Activated" , True ),
+ ("multi" , "bool" , "Multi-hoster" , True ),
+ ("multi_mode" , "all;listed;unlisted", "Hosters to use" , "all"),
+ ("multi_list" , "str" , "Hoster list (comma separated)", "" ),
+ ("multi_interval", "int" , "Reload interval in hours" , 12 )]
- __description__ = """Multi hoster account plugin"""
+ __description__ = """Multi-hoster account plugin"""
__license__ = "GPLv3"
- __authors__ = [("pyLoad Team" , "admin@pyload.org" ),
- ("Walter Purcaro", "vuolter@gmail.com")]
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- REFRESH_INTERVAL = 1 * 60 * 60 #: 1 hour
+ # PERIODICAL_INTERVAL = 1 * 60 * 60 #: 1 hour
+ PERIODICAL_LOGIN = False
DOMAIN_REPLACEMENTS = [(r'180upload\.com' , "hundredeightyupload.com"),
(r'bayfiles\.net' , "bayfiles.com" ),
@@ -54,153 +55,96 @@ class MultiAccount(Account):
(r'^0' , "zero" )]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
def init(self):
- self.plugins = []
- self.supported = []
- self.new_supported = []
+ self.plugins = []
+ self.supported = []
+ self.newsupported = []
- self.account = None
self.pluginclass = None
self.pluginmodule = None
- self.pluginname = None
self.plugintype = None
self.init_plugin()
def init_plugin(self):
- self.pluginname = self.__name__.rsplit("Hook", 1)[0]
- plugin, self.plugintype = self.pyload.pluginManager.findPlugin(self.pluginname)
+ plugin, self.plugintype = self.pyload.pluginManager.findPlugin(self.classname)
if plugin:
- self.pluginmodule = self.pyload.pluginManager.loadModule(self.plugintype, self.pluginname)
- self.pluginclass = getattr(self.pluginmodule, self.pluginname)
+ self.pluginmodule = self.pyload.pluginManager.loadModule(self.plugintype, self.classname)
+ self.pluginclass = self.pyload.pluginManager.loadClass(self.plugintype, self.classname)
else:
- self.log_warning(_("Hook plugin will be deactivated due missing plugin reference"))
- self.set_config('activated', False)
+ self.log_warning(_("Multi-hoster feature will be deactivated due missing plugin reference"))
+ self.set_config('multi', False)
- def load_account(self):
- self.account = self.pyload.accountManager.getAccountPlugin(self.pluginname)
+ def activate(self):
+ interval = self.get_config('multi_interval') * 60 * 60
+ self.start_periodical(interval, threaded=True)
- if self.account and not self.account.select()[0]:
- self.account = False
- if not self.account and hasattr(self.pluginclass, "LOGIN_ACCOUNT") and self.pluginclass.LOGIN_ACCOUNT:
- self.log_warning(_("Hook plugin will be deactivated due missing account reference"))
- self.set_config('activated', False)
+ def replace_domains(self, list):
+ for r in self.DOMAIN_REPLACEMENTS:
+ pattern, repl = r
+ regex = re.compile(pattern, re.I | re.U)
+ domains = [regex.sub(repl, domain) if regex.match(domain) else domain for domain in list]
+ return domains
- def activate(self):
- self.init_periodical(threaded=True)
+ def parse_domains(self, list):
+ regexp = re.compile(r'^(?:https?://)?(?:www\.)?(?:\w+\.)*((?:[\d.]+|[\w\-^_]{3,63}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)',
+ re.I | re.U)
- def plugins_cached(self):
- if self.plugins:
- return self.plugins
+ r'^(?:https?://)?(?:www\.)?(?:\w+\.)*((?:[\d.]+|[\w\-^_]{3,63}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)'
- for _i in xrange(5):
- try:
- pluginset = self._plugin_set(self.grab_hosters())
- break
+ domains = [decode(domain).strip().lower() for url in list for domain in regexp.findall(url)]
+ return self.replace_domains(uniqify(domains))
- except Exception, e:
- self.log_warning(e, _("Waiting 1 minute and retry"))
- time.sleep(60)
- else:
- self.log_error(_("No hoster list retrieved"))
- self.interval = self.REFRESH_INTERVAL
- return list()
+ def _grab_hosters(self):
try:
- configmode = self.get_config('pluginmode', 'all')
- if configmode in ("listed", "unlisted"):
- pluginlist = self.get_config('pluginlist', '').replace('|', ',').replace(';', ',').split(',')
- configset = self._plugin_set(pluginlist)
+ hosterlist = self.grab_hosters(self.user, self.info['login']['password'], self.info['data'])
- if configmode == "listed":
- pluginset &= configset
- else:
- pluginset -= configset
+ if hosterlist and isinstance(hosterlist, list):
+ domains = self.parse_domains(hosterlist)
+ self.info['data']['hosters'] = sorted(domains)
except Exception, e:
- self.log_error(e)
+ self.log_warning(_("Error loading hoster list for user `%s`") % self.user, e, trace=True)
- self.plugins = list(pluginset)
-
- return self.plugins
-
-
- def _plugin_set(self, plugins):
- regexp = re.compile(r'^[\w\-.^_]{3,63}\.[a-zA-Z]{2,}$', re.U)
- plugins = [decode(p.strip()).lower() for p in plugins if regexp.match(p.strip())]
-
- for r in self.DOMAIN_REPLACEMENTS:
- rf, rt = r
- repr = re.compile(rf, re.I|re.U)
- plugins = [re.sub(rf, rt, p) if repr.match(p) else p for p in plugins]
-
- return set(plugins)
+ finally:
+ return self.info['data']['hosters']
def grab_hosters(self, user, password, data):
"""
Load list of supported hoster
-
:return: List of domain names
"""
raise NotImplementedError
def periodical(self):
- """
- Reload plugin list periodically
- """
- self.load_account()
-
- if self.get_config('reload', True):
- self.interval = max(self.get_config('reloadinterval', 12) * 60 * 60, self.REFRESH_INTERVAL)
+ if not self.info['data'].get('hosters'):
+ self.log_info(_("Loading hoster list for user `%s`...") % self.user)
else:
- self.pyload.scheduler.removeJob(self.cb)
- self.cb = None
+ self.log_info(_("Reloading hoster list for user `%s`...") % self.user)
+
+ if self.PERIODICAL_LOGIN and not self.logged:
+ self.relogin()
- self.log_info(_("Reloading supported %s list") % self.plugintype)
+ hosters = self._grab_hosters()
+
+ self.log_debug("Hoster list for user `%s`: %s" % (self.user, hosters))
old_supported = self.supported
- self.supported = []
- self.new_supported = []
- self.plugins = []
+ self.supported = []
+ self.newsupported = []
+ self.plugins = []
- self.override_plugins()
+ self._override()
old_supported = [plugin for plugin in old_supported if plugin not in self.supported]
@@ -209,8 +153,10 @@ class MultiAccount(Account):
for plugin in old_supported:
self.unload_plugin(plugin)
+ self.set_interval(self.get_config('multi_interval') * 60 * 60)
+
- def override_plugins(self):
+ def _override(self):
excludedList = []
if self.plugintype == "hoster":
@@ -229,9 +175,9 @@ class MultiAccount(Account):
if name in pluginMap:
self.supported.append(pluginMap[name])
else:
- self.new_supported.append(plugin)
+ self.newsupported.append(plugin)
- if not self.supported and not self.new_supported:
+ if not self.supported and not self.newsupported:
self.log_error(_("No %s loaded") % self.plugintype)
return
@@ -241,13 +187,13 @@ class MultiAccount(Account):
for plugin in self.supported:
hdict = self.pyload.pluginManager.plugins[self.plugintype][plugin]
hdict['new_module'] = self.pluginmodule
- hdict['new_name'] = self.pluginname
+ hdict['new_name'] = self.classname
if excludedList:
self.log_info(_("%ss not overwritten: %s") % (self.plugintype.capitalize(), ", ".join(sorted(excludedList))))
- if self.new_supported:
- plugins = sorted(self.new_supported)
+ if self.newsupported:
+ plugins = sorted(self.newsupported)
self.log_debug("New %ss: %s" % (self.plugintype, ", ".join(plugins)))
@@ -258,30 +204,66 @@ class MultiAccount(Account):
self.log_debug("Regexp: %s" % regexp)
- hdict = self.pyload.pluginManager.plugins[self.plugintype][self.pluginname]
+ hdict = self.pyload.pluginManager.plugins[self.plugintype][self.classname]
hdict['pattern'] = regexp
hdict['re'] = re.compile(regexp)
- def unload_plugin(self, plugin):
- hdict = self.pyload.pluginManager.plugins[self.plugintype][plugin]
- if "module" in hdict:
- hdict.pop('module', None)
+ def plugins_cached(self):
+ if self.plugins:
+ return self.plugins
- if "new_module" in hdict:
- hdict.pop('new_module', None)
- hdict.pop('new_name', None)
+ for _i in xrange(5):
+ try:
+ pluginset = self._plugin_set(self.grab_hosters())
+ break
+ except Exception, e:
+ self.log_warning(e, _("Waiting 1 minute and retry"), trace=True)
+ time.sleep(60)
+ else:
+ self.log_warning(_("No hoster list retrieved"))
+ self.interval = self.PERIODICAL_INTERVAL
+ return list()
- def deactivate(self):
- """
- Remove override for all plugins. Scheduler job is removed by hookmanager
- """
- for plugin in self.supported:
- self.unload_plugin(plugin)
+ try:
+ configmode = self.get_config('pluginmode', 'all')
+ if configmode in ("listed", "unlisted"):
+ pluginlist = self.get_config('pluginlist', '').replace('|', ',').replace(';', ',').split(',')
+ configset = self._plugin_set(pluginlist)
+
+ if configmode == "listed":
+ pluginset &= configset
+ else:
+ pluginset -= configset
+
+ except Exception, e:
+ self.log_error(e)
+
+ self.plugins = list(pluginset)
+
+ return self.plugins
+
+
+ # def unload_plugin(self, plugin):
+ # hdict = self.pyload.pluginManager.plugins[self.plugintype][plugin]
+ # if "module" in hdict:
+ # hdict.pop('module', None)
+
+ # if "new_module" in hdict:
+ # hdict.pop('new_module', None)
+ # hdict.pop('new_name', None)
+
+
+ # def deactivate(self):
+ # """
+ # Remove override for all plugins. Scheduler job is removed by hookmanager
+ # """
+ # for plugin in self.supported:
+ # self.unload_plugin(plugin)
#: Reset pattern
- hdict = self.pyload.pluginManager.plugins[self.plugintype][self.pluginname]
+ # hdict = self.pyload.pluginManager.plugins[self.plugintype][self.classname]
- hdict['pattern'] = getattr(self.pluginclass, "__pattern__", r'^unmatchable$')
- hdict['re'] = re.compile(hdict['pattern'])
+ # hdict['pattern'] = getattr(self.pluginclass, "__pattern__", r'^unmatchable$')
+ # hdict['re'] = re.compile(hdict['pattern'])
diff --git a/module/plugins/internal/MultiCrypter.py b/module/plugins/internal/MultiCrypter.py
index 900f72589..916ac9cdd 100644
--- a/module/plugins/internal/MultiCrypter.py
+++ b/module/plugins/internal/MultiCrypter.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter
class MultiCrypter(SimpleCrypter):
__name__ = "MultiCrypter"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -25,7 +25,5 @@ class MultiCrypter(SimpleCrypter):
def _log(self, level, plugintype, pluginname, messages):
- return super(MultiCrypter, self)._log(level,
- plugintype,
- pluginname,
- (self.PLUGIN_NAME,) + messages)
+ messages = (self.PLUGIN_NAME,) + messages
+ return self.plugin._log(level, plugintype, pluginname, messages)
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index 5655571b8..8baa577f9 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -9,15 +9,15 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, r
class MultiHoster(SimpleHoster):
__name__ = "MultiHoster"
__type__ = "hoster"
- __version__ = "0.53"
+ __version__ = "0.54"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("activated" , "bool", "Activated" , True),
- ("use_premium" , "bool", "Use premium account if available" , True),
- ("fallback_premium", "bool", "Fallback to free download if premium fails", True),
- ("chk_filesize" , "bool", "Check file size" , True),
- ("revertfailed" , "bool", "Revert to standard download if fails" , True)]
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
+ ("fallback" , "bool", "Fallback to free download if premium fails", True),
+ ("chk_filesize", "bool", "Check file size" , True),
+ ("revertfailed", "bool", "Revert to standard download if fails" , True)]
__description__ = """Multi hoster plugin"""
__license__ = "GPLv3"
@@ -35,10 +35,8 @@ class MultiHoster(SimpleHoster):
def _log(self, level, plugintype, pluginname, messages):
- return super(MultiHoster, self)._log(level,
- plugintype,
- pluginname,
- (self.PLUGIN_NAME,) + messages)
+ messages = (self.PLUGIN_NAME,) + messages
+ return self.plugin._log(level, plugintype, pluginname, messages)
def setup(self):
@@ -66,47 +64,13 @@ class MultiHoster(SimpleHoster):
self.direct_dl = direct_dl
- def process(self, pyfile):
+ def _process(self, thread):
try:
- self.prepare()
- self.check_info() #@TODO: Remove in 0.4.10
+ super(MultiHoster, self)._process(thread)
- if self.direct_dl:
- self.log_info(_("Looking for direct download link..."))
- self.handle_direct(pyfile)
-
- if self.link or was_downloaded():
- self.log_info(_("Direct download link detected"))
- else:
- self.log_info(_("Direct download link not found"))
-
- if not self.link and not self.last_download:
- self.preload()
-
- self.check_errors()
- self.check_status(getinfo=False)
-
- if self.premium and (not self.CHECK_TRAFFIC or self.check_traffic()):
- self.log_info(_("Processing as premium download..."))
- self.handle_premium(pyfile)
-
- elif not self.LOGIN_ACCOUNT or (not self.CHECK_TRAFFIC or self.check_traffic()):
- self.log_info(_("Processing as free download..."))
- self.handle_free(pyfile)
-
- if not self.last_download:
- self.log_info(_("Downloading file..."))
- self.download(self.link, disposition=self.DISPOSITION)
-
- self.check_download()
-
- except Fail, e: #@TODO: Move to PluginThread in 0.4.10
- if self.premium:
- self.log_warning(_("Premium download failed"))
- self.restart(premium=False)
-
- elif self.get_config("revertfailed", True) and \
- self.pyload.pluginManager.hosterPlugins[self.classname].get('new_module'):
+ except Fail, e:
+ if self.get_config("revertfailed", True) and \
+ self.pyload.pluginManager.hosterPlugins[self.classname].get('new_module'):
hdict = self.pyload.pluginManager.hosterPlugins[self.classname]
tmp_module = hdict['new_module']
@@ -122,7 +86,7 @@ class MultiHoster(SimpleHoster):
self.restart(_("Revert to original hoster plugin"))
else:
- raise Fail(encode(e)) #@TODO: Remove `encode` in 0.4.10
+ raise Fail(e)
def handle_premium(self, pyfile):
diff --git a/module/plugins/internal/OCR.py b/module/plugins/internal/OCR.py
index ccadbbcbc..78ad383ca 100644
--- a/module/plugins/internal/OCR.py
+++ b/module/plugins/internal/OCR.py
@@ -14,13 +14,13 @@ import subprocess
# import tempfile
from module.plugins.internal.Plugin import Plugin
-from module.utils import save_join as fs_join
+from module.plugins.internal.utils import fs_join
class OCR(Plugin):
__name__ = "OCR"
__type__ = "ocr"
- __version__ = "0.20"
+ __version__ = "0.21"
__status__ = "testing"
__description__ = """OCR base plugin"""
@@ -42,10 +42,8 @@ class OCR(Plugin):
def _log(self, level, plugintype, pluginname, messages):
- return self.plugin._log(level,
- plugintype,
- self.plugin.__name__,
- (self.__name__,) + messages)
+ messages = (self.__name__,) + messages
+ return self.plugin._log(level, plugintype, self.plugin.__name__, messages)
def load_image(self, image):
@@ -88,7 +86,7 @@ class OCR(Plugin):
tmpTxt.close()
except IOError, e:
- self.log_error(e, trace=True)
+ self.log_error(e)
return
self.pyload.log_debug("Saving tiff...")
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
index c1b994d02..ccecb8c47 100644
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -2,289 +2,25 @@
from __future__ import with_statement
-import datetime
import inspect
import os
-import re
-import sys
-import time
-import traceback
-import urllib
-import urlparse
-
-import pycurl
if os.name is not "nt":
import grp
import pwd
-from module.common.json_layer import json_dumps, json_loads
-from module.plugins.Plugin import Abort, Fail, Reconnect, Retry, SkipDownload as Skip #@TODO: Remove in 0.4.10
-from module.utils import (fs_encode, fs_decode, get_console_encoding, html_unescape,
- parseFileSize as parse_size, save_join as fs_join)
-
-
-#@TODO: Move to utils in 0.4.10
-def isiterable(obj):
- return hasattr(obj, "__iter__")
-
-
-#@TODO: Move to utils in 0.4.10
-def decode(string, encoding=None):
- """Encoded string (default to UTF-8) -> unicode string"""
- if type(string) is str:
- try:
- res = unicode(string, encoding or "utf-8")
-
- except UnicodeDecodeError, e:
- if encoding:
- raise UnicodeDecodeError(e)
-
- encoding = get_console_encoding(sys.stdout.encoding)
- res = unicode(string, encoding)
-
- elif type(string) is unicode:
- res = string
-
- else:
- res = unicode(string)
-
- return res
-
-
-#@TODO: Remove in 0.4.10
-def _decode(*args, **kwargs):
- return decode(*args, **kwargs)
-
-
-#@TODO: Move to utils in 0.4.10
-def encode(string, encoding=None, decoding=None):
- """Unicode or decoded string -> encoded string (default to UTF-8)"""
- if type(string) is unicode:
- res = string.encode(encoding or "utf-8")
-
- elif type(string) is str:
- res = encode(decode(string, decoding), encoding)
-
- else:
- res = str(string)
-
- return res
-
-
-#@TODO: Move to utils in 0.4.10
-def exists(path):
- if os.path.exists(path):
- if os.name is "nt":
- dir, name = os.path.split(path.rstrip(os.sep))
- return name in os.listdir(dir)
- else:
- return True
- else:
- return False
-
-
-def fixurl(url, unquote=None):
- newurl = urllib.unquote(url)
-
- if unquote is None:
- unquote = newurl == url
-
- newurl = html_unescape(decode(newurl).decode('unicode-escape'))
- newurl = re.sub(r'(?<!:)/{2,}', '/', newurl).strip().lstrip('.')
-
- if not unquote:
- newurl = urllib.quote(newurl)
-
- return newurl
-
-
-def parse_name(string):
- path = fixurl(decode(string), unquote=False)
- url_p = urlparse.urlparse(path.rstrip('/'))
- name = (url_p.path.split('/')[-1] or
- url_p.query.split('=', 1)[::-1][0].split('&', 1)[0] or
- url_p.netloc.split('.', 1)[0])
-
- return urllib.unquote(name)
-
-
-#@TODO: Move to utils in 0.4.10
-def str2int(string):
- try:
- return int(string)
- except:
- pass
-
- ones = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight",
- "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen",
- "sixteen", "seventeen", "eighteen", "nineteen"]
- tens = ["", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy",
- "eighty", "ninety"]
-
- o_tuple = [(w, i) for i, w in enumerate(ones)]
- t_tuple = [(w, i * 10) for i, w in enumerate(tens)]
-
- numwords = dict(o_tuple + t_tuple)
- tokens = re.split(r"[\s\-]+", string.lower())
-
- try:
- return sum(numwords[word] for word in tokens)
- except:
- return 0
-
-
-def parse_time(string):
- if re.search("da(il)?y|today", string):
- seconds = seconds_to_midnight()
-
- else:
- regex = re.compile(r'(\d+| (?:this|an?) )\s*(hr|hour|min|sec|)', re.I)
- seconds = sum((int(v) if v.strip() not in ("this", "a", "an") else 1) *
- {'hr': 3600, 'hour': 3600, 'min': 60, 'sec': 1, '': 1}[u.lower()]
- for v, u in regex.findall(string))
- return seconds
-
-
-#@TODO: Move to utils in 0.4.10
-def timestamp():
- return int(time.time() * 1000)
-
-
-#@TODO: Move to utils in 0.4.10
-def which(program):
- """
- Works exactly like the unix command which
- Courtesy of http://stackoverflow.com/a/377028/675646
- """
- isExe = lambda x: os.path.isfile(x) and os.access(x, os.X_OK)
-
- fpath, fname = os.path.split(program)
-
- if fpath:
- if isExe(program):
- return program
- else:
- for path in os.environ['PATH'].split(os.pathsep):
- exe_file = os.path.join(path.strip('"'), program)
- if isExe(exe_file):
- return exe_file
-
-
-#@TODO: Move to utils in 0.4.10
-def format_exc(frame=None):
- """
- Format call-stack and display exception information (if availible)
- """
- exception_info = sys.exc_info()
- callstack_list = traceback.extract_stack(frame)
- callstack_list = callstack_list[:-1]
-
- exception_desc = ""
- if exception_info[0] is not None:
- exception_callstack_list = traceback.extract_tb(exception_info[2])
- if callstack_list[-1][0] == exception_callstack_list[0][0]: #Does this exception belongs to us?
- callstack_list = callstack_list[:-1]
- callstack_list.extend(exception_callstack_list)
- exception_desc = "".join(traceback.format_exception_only(exception_info[0], exception_info[1]))
-
- traceback_str = "Traceback (most recent call last):\n"
- traceback_str += "".join(traceback.format_list(callstack_list))
- traceback_str += exception_desc
- traceback_str = traceback_str[:-1] #Removing the last '\n'
- return traceback_str
-
-def seconds_to_nexthour(strict=False):
- now = datetime.datetime.today()
- nexthour = now.replace(minute=0 if strict else 1, second=0, microsecond=0) + datetime.timedelta(hours=1)
- return (nexthour - now).seconds
-
-
-def seconds_to_midnight(utc=None, strict=False):
- if utc is None:
- now = datetime.datetime.today()
- else:
- now = datetime.datetime.utcnow() + datetime.timedelta(hours=utc)
-
- midnight = now.replace(hour=0, minute=0 if strict else 1, second=0, microsecond=0) + datetime.timedelta(days=1)
-
- return (midnight - now).seconds
-
-
-def replace_patterns(string, ruleslist):
- for r in ruleslist:
- rf, rt = r
- string = re.sub(rf, rt, string)
- return string
-
-
-#@TODO: Remove in 0.4.10 and fix CookieJar.setCookie
-def set_cookie(cj, domain, name, value):
- return cj.setCookie(domain, name, encode(value))
-
-
-def set_cookies(cj, cookies):
- for cookie in cookies:
- if isinstance(cookie, tuple) and len(cookie) == 3:
- set_cookie(cj, *cookie)
-
-
-def parse_html_tag_attr_value(attr_name, tag):
- m = re.search(r"%s\s*=\s*([\"']?)((?<=\")[^\"]+|(?<=')[^']+|[^>\s\"'][^>\s]*)\1" % attr_name, tag, re.I)
- return m.group(2) if m else None
-
-
-def parse_html_form(attr_str, html, input_names={}):
- for form in re.finditer(r"(?P<TAG><form[^>]*%s[^>]*>)(?P<CONTENT>.*?)</?(form|body|html)[^>]*>" % attr_str,
- html, re.I | re.S):
- inputs = {}
- action = parse_html_tag_attr_value("action", form.group('TAG'))
-
- for inputtag in re.finditer(r'(<(input|textarea)[^>]*>)([^<]*(?=</\2)|)', form.group('CONTENT'), re.I | re.S):
- name = parse_html_tag_attr_value("name", inputtag.group(1))
- if name:
- value = parse_html_tag_attr_value("value", inputtag.group(1))
- if not value:
- inputs[name] = inputtag.group(3) or ""
- else:
- inputs[name] = value
-
- if not input_names:
- #: No attribute check
- return action, inputs
- else:
- #: Check input attributes
- for key, val in input_names.items():
- if key in inputs:
- if isinstance(val, basestring) and inputs[key] is val:
- continue
- elif isinstance(val, tuple) and inputs[key] in val:
- continue
- elif hasattr(val, "search") and re.match(val, inputs[key]):
- continue
- else:
- break #: Attibute value does not match
- else:
- break #: Attibute name does not match
- else:
- return action, inputs #: Passed attribute check
-
- return {}, None #: No matching form found
+import pycurl
+import module.plugins.internal.utils as utils
-#@TODO: Move to utils in 0.4.10
-def chunks(iterable, size):
- it = iter(iterable)
- item = list(islice(it, size))
- while item:
- yield item
- item = list(islice(it, size))
+from module.plugins.Plugin import Abort, Fail, Reconnect, Retry, SkipDownload as Skip #@TODO: Remove in 0.4.10
+from module.plugins.internal.utils import *
class Plugin(object):
__name__ = "Plugin"
__type__ = "plugin"
- __version__ = "0.58"
+ __version__ = "0.59"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -327,46 +63,45 @@ class Plugin(object):
def _log(self, level, plugintype, pluginname, messages):
log = getattr(self.pyload.log, level)
msg = u" | ".join(decode(a).strip() for a in messages if a)
- log("%(plugintype)s %(pluginname)s: %(msg)s"
- % {'plugintype': plugintype.upper(),
- 'pluginname': pluginname,
- 'msg' : msg})
+ log("%(plugintype)s %(pluginname)s: %(msg)s" %
+ {'plugintype': plugintype.upper(),
+ 'pluginname': pluginname,
+ 'msg' : msg})
def log_debug(self, *args, **kwargs):
self._log("debug", self.__type__, self.__name__, args)
- if self.pyload.debug and kwargs.get('trace', False):
- self.log_exc("debug")
+ if self.pyload.debug and kwargs.get('trace'):
+ self.print_exc()
def log_info(self, *args, **kwargs):
self._log("info", self.__type__, self.__name__, args)
- if kwargs.get('trace', False):
- self.log_exc("info")
+ if self.pyload.debug and kwargs.get('trace'):
+ self.print_exc()
def log_warning(self, *args, **kwargs):
self._log("warning", self.__type__, self.__name__, args)
- if kwargs.get('trace', False):
- self.log_exc("warning")
+ if self.pyload.debug and kwargs.get('trace'):
+ self.print_exc()
def log_error(self, *args, **kwargs):
self._log("error", self.__type__, self.__name__, args)
- if kwargs.get('trace', False):
- self.log_exc("error")
+ if self.pyload.debug and kwargs.get('trace', True):
+ self.print_exc()
def log_critical(self, *args, **kwargs):
self._log("critical", self.__type__, self.__name__, args)
if kwargs.get('trace', True):
- self.log_exc("critical")
+ self.print_exc()
- def log_exc(self, level):
+ def print_exc(self):
frame = inspect.currentframe()
- log = getattr(self.pyload.log, level)
- log(format_exc(frame.f_back))
+ print format_exc(frame.f_back)
del frame
@@ -426,7 +161,7 @@ class Plugin(object):
Saves a value persistently to the database
"""
value = map(decode, value) if isiterable(value) else decode(value)
- entry = json_dumps(value).encode('base64')
+ entry = json.dumps(value).encode('base64')
self.pyload.db.setStorage(self.classname, key, entry)
@@ -440,12 +175,12 @@ class Plugin(object):
if entry is None:
value = default
else:
- value = json_loads(entry.decode('base64'))
+ value = json.loads(entry.decode('base64'))
else:
if not entry:
value = default
else:
- value = dict((k, json_loads(v.decode('base64'))) for k, v in value.items())
+ value = dict((k, json.loads(v.decode('base64'))) for k, v in value.items())
return value
@@ -505,8 +240,8 @@ class Plugin(object):
req.http.c.setopt(pycurl.FOLLOWLOCATION, 1)
elif type(redirect) is int:
- req.http.c.setopt(pycurl.MAXREDIRS,
- self.get_config("maxredirs", 5, plugin="UserAgentSwitcher"))
+ maxredirs = self.get_config("maxredirs", default=5, plugin="UserAgentSwitcher")
+ req.http.c.setopt(pycurl.MAXREDIRS, maxredirs)
#@TODO: Move to network in 0.4.10
if decode:
@@ -514,7 +249,7 @@ class Plugin(object):
#@TODO: Move to network in 0.4.10
if isinstance(decode, basestring):
- html = _decode(html, decode) #@NOTE: Use `utils.decode()` in 0.4.10
+ html = utils.decode(html, decode)
self.last_html = html
@@ -543,13 +278,15 @@ class Plugin(object):
else:
#@TODO: Move to network in 0.4.10
header = {'code': req.code}
+
for line in html.splitlines():
line = line.strip()
if not line or ":" not in line:
continue
key, none, value = line.partition(":")
- key = key.strip().lower()
+
+ key = key.strip().lower()
value = value.strip()
if key in header:
diff --git a/module/plugins/internal/SevenZip.py b/module/plugins/internal/SevenZip.py
index f73e935e8..abf413fb7 100644
--- a/module/plugins/internal/SevenZip.py
+++ b/module/plugins/internal/SevenZip.py
@@ -5,12 +5,12 @@ import re
import subprocess
from module.plugins.internal.UnRar import ArchiveError, CRCError, PasswordError, UnRar, renice
-from module.utils import save_join as fs_join
+from module.plugins.internal.utils import fs_join
class SevenZip(UnRar):
__name__ = "SevenZip"
- __version__ = "0.16"
+ __version__ = "0.17"
__status__ = "testing"
__description__ = """7-Zip extractor plugin"""
@@ -78,8 +78,6 @@ class SevenZip(UnRar):
p = self.call_cmd(command, '-o' + self.out, self.target, password=password)
- renice(p.pid, self.renice)
-
#: Communicate and retrieve stderr
self._progress(p)
err = p.stderr.read().strip()
@@ -139,4 +137,7 @@ class SevenZip(UnRar):
self.log_debug(" ".join(call))
p = subprocess.Popen(call, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+
+ renice(p.pid, self.priority)
+
return p
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index ba4235072..1457c6fe5 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -2,21 +2,22 @@
import re
-from module.plugins.internal.Crypter import Crypter
-from module.plugins.internal.Plugin import replace_patterns, set_cookie, set_cookies
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+from module.plugins.internal.Crypter import Crypter, create_getInfo, parse_fileInfo
+from module.plugins.internal.utils import replace_patterns, set_cookie, set_cookies
-class SimpleCrypter(Crypter, SimpleHoster):
+class SimpleCrypter(Crypter):
__name__ = "SimpleCrypter"
__type__ = "crypter"
- __version__ = "0.67"
+ __version__ = "0.71"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
- ("use_subfolder" , "bool", "Save package to subfolder" , True),
- ("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
+ ("use_subfolder" , "bool", "Save package to subfolder" , True),
+ ("subfolder_per_package", "bool", "Create a subfolder for each package" , True),
+ ("max_wait" , "int" , "Reconnect if waiting time is greater than minutes", 10 )]
__description__ = """Simple decrypter plugin"""
__license__ = "GPLv3"
@@ -59,14 +60,14 @@ class SimpleCrypter(Crypter, SimpleHoster):
DIRECT_LINK = True #: Set to True to looking for direct link (as defined in handle_direct method), set to None to do it if self.account is True else False
LOGIN_ACCOUNT = False #: Set to True to require account login
LOGIN_PREMIUM = False #: Set to True to require premium account login
- # LEECH_HOSTER = False #: Set to True to leech other hoster link (as defined in handle_multi method)
TEXT_ENCODING = True #: Set to encoding name if encoding value in http header is not correct
- PAGES_PATTERN = None
LINK_PATTERN = None
+ LINK_FREE_PATTERN = None
+ LINK_PREMIUM_PATTERN = None
+ PAGES_PATTERN = None
NAME_PATTERN = None
- HASHSUM_PATTERN = None
OFFLINE_PATTERN = None
TEMP_OFFLINE_PATTERN = None
@@ -79,68 +80,170 @@ class SimpleCrypter(Crypter, SimpleHoster):
ERROR_PATTERN = None
+ @classmethod
+ def api_info(cls, url):
+ return {}
+
+
+ @classmethod
+ def get_info(cls, url="", html=""):
+ info = super(SimpleHoster, cls).get_info(url)
+
+ info.update(cls.api_info(url))
+
+ if not html and info['status'] is not 2:
+ if not url:
+ info['error'] = "missing url"
+ info['status'] = 1
+
+ elif info['status'] is 3:
+ try:
+ html = get_url(url, cookies=cls.COOKIES, decode=cls.TEXT_ENCODING)
+
+ except BadHeader, e:
+ info['error'] = "%d: %s" % (e.code, e.content)
+
+ if e.code in (404, 410):
+ info['status'] = 1
+
+ elif e.code is 503:
+ info['status'] = 6
+
+ except Exception:
+ pass
+
+ if html:
+ if cls.OFFLINE_PATTERN and re.search(cls.OFFLINE_PATTERN, html) is not None:
+ info['status'] = 1
+
+ elif cls.TEMP_OFFLINE_PATTERN and re.search(cls.TEMP_OFFLINE_PATTERN, html) is not None:
+ info['status'] = 6
+
+ elif cls.NAME_PATTERN:
+ m = re.search(cls.NAME_PATTERN, html)
+ if m is not None:
+ info['status'] = 2
+ info['pattern'].update(m.groupdict())
+
+ if 'N' in info['pattern']:
+ name = replace_patterns(info['pattern']['N'], cls.NAME_REPLACEMENTS)
+ info['name'] = parse_name(name)
+
+ return info
+
+
#@TODO: Remove in 0.4.10
def _setup(self):
- orig_name = self.__name__
- self.__name__ = re.sub(r'Folder$', "", self.__name__)
+ orig_name = self.classname
+ self.classname = orig_name.rstrip("Folder")
super(SimpleCrypter, self)._setup()
- self.__name__ = orig_name
+ self.classname = orig_name
#@TODO: Remove in 0.4.10
def load_account(self):
- orig_name = self.__name__
- self.__name__ = re.sub(r'Folder$', "", self.__name__)
+ orig_name = self.classname
+ self.classname = orig_name.rstrip("Folder")
super(SimpleCrypter, self).load_account()
- self.__name__ = orig_name
+ self.classname = orig_name
def handle_direct(self, pyfile):
- for i in xrange(self.get_config("maxredirs", plugin="UserAgentSwitcher")):
- redirect = self.link or pyfile.url
- self.log_debug("Redirect #%d to: %s" % (i, redirect))
+ link = None
+ maxredirs = self.get_config("maxredirs", default=10, plugin="UserAgentSwitcher")
- header = self.load(redirect, just_header=True)
- if header.get('location'):
- self.link = header.get('location')
- else:
- break
+ for i in xrange(maxredirs):
+ url = link or pyfile.url
+ self.log_debug("Redirect #%d to: %s" % (i, url))
+
+ header = self.load(url, just_header=True)
+ location = header.get('location')
+
+ if location:
+ link = location
+
+ elif link:
+ self.urls.append(link)
+ return
else:
- self.log_error(_("Too many redirects"))
+ self.log_warning(_("Too many redirects"))
+
+
+ def preload(self):
+ self.html = self.load(self.pyfile.url,
+ cookies=self.COOKIES,
+ ref=False,
+ decode=self.TEXT_ENCODING)
def prepare(self):
- self.links = []
- return super(SimpleCrypter, self).prepare()
+ self.direct_dl = False
+
+ if self.LOGIN_PREMIUM and not self.premium:
+ self.fail(_("Required premium account not found"))
+
+ if self.LOGIN_ACCOUNT and not self.account:
+ self.fail(_("Required account not found"))
+
+ self.req.setOption("timeout", 120)
+
+ if self.LINK_PATTERN:
+ if self.LINK_FREE_PATTERN is None:
+ self.LINK_FREE_PATTERN = self.LINK_PATTERN
+
+ if self.LINK_PREMIUM_PATTERN is None:
+ self.LINK_PREMIUM_PATTERN = self.LINK_PATTERN
+
+ if self.DIRECT_LINK is None:
+ self.direct_dl = bool(self.account)
+ else:
+ self.direct_dl = self.DIRECT_LINK
+
+ self.pyfile.url = replace_patterns(self.pyfile.url, self.URL_REPLACEMENTS)
def decrypt(self, pyfile):
self.prepare()
- self.check_info() #@TODO: Remove in 0.4.10
if self.direct_dl:
- self.log_debug(_("Looking for direct download link..."))
+ self.log_info(_("Looking for direct link..."))
self.handle_direct(pyfile)
- if self.link or self.links or self.urls or self.packages:
- self.log_info(_("Direct download link detected"))
+ if self.urls or self.packages:
+ self.log_info(_("Direct link detected"))
else:
- self.log_info(_("Direct download link not found"))
+ self.log_info(_("Direct link not found"))
- if not (self.link or self.links or self.urls or self.packages):
+ if not self.urls and not self.packages:
self.preload()
- self.links = self.get_links() or list()
+ self.urls.extend(self.get_links())
if self.PAGES_PATTERN:
self.handle_pages(pyfile)
- if self.link:
- self.urls.append(self.link)
- if self.links:
- name = folder = pyfile.name
- self.packages.append((name, self.links, folder))
+ def handle_free(self, pyfile):
+ if not self.LINK_FREE_PATTERN:
+ self.log_warning(_("Free decrypting not implemented"))
+
+ links = re.findall(self.LINK_FREE_PATTERN, self.html)
+ if not links:
+ self.error(_("Free decrypted link not found"))
+ else:
+ self.urls.extend(links)
+
+
+ def handle_premium(self, pyfile):
+ if not self.LINK_PREMIUM_PATTERN:
+ self.log_warning(_("Premium decrypting not implemented"))
+ self.restart(premium=False)
+
+ links = re.findall(self.LINK_PREMIUM_PATTERN, self.html)
+ if not links:
+ self.error(_("Premium decrypted link found"))
+ else:
+ self.urls.extend(links)
def get_links(self):
@@ -148,7 +251,15 @@ class SimpleCrypter(Crypter, SimpleHoster):
Returns the links extracted from self.html
You should override this only if it's impossible to extract links using only the LINK_PATTERN.
"""
- return re.findall(self.LINK_PATTERN, self.html)
+ if self.premium:
+ self.log_info(_("Decrypting as premium link..."))
+ self.handle_premium(pyfile)
+
+ elif not self.LOGIN_ACCOUNT:
+ self.log_info(_("Decrypting as free link..."))
+ self.handle_free(pyfile)
+
+ return self.urls
def load_page(self, number):
@@ -164,4 +275,103 @@ class SimpleCrypter(Crypter, SimpleHoster):
for p in xrange(2, pages + 1):
self.html = self.load_page(p)
- self.links += self.get_links()
+ self.urls.append(self.get_links())
+
+
+ def check_errors(self):
+ if not self.html:
+ self.log_warning(_("No html code to check"))
+ return
+
+ if self.IP_BLOCKED_PATTERN and re.search(self.IP_BLOCKED_PATTERN, self.html):
+ self.fail(_("Connection from your current IP address is not allowed"))
+
+ elif not self.premium:
+ if self.PREMIUM_ONLY_PATTERN and re.search(self.PREMIUM_ONLY_PATTERN, self.html):
+ self.fail(_("Link can be decrypted by premium users only"))
+
+ elif self.SIZE_LIMIT_PATTERN and re.search(self.SIZE_LIMIT_PATTERN, self.html):
+ self.fail(_("Link list too large for free decrypt"))
+
+ elif self.DL_LIMIT_PATTERN and re.search(self.DL_LIMIT_PATTERN, self.html):
+ m = re.search(self.DL_LIMIT_PATTERN, self.html)
+ try:
+ errmsg = m.group(1).strip()
+
+ except (AttributeError, IndexError):
+ errmsg = m.group(0).strip()
+
+ finally:
+ errmsg = re.sub(r'<.*?>', " ", errmsg)
+
+ self.info['error'] = errmsg
+ self.log_warning(errmsg)
+
+ wait_time = parse_time(errmsg)
+ self.wait(wait_time, reconnect=wait_time > self.get_config("max_wait", 10) * 60)
+ self.restart(_("Download limit exceeded"))
+
+ if self.HAPPY_HOUR_PATTERN and re.search(self.HAPPY_HOUR_PATTERN, self.html):
+ self.multiDL = True
+
+ if self.ERROR_PATTERN:
+ m = re.search(self.ERROR_PATTERN, self.html)
+ if m is not None:
+ try:
+ errmsg = m.group(1)
+
+ except (AttributeError, IndexError):
+ errmsg = m.group(0)
+
+ finally:
+ errmsg = re.sub(r'<.*?>', " ", errmsg.strip())
+
+ self.info['error'] = errmsg
+ self.log_warning(errmsg)
+
+ if re.search('limit|wait|slot', errmsg, re.I):
+ wait_time = parse_time(errmsg)
+ self.wait(wait_time, reconnect=wait_time > self.get_config("max_wait", 10) * 60)
+ self.restart(_("Download limit exceeded"))
+
+ elif re.search('country|ip|region|nation', errmsg, re.I):
+ self.fail(_("Connection from your current IP address is not allowed"))
+
+ elif re.search('captcha|code', errmsg, re.I):
+ self.retry_captcha()
+
+ elif re.search('countdown|expired', errmsg, re.I):
+ self.retry(10, 60, _("Link expired"))
+
+ elif re.search('maint(e|ai)nance|temp', errmsg, re.I):
+ self.temp_offline()
+
+ elif re.search('up to|size', errmsg, re.I):
+ self.fail(_("Link list too large for free decrypt"))
+
+ elif re.search('offline|delet|remov|not? (found|(longer)? available)', errmsg, re.I):
+ self.offline()
+
+ elif re.search('filename', errmsg, re.I):
+ self.fail(_("Invalid url"))
+
+ elif re.search('premium', errmsg, re.I):
+ self.fail(_("Link can be decrypted by premium users only"))
+
+ else:
+ self.wait(60, reconnect=True)
+ self.restart(errmsg)
+
+ elif self.WAIT_PATTERN:
+ m = re.search(self.WAIT_PATTERN, self.html)
+ if m is not None:
+ try:
+ waitmsg = m.group(1).strip()
+
+ except (AttributeError, IndexError):
+ waitmsg = m.group(0).strip()
+
+ wait_time = parse_time(waitmsg)
+ self.wait(wait_time, reconnect=wait_time > self.get_config("max_wait", 10) * 60)
+
+ self.info.pop('error', None)
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 744a1f686..8307c6236 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -9,21 +9,24 @@ import time
from module.network.HTTPRequest import BadHeader
from module.network.RequestFactory import getURL as get_url
from module.plugins.internal.Hoster import Hoster, create_getInfo, parse_fileInfo
-from module.plugins.internal.Plugin import Fail, encode, parse_name, parse_size, parse_time, replace_patterns, seconds_to_midnight, set_cookie, set_cookies
-from module.utils import fixup, fs_encode
+from module.plugins.internal.Plugin import Fail
+from module.plugins.internal.utils import (encode, fixup, parse_name, parse_size,
+ parse_time, replace_patterns, seconds_to_midnight,
+ set_cookie, set_cookies)
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "1.98"
+ __version__ = "1.99"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("activated" , "bool", "Activated" , True),
- ("use_premium" , "bool", "Use premium account if available" , True),
- ("fallback_premium", "bool", "Fallback to free download if premium fails", True),
- ("chk_filesize" , "bool", "Check file size" , True)]
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
+ ("fallback" , "bool", "Fallback to free download if premium fails" , True),
+ ("chk_filesize", "bool", "Check file size" , True),
+ ("max_wait" , "int" , "Reconnect if waiting time is greater than minutes", 10 )]
__description__ = """Simple hoster plugin"""
__license__ = "GPLv3"
@@ -133,7 +136,6 @@ class SimpleHoster(Hoster):
@classmethod
def get_info(cls, url="", html=""):
info = super(SimpleHoster, cls).get_info(url)
-
info.update(cls.api_info(url))
if not html and info['status'] is not 2:
@@ -148,7 +150,7 @@ class SimpleHoster(Hoster):
except BadHeader, e:
info['error'] = "%d: %s" % (e.code, e.content)
- if e.code is 404:
+ if e.code in (404, 410):
info['status'] = 1
elif e.code is 503:
@@ -158,10 +160,10 @@ class SimpleHoster(Hoster):
pass
if html:
- if cls.OFFLINE_PATTERN and re.search(cls.OFFLINE_PATTERN, html):
+ if cls.OFFLINE_PATTERN and re.search(cls.OFFLINE_PATTERN, html) is not None:
info['status'] = 1
- elif cls.TEMP_OFFLINE_PATTERN and re.search(cls.TEMP_OFFLINE_PATTERN, html):
+ elif cls.TEMP_OFFLINE_PATTERN and re.search(cls.TEMP_OFFLINE_PATTERN, html) is not None:
info['status'] = 6
else:
@@ -200,7 +202,8 @@ class SimpleHoster(Hoster):
def setup(self):
- self.resume_download = self.multiDL = self.premium
+ self.multiDL = self.premium
+ self.resume_download = self.premium
def prepare(self):
@@ -249,7 +252,6 @@ class SimpleHoster(Hoster):
def process(self, pyfile):
self.prepare()
- self.check_info() #@TODO: Remove in 0.4.10
if self.leech_dl:
self.log_info(_("Processing as debrid download..."))
@@ -271,8 +273,8 @@ class SimpleHoster(Hoster):
if not self.link and not self.last_download:
self.preload()
- if self.info.get('status', 3) is 3: #@TODO: Recheck in 0.4.10
- self.check_info()
+ if self.info.get('status', 3) is not 2:
+ self.grab_info()
if self.premium and (not self.CHECK_TRAFFIC or self.check_traffic()):
self.log_info(_("Processing as premium download..."))
@@ -286,12 +288,15 @@ class SimpleHoster(Hoster):
self.log_info(_("Downloading file..."))
self.download(self.link, disposition=self.DISPOSITION)
+
+ def _check_download(self):
+ super(SimpleHoster, self)._check_download()
self.check_download()
def check_download(self):
- self.log_info(_("Checking downloaded file..."))
- self.log_debug("Using default check rules...")
+ self.log_debug("Performing default check rules...")
+
for r, p in self.FILE_ERRORS:
errmsg = self.check_file({r: re.compile(p)})
if errmsg is not None:
@@ -308,12 +313,12 @@ class SimpleHoster(Hoster):
self.restart(errmsg)
else:
if self.CHECK_FILE:
- self.log_debug("Using custom check rules...")
- with open(fs_encode(self.last_download), "rb") as f:
+ self.log_debug("Performing custom check rules...")
+
+ with open(encode(self.last_download), "rb") as f:
self.html = f.read(1048576) #@TODO: Recheck in 0.4.10
- self.check_errors()
- self.log_info(_("No errors found"))
+ self.check_errors()
def check_errors(self):
@@ -346,7 +351,7 @@ class SimpleHoster(Hoster):
self.log_warning(errmsg)
wait_time = parse_time(errmsg)
- self.wait(wait_time, reconnect=wait_time > 300)
+ self.wait(wait_time, reconnect=wait_time > self.get_config("max_wait", 10) * 60)
self.restart(_("Download limit exceeded"))
if self.HAPPY_HOUR_PATTERN and re.search(self.HAPPY_HOUR_PATTERN, self.html):
@@ -369,7 +374,7 @@ class SimpleHoster(Hoster):
if re.search('limit|wait|slot', errmsg, re.I):
wait_time = parse_time(errmsg)
- self.wait(wait_time, reconnect=wait_time > 300)
+ self.wait(wait_time, reconnect=wait_time > self.get_config("max_wait", 10) * 60)
self.restart(_("Download limit exceeded"))
elif re.search('country|ip|region|nation', errmsg, re.I):
@@ -410,86 +415,20 @@ class SimpleHoster(Hoster):
waitmsg = m.group(0).strip()
wait_time = parse_time(waitmsg)
- self.wait(wait_time, reconnect=wait_time > 300)
+ self.wait(wait_time, reconnect=wait_time > self.get_config("max_wait", 10) * 60)
self.info.pop('error', None)
- def check_status(self, getinfo=True):
- if not self.info or getinfo:
- self.log_info(_("Updating file info..."))
- old_info = self.info.copy()
- self.info.update(self.get_info(self.pyfile.url, self.html))
- self.log_debug("File info: %s" % self.info)
- self.log_debug("Previous file info: %s" % old_info)
-
- try:
- status = self.info['status'] or 14
-
- if status is 1:
- self.offline()
-
- elif status is 6:
- self.temp_offline()
-
- elif status is 8:
- self.fail()
-
- finally:
- self.log_info(_("File status: ") + self.pyfile.getStatusName())
-
-
- def check_name_size(self, getinfo=True):
- if not self.info or getinfo:
- self.log_info(_("Updating file info..."))
- old_info = self.info.copy()
- self.info.update(self.get_info(self.pyfile.url, self.html))
- self.log_debug("File info: %s" % self.info)
- self.log_debug("Previous file info: %s" % old_info)
-
- try:
- url = self.info['url']
- name = self.info['name']
-
- except KeyError:
- pass
-
- else:
- if name and name is not url:
- self.pyfile.name = name
-
- if self.info.get('size') > 0:
- self.pyfile.size = int(self.info['size']) #@TODO: Fix int conversion in 0.4.10
-
- # self.pyfile.sync()
-
- name = self.pyfile.name
- size = self.pyfile.size
-
- self.log_info(_("File name: ") + name)
- self.log_info(_("File size: %s bytes") % size if size > 0 else _("File size: Unknown"))
-
-
- #@TODO: Rewrite in 0.4.10
- def check_info(self):
- self.check_name_size()
-
- if self.html:
- self.check_errors()
- self.check_name_size()
-
- self.check_status(getinfo=False)
-
-
#: Deprecated method (Remove in 0.4.10)
def get_fileInfo(self):
- self.info = {}
- self.check_info()
+ self.info.clear()
+ self.grab_info()
return self.info
def handle_direct(self, pyfile):
- self.link = self.direct_link(pyfile.url, self.resume_download)
+ self.link = self.is_download(pyfile.url)
def handle_multi(self, pyfile): #: Multi-hoster handler
@@ -498,7 +437,7 @@ class SimpleHoster(Hoster):
def handle_free(self, pyfile):
if not self.LINK_FREE_PATTERN:
- self.log_error(_("Free download not implemented"))
+ self.log_warning(_("Free download not implemented"))
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
@@ -509,7 +448,7 @@ class SimpleHoster(Hoster):
def handle_premium(self, pyfile):
if not self.LINK_PREMIUM_PATTERN:
- self.log_error(_("Premium download not implemented"))
+ self.log_warning(_("Premium download not implemented"))
self.restart(premium=False)
m = re.search(self.LINK_PREMIUM_PATTERN, self.html)
diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py
index 6f85c286a..c1ecccf40 100644
--- a/module/plugins/internal/UnRar.py
+++ b/module/plugins/internal/UnRar.py
@@ -2,27 +2,16 @@
import os
import re
+import string
import subprocess
-from glob import glob
-from string import digits
-
-from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError, PasswordError
-from module.utils import fs_decode, save_join as fs_join
-
-
-def renice(pid, value):
- if value and os.name is not "nt":
- try:
- subprocess.Popen(["renice", str(value), str(pid)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=-1)
-
- except Exception:
- pass
+from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError, PasswordError, renice
+from module.plugins.internal.utils import decode, fs_join
class UnRar(Extractor):
__name__ = "UnRar"
- __version__ = "1.27"
+ __version__ = "1.28"
__status__ = "testing"
__description__ = """Rar extractor plugin"""
@@ -138,7 +127,7 @@ class UnRar(Extractor):
self.notify_progress(int(s))
s = ""
#: Not reading a digit -> therefore restart
- elif c not in digits:
+ elif c not in string.digits:
s = ""
#: Add digit to progressstring
else:
@@ -150,8 +139,6 @@ class UnRar(Extractor):
p = self.call_cmd(command, self.target, self.out, password=password)
- renice(p.pid, self.renice)
-
#: Communicate and retrieve stderr
self._progress(p)
err = p.stderr.read().strip()
@@ -200,12 +187,12 @@ class UnRar(Extractor):
result = set()
if not self.fullpath and self.VERSION.startswith('5'):
#@NOTE: Unrar 5 always list full path
- for f in fs_decode(out).splitlines():
+ for f in decode(out).splitlines():
f = fs_join(self.out, os.path.basename(f.strip()))
if os.path.isfile(f):
result.add(fs_join(self.out, os.path.basename(f)))
else:
- for f in fs_decode(out).splitlines():
+ for f in decode(out).splitlines():
result.add(fs_join(self.out, f.strip()))
return list(result)
@@ -219,8 +206,7 @@ class UnRar(Extractor):
args.append("-o+")
else:
args.append("-o-")
- if self.delete != 'No':
- args.append("-or")
+ args.append("-or")
for word in self.excludefiles:
args.append("-x'%s'" % word.strip())
@@ -243,4 +229,7 @@ class UnRar(Extractor):
self.log_debug(" ".join(call))
p = subprocess.Popen(call, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+
+ renice(p.pid, self.priority)
+
return p
diff --git a/module/plugins/internal/UnZip.py b/module/plugins/internal/UnZip.py
index 87cbd568a..d26a39f44 100644
--- a/module/plugins/internal/UnZip.py
+++ b/module/plugins/internal/UnZip.py
@@ -11,7 +11,7 @@ from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError,
class UnZip(Extractor):
__name__ = "UnZip"
- __version__ = "1.16"
+ __version__ = "1.17"
__status__ = "testing"
__description__ = """Zip extractor plugin"""
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index 5a6f0ee9c..e09f7dddc 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -4,17 +4,22 @@ import re
import time
import urlparse
-from module.plugins.internal.Account import Account
-# from module.plugins.internal.MultiAccount import MultiAccount
-from module.plugins.internal.Plugin import parse_html_form, parse_time, set_cookie
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import parse_html_form, parse_time, set_cookie
-class XFSAccount(Account):
+class XFSAccount(MultiAccount):
__name__ = "XFSAccount"
__type__ = "account"
- __version__ = "0.52"
+ __version__ = "0.54"
__status__ = "testing"
+ __config__ = [("activated" , "bool" , "Activated" , True ),
+ ("multi" , "bool" , "Multi-hoster" , True ),
+ ("multi_mode" , "all;listed;unlisted", "Hosters to use" , "all"),
+ ("multi_list" , "str" , "Hoster list (comma separated)", "" ),
+ ("multi_interval", "int" , "Reload interval in hours" , 12 )]
+
__description__ = """XFileSharing account plugin"""
__license__ = "GPLv3"
__authors__ = [("zoidberg" , "zoidberg@mujmail.cz"),
@@ -44,7 +49,7 @@ class XFSAccount(Account):
def set_xfs_cookie(self):
if not self.PLUGIN_DOMAIN:
- self.log_error(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
+ self.log_warning(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
return
cookie = (self.PLUGIN_DOMAIN, "lang", "english")
@@ -55,6 +60,10 @@ class XFSAccount(Account):
set_cookie(self.req.cj, *cookie)
+ def grab_hosters(self, user, password, data):
+ pass
+
+
def grab_info(self, user, password, data):
validuntil = None
trafficleft = None
@@ -207,7 +216,10 @@ class XFSAccount(Account):
finally:
errmsg = re.sub(r'<.*?>', " ", errmsg.strip())
- self.timeout = parse_time(errmsg)
+ new_timeout = parse_time(errmsg)
+ if new_timeout > self.timeout:
+ self.timeout = new_timeout
+
self.fail_login(errmsg)
m = re.search(self.LOGIN_FAIL_PATTERN, self.html)
diff --git a/module/plugins/internal/XFSCrypter.py b/module/plugins/internal/XFSCrypter.py
index da9c9cff7..327834dab 100644
--- a/module/plugins/internal/XFSCrypter.py
+++ b/module/plugins/internal/XFSCrypter.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Plugin import set_cookie
from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
+from module.plugins.internal.utils import set_cookie
class XFSCrypter(SimpleCrypter):
__name__ = "XFSCrypter"
__type__ = "crypter"
- __version__ = "0.18"
+ __version__ = "0.19"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -28,13 +28,13 @@ class XFSCrypter(SimpleCrypter):
NAME_PATTERN = r'<[Tt]itle>.*?\: (?P<N>.+) folder</[Tt]itle>'
LINK_PATTERN = r'<(?:td|TD).*?>\s*(?:<.+>\s*)?<a href="(.+?)".*?>.+?(?:</a>)?\s*(?:<.+>\s*)?</(?:td|TD)>'
- OFFLINE_PATTERN = r'>\s*(No such user|\w+ (Not Found|file (was|has been) removed|no longer available)'
+ OFFLINE_PATTERN = r'>\s*(No such user|\w+ (Not Found|file (was|has been) removed|no longer available))'
TEMP_OFFLINE_PATTERN = r'>\s*\w+ server (is in )?(maintenance|maintainance)'
def set_xfs_cookie(self):
if not self.PLUGIN_DOMAIN:
- self.log_error(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
+ self.log_warning(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
return
cookie = (self.PLUGIN_DOMAIN, "lang", "english")
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py
index 63b53be41..30191a7e7 100644
--- a/module/plugins/internal/XFSHoster.py
+++ b/module/plugins/internal/XFSHoster.py
@@ -6,21 +6,21 @@ import re
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.captcha.SolveMedia import SolveMedia
from module.plugins.internal.Plugin import set_cookie
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, seconds_to_midnight
-from module.utils import html_unescape
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+from module.plugins.internal.utils import html_unescape, seconds_to_midnight
class XFSHoster(SimpleHoster):
__name__ = "XFSHoster"
__type__ = "hoster"
- __version__ = "0.65"
+ __version__ = "0.66"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("activated" , "bool", "Activated" , True),
- ("use_premium" , "bool", "Use premium account if available" , True),
- ("fallback_premium", "bool", "Fallback to free download if premium fails", True),
- ("chk_filesize" , "bool", "Check file size" , True)]
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
+ ("fallback" , "bool", "Fallback to free download if premium fails", True),
+ ("chk_filesize", "bool", "Check file size" , True)]
__description__ = """XFileSharing hoster plugin"""
__license__ = "GPLv3"
@@ -31,7 +31,7 @@ class XFSHoster(SimpleHoster):
PLUGIN_DOMAIN = None
- LEECH_HOSTER = True #@NOTE: Should be default to False for safe, but I'm lazy...
+ LEECH_HOSTER = True #@NOTE: hould be set to `False` by default for safe, but I am lazy...
NAME_PATTERN = r'(Filename[ ]*:[ ]*</b>(</td><td nowrap>)?|name="fname"[ ]+value="|<[\w^_]+ class="(file)?name">)\s*(?P<N>.+?)(\s*<|")'
SIZE_PATTERN = r'(Size[ ]*:[ ]*</b>(</td><td>)?|File:.*>|</font>\s*\(|<[\w^_]+ class="size">)\s*(?P<S>[\d.,]+)\s*(?P<U>[\w^_]+)'
@@ -52,17 +52,18 @@ class XFSHoster(SimpleHoster):
SOLVEMEDIA_PATTERN = None
FORM_PATTERN = None
- FORM_INPUTS_MAP = None #: Dict passed as input_names to parse_html_form
+ FORM_INPUTS_MAP = None #: Dict passed as `input_names` to `parse_html_form`
def setup(self):
self.chunk_limit = -1 if self.premium else 1
- self.resume_download = self.multiDL = self.premium
+ self.multiDL = self.premium
+ self.resume_download = self.premium
def set_xfs_cookie(self):
if not self.PLUGIN_DOMAIN:
- self.log_error(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
+ self.log_warning(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
return
cookie = (self.PLUGIN_DOMAIN, "lang", "english")
diff --git a/module/plugins/internal/utils.py b/module/plugins/internal/utils.py
new file mode 100644
index 000000000..f7244f2df
--- /dev/null
+++ b/module/plugins/internal/utils.py
@@ -0,0 +1,433 @@
+# -*- coding: utf-8 -*-
+#
+#@TODO: Move to utils directory 0.4.10
+
+import datetime
+import htmlentitydefs
+import itertools
+import os
+import re
+import string
+import sys
+import time
+import traceback
+import urllib
+import urlparse
+
+try:
+ import simplejson as json
+
+except ImportError:
+ import json
+
+
+class utils(object):
+ __name__ = "utils"
+ __type__ = "plugin"
+ __version__ = "0.02"
+ __status__ = "testing"
+
+ __pattern__ = r'^unmatchable$'
+ __config__ = []
+
+ __description__ = """Dummy utils class"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+def lock(fn):
+ def new(*args):
+ # print "Handler: %s args: %s" % (fn, args[1:])
+ args[0].lock.acquire()
+ try:
+ return fn(*args)
+
+ finally:
+ args[0].lock.release()
+
+ return new
+
+
+def compare_time(start, end):
+ start = map(int, start)
+ end = map(int, end)
+
+ if start == end:
+ return True
+
+ now = list(time.localtime()[3:5])
+
+ if start < end:
+ if now < end:
+ return True
+
+ elif now > start or now < end:
+ return True
+
+ return False
+
+
+def uniqify(seq):
+ """
+ Remove duplicates from list preserving order
+ Originally by Dave Kirby
+ """
+ seen = set()
+ seen_add = seen.add
+ return [x for x in seq if x not in seen and not seen_add(x)]
+
+
+def parse_size(value, unit=""): #: returns bytes
+ m = re.match(r"([\d.,]+)\s*([\w^_]*)", value.lower())
+
+ if m is None:
+ return 0
+
+ traffic = float(m.group(1).replace(',', '.'))
+ unit = (unit.strip().lower() or m.group(2) or "byte")[0]
+
+ if unit is "b":
+ return int(traffic)
+
+ sizes = ['b', 'k', 'm', 'g', 't', 'p', 'e']
+ sizemap = dict((u, i * 10) for i, u in enumerate(sizes))
+
+ increment = sizemap[unit]
+ integer, decimal = map(int, ("%.3f" % traffic).split('.'))
+
+ return (integer << increment) + (decimal << increment - 10)
+
+
+def fixup(m):
+ text = m.group(0)
+ if text[:2] == "&#":
+ # character reference
+ try:
+ if text[:3] == "&#x":
+ return unichr(int(text[3:-1], 16))
+ else:
+ return unichr(int(text[2:-1]))
+ except ValueError:
+ pass
+ else:
+ # named entity
+ try:
+ name = text[1:-1]
+ text = unichr(htmlentitydefs.name2codepoint[name])
+ except KeyError:
+ pass
+
+ return text #: leave as is
+
+
+def has_method(obj, name):
+ """
+ Check if name was defined in obj (return false if inhereted)
+ """
+ return hasattr(obj, '__dict__') and name in obj.__dict__
+
+
+def html_unescape(text):
+ """
+ Removes HTML or XML character references and entities from a text string
+ """
+ return re.sub("&#?\w+;", fixup, text)
+
+
+def isiterable(obj):
+ return hasattr(obj, "__iter__")
+
+
+def get_console_encoding(enc):
+ if os.name is "nt":
+ if enc is "cp65001": #: aka UTF-8
+ enc = "cp850"
+ print "WARNING: Windows codepage 65001 (UTF-8) is not supported, used `%s` instead" % enc
+ else:
+ enc = "utf8"
+
+ return enc
+
+
+#@NOTE: Revert to `decode` in Python 3
+def decode(value, encoding=None):
+ """
+ Encoded string (default to UTF-8) -> unicode string
+ """
+ if type(value) is str:
+ try:
+ # res = value.decode(encoding or 'utf-8')
+ res = unicode(value, encoding or 'utf-8')
+
+ except UnicodeDecodeError, e:
+ if encoding:
+ raise UnicodeDecodeError(e)
+
+ encoding = get_console_encoding(sys.stdout.encoding)
+ # res = value.decode(encoding)
+ res = unicode(value, encoding)
+
+ elif type(value) is unicode:
+ res = value
+
+ else:
+ res = unicode(value)
+
+ return res
+
+
+def encode(value, encoding=None, decoding=None):
+ """
+ Unicode or decoded string -> encoded string (default to UTF-8)
+ """
+ if type(value) is unicode:
+ res = value.encode(encoding or "utf-8")
+
+ elif type(value) is str:
+ res = encode(decode(value, decoding), encoding)
+
+ else:
+ res = str(value)
+
+ return res
+
+
+def fs_join(*args):
+ """
+ Like os.path.join, but encoding aware
+ """
+ return os.path.join(*map(encode, args))
+
+
+def exists(path):
+ if os.path.exists(path):
+ if os.name is "nt":
+ dir, name = os.path.split(path.rstrip(os.sep))
+ return name in os.listdir(dir)
+ else:
+ return True
+ else:
+ return False
+
+
+def remove_chars(value, repl):
+ """
+ Remove all chars in repl from string
+ """
+ if type(repl) is unicode:
+ for badc in list(repl):
+ value = value.replace(badc, "")
+ return value
+
+ elif type(value) is unicode:
+ return value.translate(dict((ord(s), None) for s in repl))
+
+ elif type(value) is str:
+ return value.translate(string.maketrans("", ""), repl)
+
+
+def fixurl(url, unquote=None):
+ old = url
+ url = urllib.unquote(url)
+
+ if unquote is None:
+ unquote = url is old
+
+ url = html_unescape(decode(url).decode('unicode-escape'))
+ url = re.sub(r'(?<!:)/{2,}', '/', url).strip().lstrip('.')
+
+ if not unquote:
+ url = urllib.quote(url)
+
+ return url
+
+
+def fixname(value):
+ repl = '<>:"/\\|?*' if os.name is "nt" else '\0/\\"'
+ return remove_chars(value, repl)
+
+
+def parse_name(value, safechar=True):
+ path = fixurl(decode(value), unquote=False)
+ url_p = urlparse.urlparse(path.rstrip('/'))
+ name = (url_p.path.split('/')[-1] or
+ url_p.query.split('=', 1)[::-1][0].split('&', 1)[0] or
+ url_p.netloc.split('.', 1)[0])
+
+ name = urllib.unquote(name)
+ return fixname(name) if safechar else name
+
+
+def str2int(value):
+ try:
+ return int(value)
+ except:
+ pass
+
+ ones = ("zero", "one", "two", "three", "four", "five", "six", "seven", "eight",
+ "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen",
+ "sixteen", "seventeen", "eighteen", "nineteen")
+ tens = ("", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy",
+ "eighty", "ninety")
+
+ o_tuple = [(w, i) for i, w in enumerate(ones)]
+ t_tuple = [(w, i * 10) for i, w in enumerate(tens)]
+
+ numwords = dict(o_tuple + t_tuple)
+ tokens = re.split(r"[\s\-]+", value.lower())
+
+ try:
+ return sum(numwords[word] for word in tokens)
+ except:
+ return 0
+
+
+def parse_time(value):
+ if re.search("da(il)?y|today", value):
+ seconds = seconds_to_midnight()
+
+ else:
+ regex = re.compile(r'(\d+| (?:this|an?) )\s*(hr|hour|min|sec|)', re.I)
+ seconds = sum((int(v) if v.strip() not in ("this", "a", "an") else 1) *
+ {'hr': 3600, 'hour': 3600, 'min': 60, 'sec': 1, '': 1}[u.lower()]
+ for v, u in regex.findall(value))
+ return seconds
+
+
+def timestamp():
+ return int(time.time() * 1000)
+
+
+def which(program):
+ """
+ Works exactly like the unix command which
+ Courtesy of http://stackoverflow.com/a/377028/675646
+ """
+ isExe = lambda x: os.path.isfile(x) and os.access(x, os.X_OK)
+
+ fpath, fname = os.path.split(program)
+
+ if fpath:
+ if isExe(program):
+ return program
+ else:
+ for path in os.environ['PATH'].split(os.pathsep):
+ exe_file = os.path.join(path.strip('"'), program)
+ if isExe(exe_file):
+ return exe_file
+
+
+def format_exc(frame=None):
+ """
+ Format call-stack and display exception information (if availible)
+ """
+ exception_info = sys.exc_info()
+ callstack_list = traceback.extract_stack(frame)
+ callstack_list = callstack_list[:-1]
+
+ exception_desc = ""
+ if exception_info[0] is not None:
+ exception_callstack_list = traceback.extract_tb(exception_info[2])
+ if callstack_list[-1][0] == exception_callstack_list[0][0]: #Does this exception belongs to us?
+ callstack_list = callstack_list[:-1]
+ callstack_list.extend(exception_callstack_list)
+ exception_desc = "".join(traceback.format_exception_only(exception_info[0], exception_info[1]))
+
+ traceback_str = "Traceback (most recent call last):\n"
+ traceback_str += "".join(traceback.format_list(callstack_list))
+ traceback_str += exception_desc
+
+ return traceback_str
+
+
+def seconds_to_nexthour(strict=False):
+ now = datetime.datetime.today()
+ nexthour = now.replace(minute=0 if strict else 1, second=0, microsecond=0) + datetime.timedelta(hours=1)
+ return (nexthour - now).seconds
+
+
+def seconds_to_midnight(utc=None, strict=False):
+ if utc is None:
+ now = datetime.datetime.today()
+ else:
+ now = datetime.datetime.utcnow() + datetime.timedelta(hours=utc)
+
+ midnight = now.replace(hour=0, minute=0 if strict else 1, second=0, microsecond=0) + datetime.timedelta(days=1)
+
+ return (midnight - now).seconds
+
+
+def replace_patterns(value, rules):
+ for r in rules:
+ try:
+ pattern, repl, flags = r
+
+ except ValueError:
+ pattern, repl = r
+ flags = 0
+
+ value = re.sub(pattern, repl, value, flags)
+
+ return value
+
+
+#@TODO: Remove in 0.4.10 and fix CookieJar.setCookie
+def set_cookie(cj, domain, name, value):
+ return cj.setCookie(domain, name, encode(value))
+
+
+def set_cookies(cj, cookies):
+ for cookie in cookies:
+ if isinstance(cookie, tuple) and len(cookie) == 3:
+ set_cookie(cj, *cookie)
+
+
+def parse_html_tag_attr_value(attr_name, tag):
+ m = re.search(r"%s\s*=\s*([\"']?)((?<=\")[^\"]+|(?<=')[^']+|[^>\s\"'][^>\s]*)\1" % attr_name, tag, re.I)
+ return m.group(2) if m else None
+
+
+def parse_html_form(attr_str, html, input_names={}):
+ for form in re.finditer(r"(?P<TAG><form[^>]*%s[^>]*>)(?P<CONTENT>.*?)</?(form|body|html)[^>]*>" % attr_str,
+ html, re.I | re.S):
+ inputs = {}
+ action = parse_html_tag_attr_value("action", form.group('TAG'))
+
+ for inputtag in re.finditer(r'(<(input|textarea)[^>]*>)([^<]*(?=</\2)|)', form.group('CONTENT'), re.I | re.S):
+ name = parse_html_tag_attr_value("name", inputtag.group(1))
+ if name:
+ value = parse_html_tag_attr_value("value", inputtag.group(1))
+ if not value:
+ inputs[name] = inputtag.group(3) or ""
+ else:
+ inputs[name] = value
+
+ if not input_names:
+ #: No attribute check
+ return action, inputs
+ else:
+ #: Check input attributes
+ for key, val in input_names.items():
+ if key in inputs:
+ if isinstance(val, basestring) and inputs[key] is val:
+ continue
+ elif isinstance(val, tuple) and inputs[key] in val:
+ continue
+ elif hasattr(val, "search") and re.match(val, inputs[key]):
+ continue
+ else:
+ break #: Attibute value does not match
+ else:
+ break #: Attibute name does not match
+ else:
+ return action, inputs #: Passed attribute check
+
+ return {}, None #: No matching form found
+
+
+def chunks(iterable, size):
+ it = iter(iterable)
+ item = list(itertools.islice(it, size))
+ while item:
+ yield item
+ item = list(itertools.islice(it, size))