From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/accounts/AlldebridCom.py | 18 +- module/plugins/accounts/BackinNet.py | 2 +- module/plugins/accounts/BitshareCom.py | 8 +- module/plugins/accounts/CatShareNet.py | 10 +- module/plugins/accounts/CloudzillaTo.py | 6 +- module/plugins/accounts/CramitIn.py | 2 +- module/plugins/accounts/CzshareCom.py | 10 +- module/plugins/accounts/DebridItaliaCom.py | 8 +- module/plugins/accounts/DepositfilesCom.py | 6 +- module/plugins/accounts/EasybytezCom.py | 2 +- module/plugins/accounts/EuroshareEu.py | 6 +- module/plugins/accounts/ExashareCom.py | 2 +- module/plugins/accounts/FastixRu.py | 8 +- module/plugins/accounts/FastshareCz.py | 8 +- module/plugins/accounts/File4SafeCom.py | 2 +- module/plugins/accounts/FileParadoxIn.py | 2 +- module/plugins/accounts/FilecloudIo.py | 10 +- module/plugins/accounts/FilefactoryCom.py | 6 +- module/plugins/accounts/FilejungleCom.py | 6 +- module/plugins/accounts/FileomCom.py | 2 +- module/plugins/accounts/FilerNet.py | 10 +- module/plugins/accounts/FilerioCom.py | 2 +- module/plugins/accounts/FilesMailRu.py | 6 +- module/plugins/accounts/FileserveCom.py | 10 +- module/plugins/accounts/FourSharedCom.py | 6 +- module/plugins/accounts/FreakshareCom.py | 8 +- module/plugins/accounts/FreeWayMe.py | 22 +-- module/plugins/accounts/FshareVn.py | 16 +- module/plugins/accounts/Ftp.py | 2 +- module/plugins/accounts/HellshareCz.py | 22 +-- module/plugins/accounts/HighWayMe.py | 8 +- module/plugins/accounts/Http.py | 2 +- module/plugins/accounts/HugefilesNet.py | 2 +- module/plugins/accounts/HundredEightyUploadCom.py | 2 +- module/plugins/accounts/JunkyvideoCom.py | 2 +- module/plugins/accounts/JunocloudMe.py | 2 +- module/plugins/accounts/Keep2ShareCc.py | 14 +- module/plugins/accounts/LetitbitNet.py | 12 +- module/plugins/accounts/LinestorageCom.py | 2 +- module/plugins/accounts/LinksnappyCom.py | 12 +- module/plugins/accounts/MegaDebridEu.py | 10 +- module/plugins/accounts/MegaRapidCz.py | 6 +- module/plugins/accounts/MegaRapidoNet.py | 8 +- module/plugins/accounts/MegasharesCom.py | 12 +- module/plugins/accounts/MovReelCom.py | 2 +- module/plugins/accounts/MultihostersCom.py | 2 +- module/plugins/accounts/MultishareCz.py | 10 +- module/plugins/accounts/MyfastfileCom.py | 12 +- module/plugins/accounts/NitroflareCom.py | 18 +- module/plugins/accounts/NoPremiumPl.py | 18 +- module/plugins/accounts/NosuploadCom.py | 2 +- module/plugins/accounts/NovafileCom.py | 2 +- module/plugins/accounts/NowVideoSx.py | 10 +- module/plugins/accounts/OboomCom.py | 20 +-- module/plugins/accounts/OneFichierCom.py | 10 +- module/plugins/accounts/OverLoadMe.py | 10 +- module/plugins/accounts/PremiumTo.py | 6 +- module/plugins/accounts/PremiumizeMe.py | 16 +- module/plugins/accounts/PutdriveCom.py | 2 +- module/plugins/accounts/QuickshareCz.py | 8 +- module/plugins/accounts/RPNetBiz.py | 18 +- module/plugins/accounts/RapideoPl.py | 18 +- module/plugins/accounts/RapidfileshareNet.py | 2 +- module/plugins/accounts/RapidgatorNet.py | 22 +-- module/plugins/accounts/RapiduNet.py | 10 +- module/plugins/accounts/RarefileNet.py | 2 +- module/plugins/accounts/RealdebridCom.py | 8 +- module/plugins/accounts/RehostTo.py | 14 +- module/plugins/accounts/RyushareCom.py | 2 +- module/plugins/accounts/SafesharingEu.py | 2 +- module/plugins/accounts/SecureUploadEu.py | 2 +- module/plugins/accounts/SendmywayCom.py | 2 +- module/plugins/accounts/SharebeastCom.py | 2 +- module/plugins/accounts/ShareonlineBiz.py | 12 +- module/plugins/accounts/SimplyPremiumCom.py | 8 +- module/plugins/accounts/SimplydebridCom.py | 6 +- module/plugins/accounts/SmoozedCom.py | 16 +- module/plugins/accounts/StreamcloudEu.py | 2 +- module/plugins/accounts/TurbobitNet.py | 6 +- module/plugins/accounts/TusfilesNet.py | 2 +- module/plugins/accounts/UlozTo.py | 6 +- module/plugins/accounts/UploadableCh.py | 6 +- module/plugins/accounts/UploadcCom.py | 2 +- module/plugins/accounts/UploadedTo.py | 8 +- module/plugins/accounts/UploadheroCom.py | 8 +- module/plugins/accounts/UploadingCom.py | 8 +- module/plugins/accounts/UptoboxCom.py | 2 +- module/plugins/accounts/VidPlayNet.py | 2 +- module/plugins/accounts/WebshareCz.py | 16 +- module/plugins/accounts/WorldbytezCom.py | 2 +- module/plugins/accounts/XFileSharingPro.py | 6 +- module/plugins/accounts/YibaishiwuCom.py | 8 +- module/plugins/accounts/ZeveraCom.py | 10 +- module/plugins/captcha/CircleCaptcha.py | 104 ++++++------ module/plugins/captcha/GigasizeCom.py | 2 +- module/plugins/captcha/LinksaveIn.py | 2 +- module/plugins/captcha/NetloadIn.py | 2 +- module/plugins/captcha/ShareonlineBiz.py | 8 +- module/plugins/container/CCF.py | 2 +- module/plugins/container/DLC.py | 14 +- module/plugins/container/RSDF.py | 2 +- module/plugins/container/TXT.py | 8 +- module/plugins/crypter/BitshareComFolder.py | 2 +- module/plugins/crypter/C1NeonCom.py | 2 +- module/plugins/crypter/ChipDe.py | 4 +- module/plugins/crypter/CloudzillaToFolder.py | 6 +- module/plugins/crypter/CrockoComFolder.py | 2 +- module/plugins/crypter/CryptItCom.py | 2 +- module/plugins/crypter/CzshareComFolder.py | 2 +- module/plugins/crypter/DailymotionComFolder.py | 34 ++-- module/plugins/crypter/DataHuFolder.py | 6 +- module/plugins/crypter/DdlstorageComFolder.py | 2 +- module/plugins/crypter/DepositfilesComFolder.py | 2 +- module/plugins/crypter/Dereferer.py | 4 +- module/plugins/crypter/DevhostStFolder.py | 14 +- module/plugins/crypter/DlProtectCom.py | 8 +- module/plugins/crypter/DuckCryptInfo.py | 18 +- module/plugins/crypter/DuploadOrgFolder.py | 2 +- module/plugins/crypter/EasybytezComFolder.py | 2 +- module/plugins/crypter/EmbeduploadCom.py | 16 +- module/plugins/crypter/FilebeerInfoFolder.py | 2 +- module/plugins/crypter/FilecloudIoFolder.py | 2 +- module/plugins/crypter/FilecryptCc.py | 72 ++++---- module/plugins/crypter/FilefactoryComFolder.py | 4 +- module/plugins/crypter/FilerNetFolder.py | 2 +- module/plugins/crypter/FileserveComFolder.py | 2 +- module/plugins/crypter/FilesonicComFolder.py | 2 +- module/plugins/crypter/FilestubeCom.py | 2 +- module/plugins/crypter/FiletramCom.py | 2 +- module/plugins/crypter/FiredriveComFolder.py | 2 +- module/plugins/crypter/FourChanOrg.py | 2 +- module/plugins/crypter/FreakhareComFolder.py | 4 +- module/plugins/crypter/FreetexthostCom.py | 4 +- module/plugins/crypter/FshareVnFolder.py | 2 +- module/plugins/crypter/FurLy.py | 2 +- module/plugins/crypter/Go4UpCom.py | 4 +- module/plugins/crypter/GooGl.py | 6 +- module/plugins/crypter/GoogledriveComFolder.py | 2 +- module/plugins/crypter/HoerbuchIn.py | 8 +- module/plugins/crypter/HotfileComFolder.py | 2 +- module/plugins/crypter/ILoadTo.py | 2 +- module/plugins/crypter/ImgurComAlbum.py | 4 +- module/plugins/crypter/LetitbitNetFolder.py | 2 +- module/plugins/crypter/LinkCryptWs.py | 114 ++++++------- module/plugins/crypter/LinkSaveIn.py | 2 +- module/plugins/crypter/LinkdecrypterCom.py | 10 +- module/plugins/crypter/LixIn.py | 12 +- module/plugins/crypter/LofCc.py | 2 +- module/plugins/crypter/MBLinkInfo.py | 2 +- module/plugins/crypter/MediafireComFolder.py | 8 +- module/plugins/crypter/MegaCoNzFolder.py | 2 +- module/plugins/crypter/MegaRapidCzFolder.py | 2 +- module/plugins/crypter/MegauploadComFolder.py | 2 +- module/plugins/crypter/Movie2KTo.py | 2 +- module/plugins/crypter/MultiUpOrg.py | 4 +- module/plugins/crypter/MultiloadCz.py | 6 +- module/plugins/crypter/MultiuploadCom.py | 2 +- module/plugins/crypter/NCryptIn.py | 142 ++++++++-------- module/plugins/crypter/NetfolderIn.py | 2 +- module/plugins/crypter/NitroflareComFolder.py | 4 +- module/plugins/crypter/NosvideoCom.py | 2 +- module/plugins/crypter/OneKhDe.py | 2 +- module/plugins/crypter/OronComFolder.py | 2 +- module/plugins/crypter/PastebinCom.py | 2 +- module/plugins/crypter/PastedCo.py | 2 +- module/plugins/crypter/QuickshareCzFolder.py | 2 +- module/plugins/crypter/RSLayerCom.py | 2 +- module/plugins/crypter/RelinkUs.py | 114 ++++++------- module/plugins/crypter/SafelinkingNet.py | 4 +- module/plugins/crypter/SecuredIn.py | 2 +- module/plugins/crypter/SexuriaCom.py | 18 +- module/plugins/crypter/ShSt.py | 2 +- module/plugins/crypter/ShareLinksBiz.py | 142 ++++++++-------- module/plugins/crypter/SharingmatrixComFolder.py | 2 +- module/plugins/crypter/SpeedLoadOrgFolder.py | 2 +- module/plugins/crypter/StealthTo.py | 2 +- .../plugins/crypter/TNTVillageScambioeticoOrg.py | 4 +- module/plugins/crypter/TinyurlCom.py | 2 +- module/plugins/crypter/TnyCz.py | 4 +- module/plugins/crypter/TrailerzoneInfo.py | 2 +- module/plugins/crypter/TurbobitNetFolder.py | 10 +- module/plugins/crypter/TusfilesNetFolder.py | 10 +- module/plugins/crypter/UlozToFolder.py | 6 +- module/plugins/crypter/UploadableChFolder.py | 2 +- module/plugins/crypter/UploadedToFolder.py | 2 +- module/plugins/crypter/WiiReloadedOrg.py | 2 +- module/plugins/crypter/WuploadComFolder.py | 2 +- module/plugins/crypter/XFileSharingProFolder.py | 2 +- module/plugins/crypter/XupPl.py | 2 +- module/plugins/crypter/YoutubeComFolder.py | 46 ++--- module/plugins/hooks/AlldebridComHook.py | 4 +- module/plugins/hooks/AndroidPhoneNotify.py | 25 +-- module/plugins/hooks/AntiVirus.py | 36 ++-- module/plugins/hooks/BypassCaptcha.py | 30 ++-- module/plugins/hooks/Captcha9Kw.py | 72 ++++---- module/plugins/hooks/CaptchaBrotherhood.py | 32 ++-- module/plugins/hooks/Checksum.py | 52 +++--- module/plugins/hooks/ClickAndLoad.py | 18 +- module/plugins/hooks/DeathByCaptcha.py | 42 ++--- module/plugins/hooks/DebridItaliaComHook.py | 4 +- module/plugins/hooks/DeleteFinished.py | 34 ++-- module/plugins/hooks/DownloadScheduler.py | 28 +-- module/plugins/hooks/EasybytezComHook.py | 4 +- module/plugins/hooks/ExpertDecoders.py | 34 ++-- module/plugins/hooks/ExternalScripts.py | 69 ++++---- module/plugins/hooks/ExtractArchive.py | 173 +++++++++---------- module/plugins/hooks/FastixRuHook.py | 4 +- module/plugins/hooks/FreeWayMeHook.py | 4 +- module/plugins/hooks/HighWayMeHook.py | 4 +- module/plugins/hooks/HotFolder.py | 14 +- module/plugins/hooks/IRCInterface.py | 40 ++--- module/plugins/hooks/ImageTyperz.py | 40 ++--- module/plugins/hooks/JustPremium.py | 14 +- module/plugins/hooks/LinkdecrypterComHook.py | 4 +- module/plugins/hooks/LinksnappyComHook.py | 4 +- module/plugins/hooks/MegaDebridEuHook.py | 6 +- module/plugins/hooks/MegaRapidoNetHook.py | 4 +- module/plugins/hooks/MergeFiles.py | 10 +- module/plugins/hooks/MultiHome.py | 24 +-- module/plugins/hooks/MultihostersComHook.py | 2 +- module/plugins/hooks/MultishareCzHook.py | 4 +- module/plugins/hooks/MyfastfileComHook.py | 6 +- module/plugins/hooks/NoPremiumPlHook.py | 6 +- module/plugins/hooks/OverLoadMeHook.py | 4 +- module/plugins/hooks/PremiumToHook.py | 4 +- module/plugins/hooks/PremiumizeMeHook.py | 4 +- module/plugins/hooks/PutdriveComHook.py | 2 +- module/plugins/hooks/RPNetBizHook.py | 4 +- module/plugins/hooks/RapideoPlHook.py | 6 +- module/plugins/hooks/RealdebridComHook.py | 4 +- module/plugins/hooks/RehostToHook.py | 4 +- module/plugins/hooks/RestartFailed.py | 28 +-- module/plugins/hooks/SimplyPremiumComHook.py | 4 +- module/plugins/hooks/SimplydebridComHook.py | 4 +- module/plugins/hooks/SkipRev.py | 10 +- module/plugins/hooks/SmoozedComHook.py | 4 +- module/plugins/hooks/UnSkipOnFail.py | 12 +- module/plugins/hooks/UpdateManager.py | 60 +++---- module/plugins/hooks/UserAgentSwitcher.py | 10 +- module/plugins/hooks/WindowsPhoneNotify.py | 29 ++-- module/plugins/hooks/XFileSharingPro.py | 48 +++--- module/plugins/hooks/XMPPInterface.py | 36 ++-- module/plugins/hooks/ZeveraComHook.py | 4 +- module/plugins/hoster/AlldebridCom.py | 14 +- module/plugins/hoster/AndroidfilehostCom.py | 16 +- module/plugins/hoster/BasePlugin.py | 26 +-- module/plugins/hoster/BasketbuildCom.py | 16 +- module/plugins/hoster/BayfilesCom.py | 2 +- module/plugins/hoster/BezvadataCz.py | 36 ++-- module/plugins/hoster/BillionuploadsCom.py | 2 +- module/plugins/hoster/BitshareCom.py | 46 ++--- module/plugins/hoster/BoltsharingCom.py | 2 +- module/plugins/hoster/CatShareNet.py | 8 +- module/plugins/hoster/CloudzerNet.py | 2 +- module/plugins/hoster/CloudzillaTo.py | 16 +- module/plugins/hoster/CramitIn.py | 2 +- module/plugins/hoster/CrockoCom.py | 8 +- module/plugins/hoster/CyberlockerCh.py | 2 +- module/plugins/hoster/CzshareCom.py | 42 ++--- module/plugins/hoster/DailymotionCom.py | 32 ++-- module/plugins/hoster/DataHu.py | 6 +- module/plugins/hoster/DataportCz.py | 12 +- module/plugins/hoster/DateiTo.py | 12 +- module/plugins/hoster/DdlstorageCom.py | 2 +- module/plugins/hoster/DebridItaliaCom.py | 8 +- module/plugins/hoster/DepositfilesCom.py | 14 +- module/plugins/hoster/DevhostSt.py | 6 +- module/plugins/hoster/DlFreeFr.py | 22 +-- module/plugins/hoster/DodanePl.py | 2 +- module/plugins/hoster/DropboxCom.py | 10 +- module/plugins/hoster/DuploadOrg.py | 2 +- module/plugins/hoster/EasybytezCom.py | 2 +- module/plugins/hoster/EdiskCz.py | 6 +- module/plugins/hoster/EgoFilesCom.py | 2 +- module/plugins/hoster/EnteruploadCom.py | 2 +- module/plugins/hoster/EpicShareNet.py | 2 +- module/plugins/hoster/EuroshareEu.py | 12 +- module/plugins/hoster/ExashareCom.py | 10 +- module/plugins/hoster/ExtabitCom.py | 16 +- module/plugins/hoster/FastixRu.py | 8 +- module/plugins/hoster/FastshareCz.py | 18 +- module/plugins/hoster/FileApeCom.py | 2 +- module/plugins/hoster/FileSharkPl.py | 22 +-- module/plugins/hoster/FileStoreTo.py | 8 +- module/plugins/hoster/FilebeerInfo.py | 2 +- module/plugins/hoster/FileboomMe.py | 18 +- module/plugins/hoster/FilecloudIo.py | 26 +-- module/plugins/hoster/FiledropperCom.py | 10 +- module/plugins/hoster/FilefactoryCom.py | 16 +- module/plugins/hoster/FilejungleCom.py | 4 +- module/plugins/hoster/FileomCom.py | 8 +- module/plugins/hoster/FilepostCom.py | 22 +-- module/plugins/hoster/FilepupNet.py | 8 +- module/plugins/hoster/FilerNet.py | 12 +- module/plugins/hoster/FilerioCom.py | 2 +- module/plugins/hoster/FilesMailRu.py | 34 ++-- module/plugins/hoster/FileserveCom.py | 74 ++++---- module/plugins/hoster/FileshareInUa.py | 2 +- module/plugins/hoster/FilesonicCom.py | 2 +- module/plugins/hoster/FileuploadNet.py | 6 +- module/plugins/hoster/FilezyNet.py | 2 +- module/plugins/hoster/FiredriveCom.py | 2 +- module/plugins/hoster/FlyFilesNet.py | 6 +- module/plugins/hoster/FourSharedCom.py | 6 +- module/plugins/hoster/FreakshareCom.py | 28 +-- module/plugins/hoster/FreeWayMe.py | 14 +- module/plugins/hoster/FreevideoCz.py | 2 +- module/plugins/hoster/FshareVn.py | 26 +-- module/plugins/hoster/Ftp.py | 16 +- module/plugins/hoster/GamefrontCom.py | 10 +- module/plugins/hoster/GigapetaCom.py | 10 +- module/plugins/hoster/GooIm.py | 8 +- module/plugins/hoster/GoogledriveCom.py | 12 +- module/plugins/hoster/HellshareCz.py | 6 +- module/plugins/hoster/HellspyCz.py | 2 +- module/plugins/hoster/HighWayMe.py | 24 +-- module/plugins/hoster/HostujeNet.py | 10 +- module/plugins/hoster/HotfileCom.py | 2 +- module/plugins/hoster/HugefilesNet.py | 2 +- module/plugins/hoster/HundredEightyUploadCom.py | 2 +- module/plugins/hoster/IFileWs.py | 2 +- module/plugins/hoster/IcyFilesCom.py | 2 +- module/plugins/hoster/IfileIt.py | 2 +- module/plugins/hoster/IfolderRu.py | 16 +- module/plugins/hoster/JumbofilesCom.py | 8 +- module/plugins/hoster/JunocloudMe.py | 2 +- module/plugins/hoster/Keep2ShareCc.py | 32 ++-- module/plugins/hoster/KickloadCom.py | 2 +- module/plugins/hoster/KingfilesNet.py | 10 +- module/plugins/hoster/LemUploadsCom.py | 2 +- module/plugins/hoster/LetitbitNet.py | 36 ++-- module/plugins/hoster/LinksnappyCom.py | 8 +- module/plugins/hoster/LoadTo.py | 8 +- module/plugins/hoster/LolabitsEs.py | 10 +- module/plugins/hoster/LomafileCom.py | 2 +- module/plugins/hoster/LuckyShareNet.py | 20 +-- module/plugins/hoster/MediafireCom.py | 18 +- module/plugins/hoster/MegaCoNz.py | 34 ++-- module/plugins/hoster/MegaDebridEu.py | 4 +- module/plugins/hoster/MegaFilesSe.py | 2 +- module/plugins/hoster/MegaRapidCz.py | 8 +- module/plugins/hoster/MegaRapidoNet.py | 8 +- module/plugins/hoster/MegacrypterCom.py | 8 +- module/plugins/hoster/MegareleaseOrg.py | 2 +- module/plugins/hoster/MegasharesCom.py | 32 ++-- module/plugins/hoster/MegauploadCom.py | 2 +- module/plugins/hoster/MegavideoCom.py | 2 +- module/plugins/hoster/MovReelCom.py | 2 +- module/plugins/hoster/MultihostersCom.py | 2 +- module/plugins/hoster/MultishareCz.py | 12 +- module/plugins/hoster/MyfastfileCom.py | 8 +- module/plugins/hoster/MystoreTo.py | 10 +- module/plugins/hoster/MyvideoDe.py | 2 +- module/plugins/hoster/NahrajCz.py | 2 +- module/plugins/hoster/NarodRu.py | 10 +- module/plugins/hoster/NetloadIn.py | 2 +- module/plugins/hoster/NitroflareCom.py | 8 +- module/plugins/hoster/NoPremiumPl.py | 26 +-- module/plugins/hoster/NosuploadCom.py | 10 +- module/plugins/hoster/NovafileCom.py | 2 +- module/plugins/hoster/NowDownloadSx.py | 10 +- module/plugins/hoster/NowVideoSx.py | 8 +- module/plugins/hoster/OboomCom.py | 84 ++++----- module/plugins/hoster/OneFichierCom.py | 14 +- module/plugins/hoster/OpenloadIo.py | 6 +- module/plugins/hoster/OronCom.py | 2 +- module/plugins/hoster/OverLoadMe.py | 12 +- module/plugins/hoster/PandaplaNet.py | 2 +- module/plugins/hoster/PornhostCom.py | 2 +- module/plugins/hoster/PornhubCom.py | 2 +- module/plugins/hoster/PotloadCom.py | 2 +- module/plugins/hoster/PremiumTo.py | 12 +- module/plugins/hoster/PremiumizeMe.py | 6 +- module/plugins/hoster/PromptfileCom.py | 8 +- module/plugins/hoster/PrzeklejPl.py | 2 +- module/plugins/hoster/PutdriveCom.py | 2 +- module/plugins/hoster/QuickshareCz.py | 22 +-- module/plugins/hoster/RPNetBiz.py | 22 +-- module/plugins/hoster/RapideoPl.py | 26 +-- module/plugins/hoster/RapidfileshareNet.py | 2 +- module/plugins/hoster/RapidgatorNet.py | 32 ++-- module/plugins/hoster/RapiduNet.py | 18 +- module/plugins/hoster/RarefileNet.py | 2 +- module/plugins/hoster/RealdebridCom.py | 14 +- module/plugins/hoster/RedtubeCom.py | 2 +- module/plugins/hoster/RehostTo.py | 4 +- module/plugins/hoster/RemixshareCom.py | 8 +- module/plugins/hoster/RgHostNet.py | 2 +- module/plugins/hoster/SafesharingEu.py | 2 +- module/plugins/hoster/SecureUploadEu.py | 2 +- module/plugins/hoster/SendspaceCom.py | 12 +- module/plugins/hoster/Share4WebCom.py | 2 +- module/plugins/hoster/Share76Com.py | 2 +- module/plugins/hoster/ShareFilesCo.py | 2 +- module/plugins/hoster/SharebeesCom.py | 2 +- module/plugins/hoster/ShareonlineBiz.py | 52 +++--- module/plugins/hoster/ShareplaceCom.py | 6 +- module/plugins/hoster/SharingmatrixCom.py | 2 +- module/plugins/hoster/ShragleCom.py | 2 +- module/plugins/hoster/SimplyPremiumCom.py | 24 +-- module/plugins/hoster/SimplydebridCom.py | 10 +- module/plugins/hoster/SizedriveCom.py | 10 +- module/plugins/hoster/SmoozedCom.py | 4 +- module/plugins/hoster/SockshareCom.py | 2 +- module/plugins/hoster/SolidfilesCom.py | 6 +- module/plugins/hoster/SoundcloudCom.py | 8 +- module/plugins/hoster/SpeedLoadOrg.py | 2 +- module/plugins/hoster/SpeedfileCz.py | 2 +- module/plugins/hoster/SpeedyshareCom.py | 8 +- module/plugins/hoster/StorageTo.py | 2 +- module/plugins/hoster/StreamCz.py | 12 +- module/plugins/hoster/StreamcloudEu.py | 8 +- module/plugins/hoster/TurbobitNet.py | 54 +++--- module/plugins/hoster/TurbouploadCom.py | 2 +- module/plugins/hoster/TusfilesNet.py | 10 +- module/plugins/hoster/TwoSharedCom.py | 6 +- module/plugins/hoster/UlozTo.py | 50 +++--- module/plugins/hoster/UloziskoSk.py | 12 +- module/plugins/hoster/UnibytesCom.py | 16 +- module/plugins/hoster/UnrestrictLi.py | 2 +- module/plugins/hoster/UpleaCom.py | 12 +- module/plugins/hoster/UploadStationCom.py | 2 +- module/plugins/hoster/UploadableCh.py | 14 +- module/plugins/hoster/UploadboxCom.py | 2 +- module/plugins/hoster/UploadedTo.py | 16 +- module/plugins/hoster/UploadhereCom.py | 2 +- module/plugins/hoster/UploadheroCom.py | 8 +- module/plugins/hoster/UploadingCom.py | 14 +- module/plugins/hoster/UploadkingCom.py | 2 +- module/plugins/hoster/UpstoreNet.py | 6 +- module/plugins/hoster/UptoboxCom.py | 8 +- module/plugins/hoster/VeehdCom.py | 10 +- module/plugins/hoster/VeohCom.py | 14 +- module/plugins/hoster/VidPlayNet.py | 2 +- module/plugins/hoster/VimeoCom.py | 20 +-- module/plugins/hoster/Vipleech4UCom.py | 2 +- module/plugins/hoster/VkCom.py | 6 +- module/plugins/hoster/WarserverCz.py | 2 +- module/plugins/hoster/WebshareCz.py | 14 +- module/plugins/hoster/WrzucTo.py | 6 +- module/plugins/hoster/WuploadCom.py | 2 +- module/plugins/hoster/X7To.py | 2 +- module/plugins/hoster/XFileSharingPro.py | 8 +- module/plugins/hoster/XHamsterCom.py | 12 +- module/plugins/hoster/XVideosCom.py | 2 +- module/plugins/hoster/XdadevelopersCom.py | 10 +- module/plugins/hoster/Xdcc.py | 34 ++-- module/plugins/hoster/YadiSk.py | 14 +- module/plugins/hoster/YibaishiwuCom.py | 8 +- module/plugins/hoster/YoupornCom.py | 2 +- module/plugins/hoster/YourfilesTo.py | 4 +- module/plugins/hoster/YoutubeCom.py | 42 ++--- module/plugins/hoster/ZDF.py | 2 +- module/plugins/hoster/ZShareNet.py | 2 +- module/plugins/hoster/ZahikiNet.py | 8 +- module/plugins/hoster/ZeveraCom.py | 4 +- module/plugins/hoster/ZippyshareCom.py | 14 +- module/plugins/internal/Account.py | 108 +++++++----- module/plugins/internal/AdYouLike.py | 10 +- module/plugins/internal/AdsCaptcha.py | 10 +- module/plugins/internal/Captcha.py | 2 +- module/plugins/internal/Container.py | 2 +- module/plugins/internal/Crypter.py | 12 +- module/plugins/internal/DeadCrypter.py | 6 +- module/plugins/internal/DeadHoster.py | 6 +- module/plugins/internal/Extractor.py | 14 +- module/plugins/internal/Hook.py | 60 +++---- module/plugins/internal/Hoster.py | 138 +++++++-------- module/plugins/internal/MultiHook.py | 68 ++++---- module/plugins/internal/MultiHoster.py | 58 +++---- module/plugins/internal/OCR.py | 4 +- module/plugins/internal/Plugin.py | 58 ++++--- module/plugins/internal/ReCaptcha.py | 40 ++--- module/plugins/internal/SevenZip.py | 8 +- module/plugins/internal/SimpleCrypter.py | 42 ++--- module/plugins/internal/SimpleHoster.py | 188 ++++++++++----------- module/plugins/internal/SolveMedia.py | 18 +- module/plugins/internal/UnRar.py | 12 +- module/plugins/internal/UnZip.py | 4 +- module/plugins/internal/XFSAccount.py | 28 +-- module/plugins/internal/XFSCrypter.py | 2 +- module/plugins/internal/XFSHoster.py | 70 ++++---- 482 files changed, 3125 insertions(+), 3093 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index a109faf4f..eb58da928 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -12,36 +12,36 @@ from module.plugins.internal.Account import Account class AlldebridCom(Account): __name__ = "AlldebridCom" __type__ = "account" - __version__ = "0.25" + __version__ = "0.26" __description__ = """AllDebrid.com account plugin""" __license__ = "GPLv3" __authors__ = [("Andy Voigt", "spamsales@online.de")] - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) + def load_account_info(self, user, req): + data = self.get_account_data(user) html = self.load("http://www.alldebrid.com/account/", req=req) soup = BeautifulSoup(html) - #Try to parse expiration date directly from the control panel page (better accuracy) + # Try to parse expiration date directly from the control panel page (better accuracy) try: time_text = soup.find('div', attrs={'class': 'remaining_time_text'}).strong.string - self.logDebug("Account expires in: %s" % time_text) + self.log_debug("Account expires in: %s" % time_text) p = re.compile('\d+') exp_data = p.findall(time_text) exp_time = time.time() + int(exp_data[0]) * 24 * 60 * 60 + int( exp_data[1]) * 60 * 60 + (int(exp_data[2]) - 1) * 60 - #Get expiration date from API + # Get expiration date from API except Exception: - data = self.getAccountData(user) + data = self.get_account_data(user) html = self.load("https://www.alldebrid.com/api.php", get={'action': "info_user", 'login': user, 'pw': data['password']}, req=req) - self.logDebug(html) + self.log_debug(html) xml = dom.parseString(html) exp_time = time.time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60 @@ -60,4 +60,4 @@ class AlldebridCom(Account): if "This login doesn't exist" in html \ or "The password is not valid" in html \ or "Invalid captcha" in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/BackinNet.py b/module/plugins/accounts/BackinNet.py index 46c8d7ac5..c0c88d6f1 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.01" + __version__ = "0.02" __description__ = """Backin.net account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 8f748b9e9..912b58173 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -6,21 +6,21 @@ from module.plugins.internal.Account import Account class BitshareCom(Account): __name__ = "BitshareCom" __type__ = "account" - __version__ = "0.14" + __version__ = "0.15" __description__ = """Bitshare account plugin""" __license__ = "GPLv3" __authors__ = [("Paul King", None)] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): html = self.load("http://bitshare.com/mysettings.html", req=req) if "\"http://bitshare.com/myupgrade.html\">Free" in html: return {"validuntil": -1, "trafficleft": -1, "premium": False} if not '' in html: - self.logWarning(_("Activate direct Download in your Bitshare Account")) + self.log_warning(_("Activate direct Download in your Bitshare Account")) return {"validuntil": -1, "trafficleft": -1, "premium": True} @@ -30,4 +30,4 @@ class BitshareCom(Account): post={"user": user, "password": data['password'], "submit": "Login"}, req=req) if "login" in req.lastEffectiveURL: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 79e94cc17..8eb422962 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.07" + __version__ = "0.08" __description__ = """Catshare.net account plugin""" __license__ = "GPLv3" @@ -21,7 +21,7 @@ class CatShareNet(Account): TRAFFIC_LEFT_PATTERN = r'([0-9.]+ [kMG]B)' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): premium = False validuntil = -1 trafficleft = -1 @@ -33,7 +33,7 @@ class CatShareNet(Account): try: expiredate = re.search(self.VALID_UNTIL_PATTERN, html).group(1) - self.logDebug("Expire date: " + expiredate) + self.log_debug("Expire date: " + expiredate) validuntil = time.mktime(time.strptime(expiredate, "%Y-%m-%d %H:%M:%S")) @@ -41,7 +41,7 @@ class CatShareNet(Account): pass try: - trafficleft = self.parseTraffic(re.search(self.TRAFFIC_LEFT_PATTERN, html).group(1)) + trafficleft = self.parse_traffic(re.search(self.TRAFFIC_LEFT_PATTERN, html).group(1)) except Exception: pass @@ -57,4 +57,4 @@ class CatShareNet(Account): 'user[submit]': "Login"}, req=req) if not 'Wyloguj' in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/CloudzillaTo.py b/module/plugins/accounts/CloudzillaTo.py index 2328b0a86..5716c8d94 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.03" + __version__ = "0.04" __description__ = """Cloudzilla.to account plugin""" __license__ = "GPLv3" @@ -18,7 +18,7 @@ class CloudzillaTo(Account): PREMIUM_PATTERN = r'

account type

\s*Premium Account' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): html = self.load("http://www.cloudzilla.to/", req=req) premium = True if re.search(self.PREMIUM_PATTERN, html) else False @@ -33,4 +33,4 @@ class CloudzillaTo(Account): 'w' : "dologin"}, req=req) if "ERROR" in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/CramitIn.py b/module/plugins/accounts/CramitIn.py index a9e2274a2..1e6dcca20 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.03" + __version__ = "0.04" __description__ = """Cramit.in account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py index c53c1807b..f86264cf5 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.19" + __version__ = "0.20" __description__ = """Czshare.com account plugin, now Sdilej.cz""" __license__ = "GPLv3" @@ -20,7 +20,7 @@ class CzshareCom(Account): CREDIT_LEFT_PATTERN = r'\s*([\d ,]+) (KiB|MiB|GiB)\s*([^<]*)\s*' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): premium = False validuntil = None trafficleft = None @@ -29,11 +29,11 @@ class CzshareCom(Account): try: m = re.search(self.CREDIT_LEFT_PATTERN, html) - trafficleft = self.parseTraffic(m.group(1).replace(' ', '').replace(',', '.')) + m.group(2) + trafficleft = self.parse_traffic(m.group(1).replace(' ', '').replace(',', '.')) + m.group(2) validuntil = time.mktime(time.strptime(m.group(3), '%d.%m.%y %H:%M')) except Exception, e: - self.logError(e) + self.log_error(e) else: premium = True @@ -50,4 +50,4 @@ class CzshareCom(Account): "login-name": user}, req=req) if '
(.*?)
", html).group(1) @@ -32,4 +32,4 @@ class DepositfilesCom(Account): post={"login": user, "password": data['password']}, req=req) if r'
Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.
' in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/EasybytezCom.py b/module/plugins/accounts/EasybytezCom.py index 93d3e2c19..b78523b62 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.12" + __version__ = "0.13" __description__ = """EasyBytez.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py index 4af9803b7..ffe30d02f 100644 --- a/module/plugins/accounts/EuroshareEu.py +++ b/module/plugins/accounts/EuroshareEu.py @@ -9,14 +9,14 @@ from module.plugins.internal.Account import Account class EuroshareEu(Account): __name__ = "EuroshareEu" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __description__ = """Euroshare.eu account plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): self.relogin(user) html = self.load("http://euroshare.eu/customer-zone/settings/", req=req) @@ -38,4 +38,4 @@ class EuroshareEu(Account): "password": data['password']}, req=req) if u">Nesprávne prihlasovacie meno alebo heslo" in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/ExashareCom.py b/module/plugins/accounts/ExashareCom.py index 431798522..907592bf7 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.01" + __version__ = "0.02" __description__ = """Exashare.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py index dedbc0d5d..eaf12619a 100644 --- a/module/plugins/accounts/FastixRu.py +++ b/module/plugins/accounts/FastixRu.py @@ -7,15 +7,15 @@ from module.common.json_layer import json_loads class FastixRu(Account): __name__ = "FastixRu" __type__ = "account" - __version__ = "0.04" + __version__ = "0.05" __description__ = """Fastix account plugin""" __license__ = "GPLv3" __authors__ = [("Massimo Rosamilia", "max@spiritix.eu")] - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) + def load_account_info(self, user, req): + data = self.get_account_data(user) html = json_loads(self.load("http://fastix.ru/api_v2/", get={'apikey': data['api'], 'sub': "getaccountdetails"}), req=req) points = html['points'] @@ -38,4 +38,4 @@ class FastixRu(Account): data['api'] = api if "error_code" in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py index 54253041c..be3a91a16 100644 --- a/module/plugins/accounts/FastshareCz.py +++ b/module/plugins/accounts/FastshareCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account class FastshareCz(Account): __name__ = "FastshareCz" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __description__ = """Fastshare.cz account plugin""" __license__ = "GPLv3" @@ -19,7 +19,7 @@ class FastshareCz(Account): CREDIT_PATTERN = r'Credit\s*:\s*\s*(.+?)\s*<' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): validuntil = -1 trafficleft = None premium = False @@ -28,7 +28,7 @@ class FastshareCz(Account): m = re.search(self.CREDIT_PATTERN, html) if m: - trafficleft = self.parseTraffic(m.group(1)) + trafficleft = self.parse_traffic(m.group(1)) premium = bool(trafficleft) @@ -46,4 +46,4 @@ class FastshareCz(Account): post={'login': user, 'heslo': data['password']}, req=req) if ">Wrong username or password" in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/File4SafeCom.py b/module/plugins/accounts/File4SafeCom.py index 50fe1aac8..74038a457 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.05" + __version__ = "0.06" __description__ = """File4Safe.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/FileParadoxIn.py b/module/plugins/accounts/FileParadoxIn.py index c12d99d6a..4bf179fbf 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.02" + __version__ = "0.03" __description__ = """FileParadox.in account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index 4d69a2ae2..3c3f79ed8 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class FilecloudIo(Account): __name__ = "FilecloudIo" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __description__ = """FilecloudIo account plugin""" __license__ = "GPLv3" @@ -15,16 +15,16 @@ class FilecloudIo(Account): ("stickell", "l.stickell@yahoo.it")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): #: It looks like the first API request always fails, so we retry 5 times, it should work on the second try for _i in xrange(5): rep = self.load("https://secure.filecloud.io/api-fetch_apikey.api", - post={"username": user, "password": self.getAccountData(user)['password']}) + post={"username": user, "password": self.get_account_data(user)['password']}) rep = json_loads(rep) if rep['status'] == 'ok': break elif rep['status'] == 'error' and rep['message'] == 'no such user or wrong password': - self.logError(_("Wrong username or password")) + self.log_error(_("Wrong username or password")) return {"valid": False, "premium": False} else: return {"premium": False} @@ -56,4 +56,4 @@ class FilecloudIo(Account): req=req) if "you have successfully logged in" not in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py index 9d61ea927..a950217f4 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.16" + __version__ = "0.17" __description__ = """Filefactory.com account plugin""" __license__ = "GPLv3" @@ -21,7 +21,7 @@ class FilefactoryCom(Account): VALID_UNTIL_PATTERN = r'Premium valid until: (?P\d{1,2})\w{1,2} (?P\w{3}), (?P\d{4})' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): html = self.load("http://www.filefactory.com/account/", req=req) m = re.search(self.VALID_UNTIL_PATTERN, html) @@ -45,4 +45,4 @@ class FilefactoryCom(Account): "Submit" : "Sign In"}, req=req) if req.lastEffectiveURL != "http://www.filefactory.com/account/": - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index 459c70c95..5b4092681 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class FilejungleCom(Account): __name__ = "FilejungleCom" __type__ = "account" - __version__ = "0.13" + __version__ = "0.14" __description__ = """Filejungle.com account plugin""" __license__ = "GPLv3" @@ -23,7 +23,7 @@ class FilejungleCom(Account): LOGIN_FAILED_PATTERN = r'' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): html = self.load(self.URL + "dashboard.php", req=req) m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: @@ -46,4 +46,4 @@ class FilejungleCom(Account): "recaptcha_shortencode_field": ""}, req=req) if re.search(self.LOGIN_FAILED_PATTERN, html): - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/FileomCom.py b/module/plugins/accounts/FileomCom.py index 7c743f56a..820185497 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.02" + __version__ = "0.03" __description__ = """Fileom.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index 9ab900831..acee71912 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.06" + __version__ = "0.07" __description__ = """Filer.net account plugin""" __license__ = "GPLv3" @@ -22,7 +22,7 @@ class FilerNet(Account): FREE_PATTERN = r'Account Status\s*\s*Free' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): html = self.load("https://filer.net/profile", req=req) #: Free user @@ -34,11 +34,11 @@ class FilerNet(Account): if until and traffic: validuntil = time.mktime(time.strptime(until.group(1), "%d.%m.%Y %H:%M:%S")) - trafficleft = self.parseTraffic(traffic.group(1)) + trafficleft = self.parse_traffic(traffic.group(1)) return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} else: - self.logError(_("Unable to retrieve account information")) + self.log_error(_("Unable to retrieve account information")) return {"premium": False, "validuntil": None, "trafficleft": None} @@ -55,4 +55,4 @@ class FilerNet(Account): "_target_path": "https://filer.net/"}, req=req) if 'Logout' not in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/FilerioCom.py b/module/plugins/accounts/FilerioCom.py index 4c6755293..6c34ab04c 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.03" + __version__ = "0.04" __description__ = """FileRio.in account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/FilesMailRu.py b/module/plugins/accounts/FilesMailRu.py index a1f86f7b5..c8490bf2f 100644 --- a/module/plugins/accounts/FilesMailRu.py +++ b/module/plugins/accounts/FilesMailRu.py @@ -6,14 +6,14 @@ from module.plugins.internal.Account import Account class FilesMailRu(Account): __name__ = "FilesMailRu" __type__ = "account" - __version__ = "0.12" + __version__ = "0.13" __description__ = """Filesmail.ru account plugin""" __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): return {"validuntil": None, "trafficleft": None} @@ -27,4 +27,4 @@ class FilesMailRu(Account): "Page": "http://files.mail.ru/"}, req=req) if "Неверное имя пользователя или пароль" in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py index bda6efc8d..5c6c15167 100644 --- a/module/plugins/accounts/FileserveCom.py +++ b/module/plugins/accounts/FileserveCom.py @@ -9,15 +9,15 @@ from module.common.json_layer import json_loads class FileserveCom(Account): __name__ = "FileserveCom" __type__ = "account" - __version__ = "0.21" + __version__ = "0.22" __description__ = """Fileserve.com account plugin""" __license__ = "GPLv3" __authors__ = [("mkaay", "mkaay@mkaay.de")] - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) + def load_account_info(self, user, req): + data = self.get_account_data(user) html = self.load("http://app.fileserve.com/api/login/", post={"username": user, "password": data['password'], "submit": "Submit+Query"}, req=req) @@ -36,9 +36,9 @@ class FileserveCom(Account): res = json_loads(html) if not res['type']: - self.wrongPassword() + self.wrong_password() - #login at fileserv html + # login at fileserv html self.load("http://www.fileserve.com/login.php", post={"loginUserName": user, "loginUserPassword": data['password'], "autoLogin": "checked", "loginFormSubmit": "Login"}, req=req) diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 2f79d944c..9471e49ca 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account class FourSharedCom(Account): __name__ = "FourSharedCom" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __description__ = """FourShared.com account plugin""" __license__ = "GPLv3" @@ -14,7 +14,7 @@ class FourSharedCom(Account): ("stickell", "l.stickell@yahoo.it")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): #: Free mode only for now return {"premium": False} @@ -30,4 +30,4 @@ class FourSharedCom(Account): 'returnTo' : "http://www.4shared.com/account/home.jsp"}, req=req) if 'Please log in to access your 4shared account' in res: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/FreakshareCom.py b/module/plugins/accounts/FreakshareCom.py index b33790071..7548338f4 100644 --- a/module/plugins/accounts/FreakshareCom.py +++ b/module/plugins/accounts/FreakshareCom.py @@ -9,14 +9,14 @@ from module.plugins.internal.Account import Account class FreakshareCom(Account): __name__ = "FreakshareCom" __type__ = "account" - __version__ = "0.14" + __version__ = "0.15" __description__ = """Freakshare.com account plugin""" __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): premium = False validuntil = None trafficleft = None @@ -32,7 +32,7 @@ class FreakshareCom(Account): try: m = re.search(r'Traffic verbleibend:\s*([^<]+)', html, re.M) - trafficleft = self.parseTraffic(m.group(1)) + trafficleft = self.parse_traffic(m.group(1)) except Exception: pass @@ -47,4 +47,4 @@ class FreakshareCom(Account): post={"submit": "Login", "user": user, "pass": data['password']}, req=req) if ">Wrong Username or Password" in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py index b9a0acea7..95977bd0f 100644 --- a/module/plugins/accounts/FreeWayMe.py +++ b/module/plugins/accounts/FreeWayMe.py @@ -7,21 +7,21 @@ from module.common.json_layer import json_loads class FreeWayMe(Account): __name__ = "FreeWayMe" __type__ = "account" - __version__ = "0.15" + __version__ = "0.16" __description__ = """FreeWayMe account plugin""" __license__ = "GPLv3" __authors__ = [("Nicolas Giese", "james@free-way.me")] - def loadAccountInfo(self, user, req): - status = self.getAccountStatus(user, req) + def load_account_info(self, user, req): + status = self.get_account_status(user, req) - self.logDebug(status) + self.log_debug(status) account_info = {"validuntil": -1, "premium": False} if status['premium'] == "Free": - account_info['trafficleft'] = self.parseTraffic(status['guthaben'] + "MB") + account_info['trafficleft'] = self.parse_traffic(status['guthaben'] + "MB") elif status['premium'] == "Spender": account_info['trafficleft'] = -1 elif status['premium'] == "Flatrate": @@ -33,20 +33,20 @@ class FreeWayMe(Account): def login(self, user, data, req): - status = self.getAccountStatus(user, req) + status = self.get_account_status(user, req) #: Check if user and password are valid if not status: - self.wrongPassword() + self.wrong_password() - def getAccountStatus(self, user, req): + def get_account_status(self, user, req): answer = self.load("http://www.free-way.bz/ajax/jd.php", #@TODO: Revert to `https` in 0.4.10 - get={"id": 4, "user": user, "pass": self.getAccountData(user)['password']}) + get={"id": 4, "user": user, "pass": self.get_account_data(user)['password']}) - self.logDebug("Login: %s" % answer) + self.log_debug("Login: %s" % answer) if answer == "Invalid login": - self.wrongPassword() + self.wrong_password() return json_loads(answer) diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index 67aafae86..3149d6548 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.10" + __version__ = "0.11" __description__ = """Fshare.vn account plugin""" __license__ = "GPLv3" @@ -23,19 +23,19 @@ class FshareVn(Account): DIRECT_DOWNLOAD_PATTERN = ur']*)[^>]*/>Kích hoạt download trực tiếp' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): html = self.load("http://www.fshare.vn/account_info.php", req=req) if re.search(self.LIFETIME_PATTERN, html): - self.logDebug("Lifetime membership detected") - trafficleft = self.getTrafficLeft() + self.log_debug("Lifetime membership detected") + trafficleft = self.get_traffic_left() return {"validuntil": -1, "trafficleft": trafficleft, "premium": True} m = re.search(self.VALID_UNTIL_PATTERN, html) if m: premium = True validuntil = time.mktime(time.strptime(m.group(1), '%I:%M:%S %p %d-%m-%Y')) - trafficleft = self.getTrafficLeft() + trafficleft = self.get_traffic_left() else: premium = False validuntil = None @@ -53,9 +53,9 @@ class FshareVn(Account): referer=True, req=req) if not re.search(r'\s*\s*\s*' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): self.relogin(user) html = self.load("http://www.hellshare.com/", req=req) @@ -33,18 +33,18 @@ class HellshareCz(Account): premium = True try: if "." in credit: - #Time-based account + # Time-based account vt = [int(x) for x in credit.split('.')[:2]] lt = time.localtime() year = lt.tm_year + int(vt[1] < lt.tm_mon or (vt[1] == lt.tm_mon and vt[0] < lt.tm_mday)) validuntil = time.mktime(time.strptime("%s%d 23:59:59" % (credit, year), "%d.%m.%Y %H:%M:%S")) trafficleft = -1 else: - #Traffic-based account - trafficleft = self.parseTraffic(credit + "MB") + # Traffic-based account + trafficleft = self.parse_traffic(credit + "MB") validuntil = -1 except Exception, e: - self.logError(_("Unable to parse credit info"), e) + self.log_error(_("Unable to parse credit info"), e) validuntil = -1 trafficleft = -1 @@ -54,18 +54,18 @@ class HellshareCz(Account): def login(self, user, data, req): html = self.load('http://www.hellshare.com/', req=req) if req.lastEffectiveURL != 'http://www.hellshare.com/': - #Switch to English - self.logDebug("Switch lang - URL: %s" % req.lastEffectiveURL) + # Switch to English + self.log_debug("Switch lang - URL: %s" % req.lastEffectiveURL) json = self.load("%s?do=locRouter-show" % req.lastEffectiveURL, req=req) hash = re.search(r"(\-\-[0-9a-f]+\-)", json).group(1) - self.logDebug("Switch lang - HASH: %s" % hash) + self.log_debug("Switch lang - HASH: %s" % hash) html = self.load('http://www.hellshare.com/%s/' % hash, req=req) if re.search(self.CREDIT_LEFT_PATTERN, html): - self.logDebug("Already logged in") + self.log_debug("Already logged in") return html = self.load('https://www.hellshare.com/login?do=loginForm-submit', @@ -75,4 +75,4 @@ class HellshareCz(Account): "perm_login": "on"}, req=req) if "

You input a wrong user name or wrong password

" in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/HighWayMe.py b/module/plugins/accounts/HighWayMe.py index d85db9769..f6baaa0a1 100644 --- a/module/plugins/accounts/HighWayMe.py +++ b/module/plugins/accounts/HighWayMe.py @@ -7,21 +7,21 @@ from module.plugins.internal.Account import Account class HighWayMe(Account): __name__ = "HighWayMe.py" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __description__ = """High-Way.me account plugin""" __license__ = "GPLv3" __authors__ = [("EvolutionClip", "evolutionclip@live.de")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): premium = False validuntil = -1 trafficleft = None json_data = self.load('https://high-way.me/api.php?user', req=req) - self.logDebug("JSON data: %s" % json_data) + self.log_debug("JSON data: %s" % json_data) json_data = json_loads(json_data) @@ -44,4 +44,4 @@ class HighWayMe(Account): post={'login': '1', 'user': user, 'pass': data['password']}, req=req) if 'UserOrPassInvalid' in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/Http.py b/module/plugins/accounts/Http.py index 2f12e56d9..369deade4 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.02" + __version__ = "0.03" __description__ = """Http dummy account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/HugefilesNet.py b/module/plugins/accounts/HugefilesNet.py index 5da3bbc37..9fd7b319b 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.02" + __version__ = "0.03" __description__ = """Hugefiles.net account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/HundredEightyUploadCom.py b/module/plugins/accounts/HundredEightyUploadCom.py index 319a3feee..f8dcd2252 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.03" + __version__ = "0.04" __description__ = """180upload.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/JunkyvideoCom.py b/module/plugins/accounts/JunkyvideoCom.py index 8275ff176..f4c12affb 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.01" + __version__ = "0.02" __description__ = """Junkyvideo.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/JunocloudMe.py b/module/plugins/accounts/JunocloudMe.py index b0fc160f3..a72b1a634 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.02" + __version__ = "0.03" __description__ = """Junocloud.me account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/Keep2ShareCc.py b/module/plugins/accounts/Keep2ShareCc.py index 617e18f25..71c099bea 100644 --- a/module/plugins/accounts/Keep2ShareCc.py +++ b/module/plugins/accounts/Keep2ShareCc.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class Keep2ShareCc(Account): __name__ = "Keep2ShareCc" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __description__ = """Keep2Share.cc account plugin""" __license__ = "GPLv3" @@ -23,7 +23,7 @@ class Keep2ShareCc(Account): LOGIN_FAIL_PATTERN = r'Please fix the following input errors' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): validuntil = None trafficleft = -1 premium = False @@ -33,7 +33,7 @@ class Keep2ShareCc(Account): m = re.search(self.VALID_UNTIL_PATTERN, html) if m: expiredate = m.group(1).strip() - self.logDebug("Expire date: " + expiredate) + self.log_debug("Expire date: " + expiredate) if expiredate == "LifeTime": premium = True @@ -43,7 +43,7 @@ class Keep2ShareCc(Account): validuntil = time.mktime(time.strptime(expiredate, "%Y.%m.%d")) except Exception, e: - self.logError(e) + self.log_error(e) else: premium = True if validuntil > time.mktime(time.gmtime()) else False @@ -51,10 +51,10 @@ class Keep2ShareCc(Account): m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: try: - trafficleft = self.parseTraffic(m.group(1)) + trafficleft = self.parse_traffic(m.group(1)) except Exception, e: - self.logError(e) + self.log_error(e) return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} @@ -69,4 +69,4 @@ class Keep2ShareCc(Account): 'yt0' : ""}, req=req) if re.search(self.LOGIN_FAIL_PATTERN, html): - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 811abd971..6b8fcf960 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -7,23 +7,23 @@ from module.plugins.internal.Account import Account class LetitbitNet(Account): __name__ = "LetitbitNet" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __description__ = """Letitbit.net account plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## - # api_key = self.getAccountData(user)['password'] + # api_key = self.get_account_data(user)['password'] # json_data = [api_key, ['key/info']] # api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}, req=req) - # self.logDebug("API Key Info: " + api_rep) + # self.log_debug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # # if api_rep['status'] == 'FAIL': - # self.logWarning(api_rep['data']) + # self.log_warning(api_rep['data']) # return {'valid': False, 'premium': False} return {"premium": True} @@ -31,4 +31,4 @@ class LetitbitNet(Account): def login(self, user, data, req): #: API_KEY is the username and the PREMIUM_KEY is the password - self.logInfo(_("You must use your API KEY as username and the PREMIUM KEY as password")) + self.log_info(_("You must use your API KEY as username and the PREMIUM KEY as password")) diff --git a/module/plugins/accounts/LinestorageCom.py b/module/plugins/accounts/LinestorageCom.py index a48d5beb9..6f6f21c4f 100644 --- a/module/plugins/accounts/LinestorageCom.py +++ b/module/plugins/accounts/LinestorageCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class LinestorageCom(XFSAccount): __name__ = "LinestorageCom" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __description__ = """Linestorage.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/LinksnappyCom.py b/module/plugins/accounts/LinksnappyCom.py index 4a475bd24..466495ac0 100644 --- a/module/plugins/accounts/LinksnappyCom.py +++ b/module/plugins/accounts/LinksnappyCom.py @@ -9,19 +9,19 @@ from module.common.json_layer import json_loads class LinksnappyCom(Account): __name__ = "LinksnappyCom" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __description__ = """Linksnappy.com account plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) + def load_account_info(self, user, req): + data = self.get_account_data(user) r = self.load('http://gen.linksnappy.com/lseAPI.php', get={'act': 'USERDETAILS', 'username': user, 'password': hashlib.md5(data['password'], req=req).hexdigest()}) - self.logDebug("JSON data: " + r) + self.log_debug("JSON data: " + r) j = json_loads(r) @@ -42,7 +42,7 @@ class LinksnappyCom(Account): if 'trafficleft' not in j['return'] or isinstance(j['return']['trafficleft'], str): trafficleft = -1 else: - trafficleft = self.parseTraffic("%d MB" % j['return']['trafficleft']) + trafficleft = self.parse_traffic("%d MB" % j['return']['trafficleft']) return {'premium' : True , 'validuntil' : validuntil , @@ -56,4 +56,4 @@ class LinksnappyCom(Account): 'password': hashlib.md5(data['password'], req=req).hexdigest()}) if "Invalid Account Details" in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 53c67833c..7a6e36f05 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class MegaDebridEu(Account): __name__ = "MegaDebridEu" __type__ = "account" - __version__ = "0.21" + __version__ = "0.22" __description__ = """Mega-debrid.eu account plugin""" __license__ = "GPLv3" @@ -18,8 +18,8 @@ class MegaDebridEu(Account): API_URL = "https://www.mega-debrid.eu/api.php" - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) + def load_account_info(self, user, req): + data = self.get_account_data(user) jsonResponse = self.load(self.API_URL, get={'action': 'connectUser', 'login': user, 'password': data['password']}, req=req) res = json_loads(jsonResponse) @@ -27,7 +27,7 @@ class MegaDebridEu(Account): if res['response_code'] == "ok": return {"premium": True, "validuntil": float(res['vip_end']), "status": True} else: - self.logError(res) + self.log_error(res) return {"status": False, "premium": False} @@ -36,4 +36,4 @@ class MegaDebridEu(Account): get={'action': 'connectUser', 'login': user, 'password': data['password']}, req=req) res = json_loads(jsonResponse) if res['response_code'] != "ok": - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/MegaRapidCz.py b/module/plugins/accounts/MegaRapidCz.py index af23b7bf3..c8650ed8e 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.36" + __version__ = "0.37" __description__ = """MegaRapid.cz account plugin""" __license__ = "GPLv3" @@ -24,12 +24,12 @@ class MegaRapidCz(Account): TRAFFIC_LEFT_PATTERN = r'\s*' - def handleFree(self, pyfile): + def handle_free(self, pyfile): params = {} for _i in xrange(3): m = re.search(self.LINK_FREE_PATTERN, self.html) if m: if 'captcha_hash' in params: - self.correctCaptcha() + self.correct_captcha() self.link = m.group(1) break m = re.search(self.CAPTCHA_PATTERN, self.html) if m: if 'captcha_hash' in params: - self.invalidCaptcha() + self.invalid_captcha() captcha_url1 = "http://www.sendspace.com/" + m.group(1) m = re.search(self.USER_CAPTCHA_PATTERN, self.html) captcha_url2 = "http://www.sendspace.com/" + m.group(1) params = {'captcha_hash': m.group(2), 'captcha_submit': 'Verify', - 'captcha_answer': self.decryptCaptcha(captcha_url1) + " " + self.decryptCaptcha(captcha_url2)} + 'captcha_answer': self.decrypt_captcha(captcha_url1) + " " + self.decrypt_captcha(captcha_url2)} else: params = {'download': "Regular Download"} - self.logDebug(params) + self.log_debug(params) self.html = self.load(pyfile.url, post=params) else: self.fail(_("Download link not found")) diff --git a/module/plugins/hoster/Share4WebCom.py b/module/plugins/hoster/Share4WebCom.py index 7a276c1fe..5d9c8ea97 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.11" + __version__ = "0.12" __pattern__ = r'https?://(?:www\.)?share4web\.com/get/\w+' diff --git a/module/plugins/hoster/Share76Com.py b/module/plugins/hoster/Share76Com.py index 4a4af1672..510adaf49 100644 --- a/module/plugins/hoster/Share76Com.py +++ b/module/plugins/hoster/Share76Com.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class Share76Com(DeadHoster): __name__ = "Share76Com" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __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 d9a71d786..288cd08e4 100644 --- a/module/plugins/hoster/ShareFilesCo.py +++ b/module/plugins/hoster/ShareFilesCo.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class ShareFilesCo(DeadHoster): __name__ = "ShareFilesCo" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 9387483cc..c0846d23c 100644 --- a/module/plugins/hoster/SharebeesCom.py +++ b/module/plugins/hoster/SharebeesCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class SharebeesCom(DeadHoster): __name__ = "SharebeesCom" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 47b6ba7da..2134ec7e6 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ShareonlineBiz(SimpleHoster): __name__ = "ShareonlineBiz" __type__ = "hoster" - __version__ = "0.53" + __version__ = "0.54" __pattern__ = r'https?://(?:www\.)?(share-online\.biz|egoshare\.com)/(download\.php\?id=|dl/)(?P\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -36,8 +36,8 @@ class ShareonlineBiz(SimpleHoster): @classmethod - def apiInfo(cls, url): - info = super(ShareonlineBiz, cls).apiInfo(url) + def api_info(cls, url): + info = super(ShareonlineBiz, cls).api_info(url) field = getURL("http://api.share-online.biz/linkcheck.php", get={'md5' : "1", @@ -61,42 +61,42 @@ class ShareonlineBiz(SimpleHoster): def setup(self): - self.resumeDownload = self.premium - self.multiDL = False + self.resume_download = self.premium + self.multi_dl = False - def handleCaptcha(self): + def handle_captcha(self): recaptcha = ReCaptcha(self) for _i in xrange(5): response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) m = re.search(r'var wait=(\d+);', self.html) - self.setWait(int(m.group(1)) if m else 30) + self.set_wait(int(m.group(1)) if m else 30) res = self.load("%s/free/captcha/%d" % (self.pyfile.url, int(time.time() * 1000)), post={'dl_free' : "1", 'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) if not res == '0': - self.correctCaptcha() + self.correct_captcha() return res else: - self.invalidCaptcha() + self.invalid_captcha() else: - self.invalidCaptcha() + self.invalid_captcha() self.fail(_("No valid captcha solution received")) - def handleFree(self, pyfile): + def handle_free(self, pyfile): self.wait(3) self.html = self.load("%s/free/" % pyfile.url, post={'dl_free': "1", 'choice': "free"}) - self.checkErrors() + self.check_errors() - res = self.handleCaptcha() + res = self.handle_captcha() self.link = res.decode('base64') if not self.link.startswith("http://"): @@ -105,22 +105,22 @@ class ShareonlineBiz(SimpleHoster): self.wait() - def checkFile(self): - check = self.checkDownload({'cookie': re.compile(r'
Share-Online")}) if check == "cookie": - self.invalidCaptcha() + self.invalid_captcha() self.retry(5, 60, _("Cookie failure")) elif check == "fail": - self.invalidCaptcha() + self.invalid_captcha() self.retry(5, 5 * 60, _("Download failed")) return super(ShareonlineBiz, self).checkFile() - def handlePremium(self, pyfile): #: should be working better loading (account) api internally + def handle_premium(self, pyfile): #: should be working better loading (account) api internally html = self.load("http://api.share-online.biz/account.php", get={'username': self.user, 'password': self.account.getAccountData(self.user)['password'], @@ -133,7 +133,7 @@ class ShareonlineBiz(SimpleHoster): key, value = line.split(": ") dlinfo[key.lower()] = value - self.logDebug(dlinfo) + self.log_debug(dlinfo) if not dlinfo['status'] == "online": self.offline() @@ -144,12 +144,12 @@ class ShareonlineBiz(SimpleHoster): self.link = dlinfo['url'] if self.link == "server_under_maintenance": - self.tempOffline() + self.temp_offline() else: - self.multiDL = True + self.multi_dl = True - def checkErrors(self): + def check_errors(self): m = re.search(r"/failure/(.*?)/1", self.req.lastEffectiveURL) if m is None: self.info.pop('error', None) @@ -158,9 +158,9 @@ class ShareonlineBiz(SimpleHoster): errmsg = m.group(1).lower() try: - self.logError(errmsg, re.search(self.ERROR_PATTERN, self.html).group(1)) + self.log_error(errmsg, re.search(self.ERROR_PATTERN, self.html).group(1)) except Exception: - self.logError("Unknown error occurred", errmsg) + self.log_error("Unknown error occurred", errmsg) if errmsg is "invalid": self.fail(_("File not available")) @@ -172,11 +172,11 @@ class ShareonlineBiz(SimpleHoster): self.retry(wait_time=600, reason=errmsg) elif 'slot' in errmsg: - self.wantReconnect = True + self.want_reconnect = True self.retry(24, 3600, errmsg) else: - self.wantReconnect = True + self.want_reconnect = True self.retry(wait_time=60, reason=errmsg) diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py index 815f54c79..d917e3f35 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.13" + __version__ = "0.14" __pattern__ = r'http://(?:www\.)?shareplace\.(com|org)/\?\w+' @@ -31,7 +31,7 @@ class ShareplaceCom(Hoster): self.pyfile.name = self.get_file_name() wait_time = self.get_waiting_time() - self.setWait(wait_time) + self.set_wait(wait_time) self.wait() @@ -64,7 +64,7 @@ class ShareplaceCom(Hoster): url = urllib.unquote( url.replace("http://http:/", "").replace("vvvvvvvvv", "").replace("lllllllll", "").replace( "teletubbies", "")) - self.logDebug("URL: %s" % url) + self.log_debug("URL: %s" % url) return url else: self.error(_("Absolute filepath not found")) diff --git a/module/plugins/hoster/SharingmatrixCom.py b/module/plugins/hoster/SharingmatrixCom.py index 3958ebbd6..5f52849bb 100644 --- a/module/plugins/hoster/SharingmatrixCom.py +++ b/module/plugins/hoster/SharingmatrixCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class SharingmatrixCom(DeadHoster): __name__ = "SharingmatrixCom" __type__ = "hoster" - __version__ = "0.01" + __version__ = "0.02" __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 689223322..d98ee08ff 100644 --- a/module/plugins/hoster/ShragleCom.py +++ b/module/plugins/hoster/ShragleCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class ShragleCom(DeadHoster): __name__ = "ShragleCom" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __pattern__ = r'http://(?:www\.)?(cloudnator|shragle)\.com/files/(?P.+?)/' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 8ea121199..f726b0bf9 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -3,13 +3,13 @@ import re from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.SimpleHoster import secondsToMidnight +from module.plugins.internal.SimpleHoster import seconds_to_midnight class SimplyPremiumCom(MultiHoster): __name__ = "SimplyPremiumCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'https?://.+simply-premium\.com' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -21,10 +21,10 @@ class SimplyPremiumCom(MultiHoster): def setup(self): - self.chunkLimit = 16 + self.chunk_limit = 16 - def checkErrors(self): + def check_errors(self): if '0' in self.html or ( "You are not allowed to download from this host" in self.html and self.premium): self.account.relogin(self.user) @@ -34,30 +34,30 @@ class SimplyPremiumCom(MultiHoster): self.offline() elif "downloadlimit" in self.html: - self.logWarning(_("Reached maximum connctions")) + self.log_warning(_("Reached maximum connctions")) self.retry(5, 60, _("Reached maximum connctions")) elif "trafficlimit" in self.html: - self.logWarning(_("Reached daily limit for this host")) - self.retry(wait_time=secondsToMidnight(gmt=2), reason="Daily limit for this host reached") + self.log_warning(_("Reached daily limit for this host")) + self.retry(wait_time=seconds_to_midnight(gmt=2), reason="Daily limit for this host reached") elif "hostererror" in self.html: - self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) + self.log_warning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) self.retry(5, 60, _("Hoster is temporarily unavailable")) - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): for i in xrange(5): self.html = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': self.pyfile.url}) if self.html: - self.logDebug("JSON data: " + self.html) + self.log_debug("JSON data: " + self.html) break else: - self.logInfo(_("Unable to get API data, waiting 1 minute and retry")) + self.log_info(_("Unable to get API data, waiting 1 minute and retry")) self.retry(5, 60, _("Unable to get API data")) - self.checkErrors() + self.check_errors() try: self.pyfile.name = re.search(r'([^<]+)', self.html).group(1) diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 5e06bed88..d054a3c54 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.19" + __version__ = "0.20" __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -19,8 +19,8 @@ class SimplydebridCom(MultiHoster): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def handlePremium(self, pyfile): - #fix the links for simply-debrid.com! + def handle_premium(self, pyfile): + # fix the links for simply-debrid.com! self.link = replace_patterns(pyfile.url, [("clz.to", "cloudzer.net/file") ("http://share-online", "http://www.share-online") ("ul.to", "uploaded.net/file") @@ -40,8 +40,8 @@ class SimplydebridCom(MultiHoster): self.wait(5) - def checkFile(self): - if self.checkDownload({"error": "No address associated with hostname"}): + def check_file(self): + if self.check_download({"error": "No address associated with hostname"}): self.retry(24, 3 * 60, _("Bad file downloaded")) return super(SimplydebridCom, self).checkFile() diff --git a/module/plugins/hoster/SizedriveCom.py b/module/plugins/hoster/SizedriveCom.py index 4c5aedb6d..15007695d 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.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?sizedrive\.com/[rd]/(?P\w+)' @@ -23,12 +23,12 @@ class SizedriveCom(SimpleHoster): def setup(self): - self.resumeDownload = False - self.multiDL = False - self.chunkLimit = 1 + self.resume_download = False + self.multi_dl = False + self.chunk_limit = 1 - def handleFree(self, pyfile): + def handle_free(self, pyfile): self.wait(5) self.html = self.load("http://www.sizedrive.com/getdownload.php", post={'id': self.info['pattern']['ID']}) diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 9b62314ad..31b5dd4d7 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -22,7 +22,7 @@ class SmoozedCom(MultiHoster): ("Retry", r'{"state":"retry"}')] - def handleFree(self, pyfile): + def handle_free(self, pyfile): #: In some cases hostsers do not supply us with a filename at download, so we #: are going to set a fall back filename (e.g. for freakshare or xfileshare) pyfile.name = pyfile.name.split('/').pop() #: Remove everthing before last slash diff --git a/module/plugins/hoster/SockshareCom.py b/module/plugins/hoster/SockshareCom.py index 44eedf9d4..16f702f15 100644 --- a/module/plugins/hoster/SockshareCom.py +++ b/module/plugins/hoster/SockshareCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class SockshareCom(DeadHoster): __name__ = "SockshareCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?sockshare\.com/(mobile/)?(file|embed)/(?P\w+)' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/hoster/SolidfilesCom.py b/module/plugins/hoster/SolidfilesCom.py index 184329a40..fc2f2741a 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.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?solidfiles\.com\/d/\w+' @@ -26,8 +26,8 @@ class SolidfilesCom(SimpleHoster): def setup(self): - self.multiDL = True - self.chunkLimit = 1 + self.multi_dl = True + self.chunk_limit = 1 getInfo = create_getInfo(SolidfilesCom) diff --git a/module/plugins/hoster/SoundcloudCom.py b/module/plugins/hoster/SoundcloudCom.py index 2b041bb94..97d5223be 100644 --- a/module/plugins/hoster/SoundcloudCom.py +++ b/module/plugins/hoster/SoundcloudCom.py @@ -9,7 +9,7 @@ from module.common.json_layer import json_loads class SoundcloudCom(SimpleHoster): __name__ = "SoundcloudCom" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'https?://(?:www\.)?soundcloud\.com/[\w-]+/[\w-]+' __config__ = [("use_premium", "bool" , "Use premium account if available", True ), @@ -24,7 +24,7 @@ class SoundcloudCom(SimpleHoster): OFFLINE_PATTERN = r'"SoundCloud - Hear the world’s sounds"' - def handleFree(self, pyfile): + def handle_free(self, pyfile): try: song_id = re.search(r'sounds:(\d+)"', self.html).group(1) @@ -46,10 +46,10 @@ class SoundcloudCom(SimpleHoster): key=lambda t: regex.sub(t[0], ''), reverse=True) - self.logDebug("Streams found: %s" % (http_streams or "None")) + self.log_debug("Streams found: %s" % (http_streams or "None")) if http_streams: - stream_name, self.link = http_streams[0 if self.getConfig('quality') == "Higher" else -1] + stream_name, self.link = http_streams[0 if self.get_config('quality') == "Higher" else -1] pyfile.name += '.' + stream_name.split('_')[1].lower() diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py index 18f04b611..97997517b 100644 --- a/module/plugins/hoster/SpeedLoadOrg.py +++ b/module/plugins/hoster/SpeedLoadOrg.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class SpeedLoadOrg(DeadHoster): __name__ = "SpeedLoadOrg" __type__ = "hoster" - __version__ = "1.02" + __version__ = "1.03" __pattern__ = r'http://(?:www\.)?speedload\.org/(?P\w+)' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/hoster/SpeedfileCz.py b/module/plugins/hoster/SpeedfileCz.py index cd6d65082..9f5da3c47 100644 --- a/module/plugins/hoster/SpeedfileCz.py +++ b/module/plugins/hoster/SpeedfileCz.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class SpeedfileCz(DeadHoster): __name__ = "SpeedFileCz" __type__ = "hoster" - __version__ = "0.32" + __version__ = "0.33" __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 91788b2c8..4a9edb966 100644 --- a/module/plugins/hoster/SpeedyshareCom.py +++ b/module/plugins/hoster/SpeedyshareCom.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class SpeedyshareCom(SimpleHoster): __name__ = "SpeedyshareCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'https?://(?:www\.)?(speedyshare\.com|speedy\.sh)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -31,11 +31,11 @@ class SpeedyshareCom(SimpleHoster): def setup(self): - self.multiDL = False - self.chunkLimit = 1 + self.multi_dl = False + self.chunk_limit = 1 - def handleFree(self, pyfile): + def handle_free(self, pyfile): m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: self.link = m.group(1) diff --git a/module/plugins/hoster/StorageTo.py b/module/plugins/hoster/StorageTo.py index feb9f3300..fc23916a6 100644 --- a/module/plugins/hoster/StorageTo.py +++ b/module/plugins/hoster/StorageTo.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class StorageTo(DeadHoster): __name__ = "StorageTo" __type__ = "hoster" - __version__ = "0.01" + __version__ = "0.02" __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 24b725722..e2ae0ab83 100644 --- a/module/plugins/hoster/StreamCz.py +++ b/module/plugins/hoster/StreamCz.py @@ -6,7 +6,7 @@ from module.network.RequestFactory import getURL from module.plugins.internal.Hoster import Hoster -def getInfo(urls): +def get_info(urls): result = [] for url in urls: @@ -23,7 +23,7 @@ def getInfo(urls): class StreamCz(Hoster): __name__ = "StreamCz" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" __pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/\d+' @@ -39,8 +39,8 @@ class StreamCz(Hoster): def setup(self): - self.resumeDownload = True - self.multiDL = True + self.resume_download = True + self.multi_dl = True def process(self, pyfile): @@ -53,7 +53,7 @@ class StreamCz(Hoster): if m is None: self.error(_("CDN_PATTERN not found")) cdn = m.groupdict() - self.logDebug(cdn) + self.log_debug(cdn) for cdnkey in ("cdnHD", "cdnHQ", "cdnLQ"): if cdnkey in cdn and cdn[cdnkey] > '': cdnid = cdn[cdnkey] @@ -67,5 +67,5 @@ class StreamCz(Hoster): pyfile.name = "%s-%s.%s.mp4" % (m.group(2), m.group(1), cdnkey[-2:]) download_url = "http://cdn-dispatcher.stream.cz/?id=" + cdnid - self.logInfo(_("STREAM: %s") % cdnkey[-2:], download_url) + self.log_info(_("STREAM: %s") % cdnkey[-2:], download_url) self.download(download_url) diff --git a/module/plugins/hoster/StreamcloudEu.py b/module/plugins/hoster/StreamcloudEu.py index 0f8c08ad9..943beadb5 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.10" + __version__ = "0.11" __pattern__ = r'http://(?:www\.)?streamcloud\.eu/\w{12}' @@ -21,9 +21,9 @@ class StreamcloudEu(XFSHoster): def setup(self): - self.multiDL = True - self.chunkLimit = 1 - self.resumeDownload = self.premium + self.multi_dl = True + self.chunk_limit = 1 + self.resume_download = self.premium getInfo = create_getInfo(StreamcloudEu) diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index efff6521a..e4ff000b2 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -17,7 +17,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, t class TurbobitNet(SimpleHoster): __name__ = "TurbobitNet" __type__ = "hoster" - __version__ = "0.20" + __version__ = "0.21" __pattern__ = r'http://(?:www\.)?turbobit\.net/(?:download/free/)?(?P\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -42,16 +42,16 @@ class TurbobitNet(SimpleHoster): CAPTCHA_PATTERN = r'Captcha 60) self.retry() - action, inputs = self.parseHtmlForm("action='#'") + action, inputs = self.parse_html_form("action='#'") if not inputs: self.error(_("Captcha form not found")) - self.logDebug(inputs) + self.log_debug(inputs) if inputs['captcha_type'] == 'recaptcha': recaptcha = ReCaptcha(self) @@ -81,25 +81,25 @@ class TurbobitNet(SimpleHoster): if m is None: self.error(_("captcha")) captcha_url = m.group(1) - inputs['captcha_response'] = self.decryptCaptcha(captcha_url) + inputs['captcha_response'] = self.decrypt_captcha(captcha_url) - self.logDebug(inputs) + self.log_debug(inputs) self.html = self.load(self.url, post=inputs) if '
Incorrect, try again!<' in self.html: - self.invalidCaptcha() + self.invalid_captcha() else: - self.correctCaptcha() + self.correct_captcha() break else: self.fail(_("Invalid captcha")) - def getRtUpdate(self): - rtUpdate = self.getStorage("rtUpdate") + def get_rt_update(self): + rtUpdate = self.retrieve("rtUpdate") if not rtUpdate: - if self.getStorage("version") != self.__version__ \ - or int(self.getStorage("timestamp", 0)) + 86400000 < timestamp(): + if self.retrieve("version") != self.__version__ \ + or int(self.retrieve("timestamp", 0)) + 86400000 < timestamp(): #: that's right, we are even using jdownloader updates rtUpdate = getURL("http://update0.jdownloader.org/pluginstuff/tbupdate.js") rtUpdate = self.decrypt(rtUpdate.splitlines()[1]) @@ -108,17 +108,17 @@ class TurbobitNet(SimpleHoster): r'zza=\2;for(var zzi=0;zzi]+)", self.html) @@ -129,7 +129,7 @@ class TurbobitNet(SimpleHoster): fun = self.load(url) - self.setWait(65, False) + self.set_wait(65, False) for b in [1, 3]: self.jscode = "var id = \'%s\';var b = %d;var inn = \'%s\';%sout" % ( @@ -137,16 +137,16 @@ class TurbobitNet(SimpleHoster): try: out = self.js.eval(self.jscode) - self.logDebug("URL", self.js.engine, out) + self.log_debug("URL", self.js.engine, out) if out.startswith('/download/'): return "http://turbobit.net%s" % out.strip() except Exception, e: - self.logError(e) + self.log_error(e) else: if self.retries >= 2: #: retry with updated js - self.delStorage("rtUpdate") + self.delete("rtUpdate") else: self.retry() @@ -158,7 +158,7 @@ class TurbobitNet(SimpleHoster): return binascii.unhexlify(cipher.encrypt(binascii.unhexlify(data))) - def getLocalTimeString(self): + def get_local_time_string(self): lt = time.localtime() tz = time.altzone if lt.tm_isdst else time.timezone return "%s GMT%+03d%02d" % (time.strftime("%a %b %d %Y %H:%M:%S", lt), -tz // 3600, tz % 3600) diff --git a/module/plugins/hoster/TurbouploadCom.py b/module/plugins/hoster/TurbouploadCom.py index e4b53b818..79b6ac2a5 100644 --- a/module/plugins/hoster/TurbouploadCom.py +++ b/module/plugins/hoster/TurbouploadCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class TurbouploadCom(DeadHoster): __name__ = "TurbouploadCom" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __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 3afd1da97..5a99aad72 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.11" + __version__ = "0.12" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/\w{12}' @@ -22,9 +22,9 @@ class TusfilesNet(XFSHoster): def setup(self): - self.chunkLimit = -1 - self.multiDL = True - self.resumeDownload = True + self.chunk_limit = -1 + self.multi_dl = True + self.resume_download = True def download(self, url, *args, **kwargs): @@ -33,7 +33,7 @@ class TusfilesNet(XFSHoster): except BadHeader, e: if e.code is 503: - self.multiDL = False + self.multi_dl = False raise Retry("503") diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index 086228637..72c78ec4f 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.13" + __version__ = "0.14" __pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -26,8 +26,8 @@ class TwoSharedCom(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = True + self.resume_download = True + self.multi_dl = True getInfo = create_getInfo(TwoSharedCom) diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 6a2836b50..f60549813 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -def convertDecimalPrefix(m): +def convert_decimal_prefix(m): #: decimal prefixes used in filesize and traffic return ("%%.%df" % {'k': 3, 'M': 6, 'G': 9}[m.group(2)] % float(m.group(1))).replace('.', '') @@ -15,7 +15,7 @@ def convertDecimalPrefix(m): class UlozTo(SimpleHoster): __name__ = "UlozTo" __type__ = "hoster" - __version__ = "1.10" + __version__ = "1.11" __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P\w+/[^/?]*)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -43,37 +43,37 @@ class UlozTo(SimpleHoster): def setup(self): - self.chunkLimit = 16 if self.premium else 1 - self.multiDL = True - self.resumeDownload = True + self.chunk_limit = 16 if self.premium else 1 + self.multi_dl = True + self.resume_download = True - def handleFree(self, pyfile): - action, inputs = self.parseHtmlForm('id="frm-downloadDialog-freeDownloadForm"') + def handle_free(self, pyfile): + action, inputs = self.parse_html_form('id="frm-downloadDialog-freeDownloadForm"') if not action or not inputs: self.error(_("Free download form not found")) - self.logDebug("inputs.keys = " + str(inputs.keys())) + self.log_debug("inputs.keys = " + str(inputs.keys())) #: get and decrypt captcha if all(key in inputs for key in ("captcha_value", "captcha_id", "captcha_key")): #: Old version - last seen 9.12.2013 - self.logDebug('Using "old" version') + self.log_debug('Using "old" version') - captcha_value = self.decryptCaptcha("http://img.uloz.to/captcha/%s.png" % inputs['captcha_id']) - self.logDebug("CAPTCHA ID: " + inputs['captcha_id'] + ", CAPTCHA VALUE: " + captcha_value) + captcha_value = self.decrypt_captcha("http://img.uloz.to/captcha/%s.png" % inputs['captcha_id']) + self.log_debug("CAPTCHA ID: " + inputs['captcha_id'] + ", CAPTCHA VALUE: " + captcha_value) inputs.update({'captcha_id': inputs['captcha_id'], 'captcha_key': inputs['captcha_key'], 'captcha_value': captcha_value}) elif all(key in inputs for key in ("captcha_value", "timestamp", "salt", "hash")): #: New version - better to get new parameters (like captcha reload) because of image url - since 6.12.2013 - self.logDebug('Using "new" version') + self.log_debug('Using "new" version') xapca = self.load("http://www.ulozto.net/reloadXapca.php", get={'rnd': str(int(time.time()))}) - self.logDebug("xapca = " + str(xapca)) + self.log_debug("xapca = " + str(xapca)) data = json_loads(xapca) - captcha_value = self.decryptCaptcha(str(data['image'])) - self.logDebug("CAPTCHA HASH: " + data['hash'], "CAPTCHA SALT: " + str(data['salt']), "CAPTCHA VALUE: " + captcha_value) + captcha_value = self.decrypt_captcha(str(data['image'])) + self.log_debug("CAPTCHA HASH: " + data['hash'], "CAPTCHA SALT: " + str(data['salt']), "CAPTCHA VALUE: " + captcha_value) inputs.update({'timestamp': data['timestamp'], 'salt': data['salt'], 'hash': data['hash'], 'captcha_value': captcha_value}) @@ -83,13 +83,13 @@ class UlozTo(SimpleHoster): self.download("http://www.ulozto.net" + action, post=inputs) - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): self.download(pyfile.url, get={'do': "directDownload"}) - def checkErrors(self): + def check_errors(self): if re.search(self.ADULT_PATTERN, self.html): - self.logInfo(_("Adult content confirmation needed")) + self.log_info(_("Adult content confirmation needed")) m = re.search(self.TOKEN_PATTERN, self.html) if m is None: @@ -100,10 +100,10 @@ class UlozTo(SimpleHoster): post={"agree": "Confirm", "_token_": m.group(1)}) if self.PASSWD_PATTERN in self.html: - password = self.getPassword() + password = self.get_password() if password: - self.logInfo(_("Password protected link, trying ") + password) + self.log_info(_("Password protected link, trying ") + password) self.html = self.load(pyfile.url, get={'do': "passwordProtectedForm-submit"}, post={"password": password, "password_send": 'Send'}) @@ -119,8 +119,8 @@ class UlozTo(SimpleHoster): return super(UlozTo, self).checkErrors() - def checkFile(self): - check = self.checkDownload({ + def check_file(self): + check = self.check_download({ "wrong_captcha": re.compile(r'
(\d+|\d\d\.\d\d\.)
Kredit(.*?) GiB' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): htmll = self.load("http://megarapid.cz/mujucet/", req=req) m = re.search(self.LIMITDL_PATTERN, htmll) if m: - data = self.getAccountData(user) + data = self.get_account_data(user) data['options']['limitDL'] = [int(m.group(1))] m = re.search(self.VALID_UNTIL_PATTERN, htmll) diff --git a/module/plugins/accounts/MegaRapidoNet.py b/module/plugins/accounts/MegaRapidoNet.py index de1c775c7..ddb7e090a 100644 --- a/module/plugins/accounts/MegaRapidoNet.py +++ b/module/plugins/accounts/MegaRapidoNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class MegaRapidoNet(Account): __name__ = "MegaRapidoNet" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __description__ = """MegaRapido.net account plugin""" __license__ = "GPLv3" @@ -20,7 +20,7 @@ class MegaRapidoNet(Account): USER_ID_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?["\']checkbox_compartilhar["\'].*?>.*?<\s*?input[^>]*?name\s*?=\s*?["\']usar["\'].*?>.*?<\s*?input[^>]*?name\s*?=\s*?["\']user["\'][^>]*?value\s*?=\s*?["\'](.*?)\s*?["\']' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): validuntil = None trafficleft = None premium = False @@ -29,7 +29,7 @@ class MegaRapidoNet(Account): validuntil = re.search(self.VALID_UNTIL_PATTERN, html) if validuntil: - #hier weitermachen!!! (müssen umbedingt die zeit richtig machen damit! (sollte aber möglich)) + # hier weitermachen!!! (müssen umbedingt die zeit richtig machen damit! (sollte aber möglich)) validuntil = time.time() + int(validuntil.group(1)) * 24 * 3600 + int(validuntil.group(2)) * 3600 + int(validuntil.group(3)) * 60 + int(validuntil.group(4)) trafficleft = -1 premium = True @@ -47,7 +47,7 @@ class MegaRapidoNet(Account): html = self.load("http://megarapido.net/gerador", req=req) if "sair" not in html.lower(): - self.wrongPassword() + self.wrong_password() else: m = re.search(self.USER_ID_PATTERN, html) if m: diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py index af0987ed3..3aa26692c 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.04" + __version__ = "0.05" __description__ = """Megashares.com account plugin""" __license__ = "GPLv3" @@ -19,8 +19,8 @@ class MegasharesCom(Account): VALID_UNTIL_PATTERN = r'

Period Ends: (\w{3} \d{1,2}, \d{4})

' - def loadAccountInfo(self, user, req): - #self.relogin(user) + def load_account_info(self, user, req): + # self.relogin(user) html = self.load("http://d01.megashares.com/myms.php", req=req) premium = False if '>Premium Upgrade<' in html else True @@ -28,10 +28,10 @@ class MegasharesCom(Account): validuntil = trafficleft = -1 try: timestr = re.search(self.VALID_UNTIL_PATTERN, html).group(1) - self.logDebug(timestr) + self.log_debug(timestr) validuntil = time.mktime(time.strptime(timestr, "%b %d, %Y")) except Exception, e: - self.logError(e) + self.log_error(e) return {"validuntil": validuntil, "trafficleft": -1, "premium": premium} @@ -44,4 +44,4 @@ class MegasharesCom(Account): "mymspassword" : data['password']}, req=req) if not '%s' % user in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/MovReelCom.py b/module/plugins/accounts/MovReelCom.py index 6128cddc8..885204615 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.03" + __version__ = "0.04" __description__ = """Movreel.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/MultihostersCom.py b/module/plugins/accounts/MultihostersCom.py index e98f17b2d..65c6ea778 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.03" + __version__ = "0.04" __description__ = """Multihosters.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py index be947f7f2..ddb605ac7 100644 --- a/module/plugins/accounts/MultishareCz.py +++ b/module/plugins/accounts/MultishareCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account class MultishareCz(Account): __name__ = "MultishareCz" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __description__ = """Multishare.cz account plugin""" __license__ = "GPLv3" @@ -19,12 +19,12 @@ class MultishareCz(Account): ACCOUNT_INFO_PATTERN = r'' - def loadAccountInfo(self, user, req): - #self.relogin(user) + def load_account_info(self, user, req): + # self.relogin(user) html = self.load("http://www.multishare.cz/profil/", req=req) m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - trafficleft = self.parseTraffic(m.group('S') + m.group('U')) if m else 0 + trafficleft = self.parse_traffic(m.group('S') + m.group('U')) if m else 0 self.premium = True if trafficleft else False html = self.load("http://www.multishare.cz/", req=req) @@ -40,4 +40,4 @@ class MultishareCz(Account): "jmeno": user}, req=req) if '
' in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 258c99346..aa2dde191 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -9,19 +9,19 @@ from module.plugins.internal.Account import Account class MyfastfileCom(Account): __name__ = "MyfastfileCom" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __description__ = """Myfastfile.com account plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): if 'days_left' in self.json_data: validuntil = time.time() + self.json_data['days_left'] * 24 * 60 * 60 return {"premium": True, "validuntil": validuntil, "trafficleft": -1} else: - self.logError(_("Unable to get account information")) + self.log_error(_("Unable to get account information")) def login(self, user, data, req): @@ -29,9 +29,9 @@ class MyfastfileCom(Account): html = self.load("https://myfastfile.com/api.php", get={"user": user, "pass": data['password']}, req=req) - self.logDebug("JSON data: " + html) + self.log_debug("JSON data: " + html) self.json_data = json_loads(html) if self.json_data['status'] != 'ok': - self.logError(_('Invalid login. The password to use is the API-Password you find in your "My Account" page')) - self.wrongPassword() + self.log_error(_('Invalid login. The password to use is the API-Password you find in your "My Account" page')) + self.wrong_password() diff --git a/module/plugins/accounts/NitroflareCom.py b/module/plugins/accounts/NitroflareCom.py index cc2f4e232..c17f0b8b4 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.05" + __version__ = "0.06" __description__ = """Nitroflare.com account plugin""" __license__ = "GPLv3" @@ -23,7 +23,7 @@ class NitroflareCom(Account): TOKEN_PATTERN = r'name="token" value="(.+?)"' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): validuntil = -1 trafficleft = None premium = False @@ -34,16 +34,16 @@ class NitroflareCom(Account): m = re.search(self.VALID_UNTIL_PATTERN, html) if m: expiredate = m.group(1).strip() - self.logDebug("Time Left: " + expiredate) + self.log_debug("Time Left: " + expiredate) try: validuntil = sum(int(v) * {'day': 24 * 3600, 'hour': 3600, 'minute': 60}[u.lower()] for v, u in re.findall(r'(\d+)\s*(day|hour|minute)', expiredate, re.I)) except Exception, e: - self.logError(e) + self.log_error(e) else: - self.logDebug("Valid until: %s" % validuntil) + self.log_debug("Valid until: %s" % validuntil) if validuntil: validuntil += time.time() @@ -54,12 +54,12 @@ class NitroflareCom(Account): m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: try: - trafficleft = self.parseTraffic(str(max(0, 50 - float(m.group(1)))) + " GB") + trafficleft = self.parse_traffic(str(max(0, 50 - float(m.group(1)))) + " GB") except Exception, e: - self.logError(e) + self.log_error(e) else: - self.logDebug("TRAFFIC_LEFT_PATTERN not found") + self.log_debug("TRAFFIC_LEFT_PATTERN not found") return {'validuntil' : validuntil, 'trafficleft': trafficleft, @@ -78,4 +78,4 @@ class NitroflareCom(Account): 'token' : token}, req=req) if re.search(self.LOGIN_FAIL_PATTERN, html): - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py index 01060250b..6f82f3c97 100644 --- a/module/plugins/accounts/NoPremiumPl.py +++ b/module/plugins/accounts/NoPremiumPl.py @@ -11,7 +11,7 @@ from module.plugins.internal.Account import Account class NoPremiumPl(Account): __name__ = "NoPremiumPl" __type__ = "account" - __version__ = "0.02" + __version__ = "0.03" __description__ = "NoPremium.pl account plugin" __license__ = "GPLv3" @@ -31,10 +31,10 @@ class NoPremiumPl(Account): _pwd = None - def loadAccountInfo(self, name, req): + def load_account_info(self, name, req): self._req = req try: - result = json_loads(self.runAuthQuery()) + result = json_loads(self.run_auth_query()) except Exception: #@TODO: return or let it be thrown? return @@ -59,23 +59,23 @@ class NoPremiumPl(Account): self._req = req try: - response = json_loads(self.runAuthQuery()) + response = json_loads(self.run_auth_query()) except Exception: - self.wrongPassword() + self.wrong_password() if "errno" in response.keys(): - self.wrongPassword() + self.wrong_password() data['usr'] = self._usr data['pwd'] = self._pwd - def createAuthQuery(self): + def create_auth_query(self): query = self.API_QUERY query['username'] = self._usr query['password'] = self._pwd return query - def runAuthQuery(self): - return self._self.load(self.API_URL, post=self.createAuthQuery(), req=req) + def run_auth_query(self): + return self._self.load(self.API_URL, post=self.create_auth_query(), req=req) diff --git a/module/plugins/accounts/NosuploadCom.py b/module/plugins/accounts/NosuploadCom.py index e523ee2f4..9fb1a6484 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.02" + __version__ = "0.03" __description__ = """Nosupload.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/NovafileCom.py b/module/plugins/accounts/NovafileCom.py index ab61bf0fc..077312c9d 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.02" + __version__ = "0.03" __description__ = """Novafile.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/NowVideoSx.py b/module/plugins/accounts/NowVideoSx.py index 81267d413..e679367d6 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.04" + __version__ = "0.05" __description__ = """NowVideo.at account plugin""" __license__ = "GPLv3" @@ -19,7 +19,7 @@ class NowVideoSx(Account): VALID_UNTIL_PATTERN = r'>Your premium membership expires on: (.+?)<' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): validuntil = None trafficleft = -1 premium = None @@ -29,13 +29,13 @@ class NowVideoSx(Account): m = re.search(self.VALID_UNTIL_PATTERN, html) if m: expiredate = m.group(1).strip() - self.logDebug("Expire date: " + expiredate) + self.log_debug("Expire date: " + expiredate) try: validuntil = time.mktime(time.strptime(expiredate, "%Y-%b-%d")) except Exception, e: - self.logError(e) + self.log_error(e) else: if validuntil > time.mktime(time.gmtime()): @@ -52,4 +52,4 @@ class NowVideoSx(Account): post={'user': user, 'pass': data['password']}, req=req) if re.search(r'>Log In<', html): - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/OboomCom.py b/module/plugins/accounts/OboomCom.py index 96ef51f1e..958613e9e 100644 --- a/module/plugins/accounts/OboomCom.py +++ b/module/plugins/accounts/OboomCom.py @@ -23,31 +23,31 @@ from module.plugins.internal.Account import Account class OboomCom(Account): __name__ = "OboomCom" __type__ = "account" - __version__ = "0.25" + __version__ = "0.26" __description__ = """Oboom.com account plugin""" __license__ = "GPLv3" __authors__ = [("stanley", "stanley.foerster@gmail.com")] - def loadAccountData(self, user, req): - passwd = self.getAccountData(user)['password'] + def load_account_data(self, user, req): + passwd = self.get_account_data(user)['password'] salt = passwd[::-1] pbkdf2 = PBKDF2(passwd, salt, 1000).hexread(16) result = json_loads(self.load("https://www.oboom.com/1/login", get={"auth": user, "pass": pbkdf2}), req=req) if not result[0] == 200: - self.logWarning(_("Failed to log in: %s") % result[1]) - self.wrongPassword() + self.log_warning(_("Failed to log in: %s") % result[1]) + self.wrong_password() return result[1] - def loadAccountInfo(self, name, req): - accountData = self.loadAccountData(name, req) + def load_account_info(self, name, req): + account_data = self.load_account_data(name, req) - userData = accountData['user'] + userData = account_data['user'] if userData['premium'] == "null": premium = False @@ -64,7 +64,7 @@ class OboomCom(Account): trafficLeft = traffic['current'] / 1024 #@TODO: Remove `/ 1024` in 0.4.10 maxTraffic = traffic['max'] / 1024 #@TODO: Remove `/ 1024` in 0.4.10 - session = accountData['session'] + session = account_data['session'] return {'premium' : premium, 'validuntil' : validUntil, @@ -74,4 +74,4 @@ class OboomCom(Account): def login(self, user, data, req): - self.loadAccountData(user, req) + self.load_account_data(user, req) diff --git a/module/plugins/accounts/OneFichierCom.py b/module/plugins/accounts/OneFichierCom.py index 3a345bd9f..12be92c3e 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.13" + __version__ = "0.14" __description__ = """1fichier.com account plugin""" __license__ = "GPLv3" @@ -21,7 +21,7 @@ class OneFichierCom(Account): VALID_UNTIL_PATTERN = r'Your Premium Status will end the (\d+/\d+/\d+)' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): validuntil = None trafficleft = -1 premium = None @@ -31,12 +31,12 @@ class OneFichierCom(Account): m = re.search(self.VALID_UNTIL_PATTERN, html) if m: expiredate = m.group(1) - self.logDebug("Expire date: " + expiredate) + self.log_debug("Expire date: " + expiredate) try: validuntil = time.mktime(time.strptime(expiredate, "%d/%m/%Y")) except Exception, e: - self.logError(e) + self.log_error(e) else: premium = True @@ -54,4 +54,4 @@ class OneFichierCom(Account): 'valider': "Send"}, req=req) if '>Invalid email address' in html or '>Invalid password' in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 898c122cd..d47a579f2 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -7,21 +7,21 @@ from module.common.json_layer import json_loads class OverLoadMe(Account): __name__ = "OverLoadMe" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __description__ = """Over-Load.me account plugin""" __license__ = "GPLv3" __authors__ = [("marley", "marley@over-load.me")] - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) + def load_account_info(self, user, req): + data = self.get_account_data(user) html = self.load("https://api.over-load.me/account.php", get={'user': user, 'auth': data['password']}, req=req).strip() data = json_loads(html) - self.logDebug(data) + self.log_debug(data) #: Check for premium if data['membership'] == "Free": @@ -38,4 +38,4 @@ class OverLoadMe(Account): data = json_loads(jsondata) if data['err'] == 1: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/PremiumTo.py b/module/plugins/accounts/PremiumTo.py index fb99cfd59..639ea1529 100644 --- a/module/plugins/accounts/PremiumTo.py +++ b/module/plugins/accounts/PremiumTo.py @@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account class PremiumTo(Account): __name__ = "PremiumTo" __type__ = "account" - __version__ = "0.10" + __version__ = "0.11" __description__ = """Premium.to account plugin""" __license__ = "GPLv3" @@ -15,7 +15,7 @@ class PremiumTo(Account): ("stickell", "l.stickell@yahoo.it")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): traffic = self.load("http://premium.to/api/straffic.php", #@TODO: Revert to `https` in 0.4.10 get={'username': self.username, 'password': self.password}, req=req) @@ -33,4 +33,4 @@ class PremiumTo(Account): get={'username': user, 'password': self.password}, req=req) if "wrong username" in authcode: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index d7f0b7391..a2a6c139c 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -7,17 +7,17 @@ from module.plugins.internal.Account import Account class PremiumizeMe(Account): __name__ = "PremiumizeMe" __type__ = "account" - __version__ = "0.18" + __version__ = "0.19" __description__ = """Premiumize.me account plugin""" __license__ = "GPLv3" __authors__ = [("Florian Franzen", "FlorianFranzen@gmail.com")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): #: Get user data from premiumize.me - status = self.getAccountStatus(user, req) - self.logDebug(status) + status = self.get_account_status(user, req) + self.log_debug(status) #: Parse account info account_info = {"validuntil": float(status['result']['expires']), @@ -31,18 +31,18 @@ class PremiumizeMe(Account): def login(self, user, data, req): #: Get user data from premiumize.me - status = self.getAccountStatus(user, req) + status = self.get_account_status(user, req) #: Check if user and password are valid if status['status'] != 200: - self.wrongPassword() + self.wrong_password() - def getAccountStatus(self, user, req): + def get_account_status(self, user, req): #: Use premiumize.me API v1 (see https://secure.premiumize.me/?show=api) #: to retrieve account info and return the parsed json answer answer = self.load("http://api.premiumize.me/pm-api/v1.php", #@TODO: Revert to `https` in 0.4.10 get={'method' : "accountstatus", 'params[login]': user, - 'params[pass]' : self.getAccountData(user)['password']}) + 'params[pass]' : self.get_account_data(user)['password']}) return json_loads(answer) diff --git a/module/plugins/accounts/PutdriveCom.py b/module/plugins/accounts/PutdriveCom.py index 4f2fadbcc..61f59fd75 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.02" + __version__ = "0.03" __description__ = """Putdrive.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/QuickshareCz.py b/module/plugins/accounts/QuickshareCz.py index c3cfe6f6f..17d3bfce8 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.04" + __version__ = "0.05" __description__ = """Quickshare.cz account plugin""" __license__ = "GPLv3" @@ -18,12 +18,12 @@ class QuickshareCz(Account): TRAFFIC_LEFT_PATTERN = r'Stav kreditu: (.+?)' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): html = self.load("http://www.quickshare.cz/premium", req=req) m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: - trafficleft = self.parseTraffic(m.group(1)) + trafficleft = self.parse_traffic(m.group(1)) premium = True if trafficleft else False else: trafficleft = None @@ -39,4 +39,4 @@ class QuickshareCz(Account): "jmeno": user}, req=req) if u'>Takový uživatel neexistuje.<' in html or u'>Špatné heslo.<' in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py index be456f2d7..d103e918d 100644 --- a/module/plugins/accounts/RPNetBiz.py +++ b/module/plugins/accounts/RPNetBiz.py @@ -7,16 +7,16 @@ from module.common.json_layer import json_loads class RPNetBiz(Account): __name__ = "RPNetBiz" __type__ = "account" - __version__ = "0.13" + __version__ = "0.14" __description__ = """RPNet.biz account plugin""" __license__ = "GPLv3" __authors__ = [("Dman", "dmanugm@gmail.com")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): #: Get account information from rpnet.biz - res = self.getAccountStatus(user, req) + res = self.get_account_status(user, req) try: if res['accountInfo']['isPremium']: #: Parse account info. Change the trafficleft later to support per host info. @@ -26,7 +26,7 @@ class RPNetBiz(Account): account_info = {"validuntil": None, "trafficleft": None, "premium": False} except KeyError: - #handle wrong password exception + # handle wrong password exception account_info = {"validuntil": None, "trafficleft": None, "premium": False} return account_info @@ -34,18 +34,18 @@ class RPNetBiz(Account): def login(self, user, data, req): #: Get account information from rpnet.biz - res = self.getAccountStatus(user, req) + res = self.get_account_status(user, req) #: If we have an error in the res, we have wrong login information if 'error' in res: - self.wrongPassword() + self.wrong_password() - def getAccountStatus(self, user, req): + def get_account_status(self, user, req): #: Using the rpnet API, check if valid premium account res = self.load("https://premium.rpnet.biz/client_api.php", - get={"username": user, "password": self.getAccountData(user)['password'], + get={"username": user, "password": self.get_account_data(user)['password'], "action": "showAccountInformation"}) - self.logDebug("JSON data: %s" % res) + self.log_debug("JSON data: %s" % res) return json_loads(res) diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py index f5ce2e2b1..1f4140846 100644 --- a/module/plugins/accounts/RapideoPl.py +++ b/module/plugins/accounts/RapideoPl.py @@ -11,7 +11,7 @@ from module.plugins.internal.Account import Account class RapideoPl(Account): __name__ = "RapideoPl" __type__ = "account" - __version__ = "0.02" + __version__ = "0.03" __description__ = "Rapideo.pl account plugin" __license__ = "GPLv3" @@ -31,10 +31,10 @@ class RapideoPl(Account): _pwd = None - def loadAccountInfo(self, name, req): + def load_account_info(self, name, req): self._req = req try: - result = json_loads(self.runAuthQuery()) + result = json_loads(self.run_auth_query()) except Exception: #@TODO: return or let it be thrown? return @@ -59,23 +59,23 @@ class RapideoPl(Account): self._req = req try: - response = json_loads(self.runAuthQuery()) + response = json_loads(self.run_auth_query()) except Exception: - self.wrongPassword() + self.wrong_password() if "errno" in response.keys(): - self.wrongPassword() + self.wrong_password() data['usr'] = self._usr data['pwd'] = self._pwd - def createAuthQuery(self): + def create_auth_query(self): query = self.API_QUERY query['username'] = self._usr query['password'] = self._pwd return query - def runAuthQuery(self): - return self._self.load(self.API_URL, post=self.createAuthQuery(), req=req) + def run_auth_query(self): + return self._self.load(self.API_URL, post=self.create_auth_query(), req=req) diff --git a/module/plugins/accounts/RapidfileshareNet.py b/module/plugins/accounts/RapidfileshareNet.py index c0dd7eaee..8758e799b 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.05" + __version__ = "0.06" __description__ = """Rapidfileshare.net account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index c14490dd5..c17765e12 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class RapidgatorNet(Account): __name__ = "RapidgatorNet" __type__ = "account" - __version__ = "0.10" + __version__ = "0.11" __description__ = """Rapidgator.net account plugin""" __license__ = "GPLv3" @@ -17,34 +17,34 @@ class RapidgatorNet(Account): API_URL = "http://rapidgator.net/api/user" - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): validuntil = None trafficleft = None premium = False sid = None try: - sid = self.getAccountData(user).get('sid', None) + sid = self.get_account_data(user).get('sid', None) assert sid html = self.load("%s/info" % self.API_URL, get={'sid': sid}, req=req) - self.logDebug("API:USERINFO", html) + self.log_debug("API:USERINFO", html) json = json_loads(html) if json['response_status'] == 200: if "reset_in" in json['response']: - self.scheduleRefresh(user, json['response']['reset_in']) + self.schedule_refresh(user, json['response']['reset_in']) validuntil = json['response']['expire_date'] trafficleft = float(json['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10 premium = True else: - self.logError(json['response_details']) + self.log_error(json['response_details']) except Exception, e: - self.logError(e) + self.log_error(e) return {'validuntil' : validuntil, 'trafficleft': trafficleft, @@ -56,7 +56,7 @@ class RapidgatorNet(Account): try: html = self.load('%s/login' % self.API_URL, post={"username": user, "password": data['password']}, req=req) - self.logDebug("API:LOGIN", html) + self.log_debug("API:LOGIN", html) json = json_loads(html) @@ -64,9 +64,9 @@ class RapidgatorNet(Account): data['sid'] = str(json['response']['session_id']) return else: - self.logError(json['response_details']) + self.log_error(json['response_details']) except Exception, e: - self.logError(e) + self.log_error(e) - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py index 5e74e18bb..256b612a1 100644 --- a/module/plugins/accounts/RapiduNet.py +++ b/module/plugins/accounts/RapiduNet.py @@ -10,7 +10,7 @@ from module.common.json_layer import json_loads class RapiduNet(Account): __name__ = "RapiduNet" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __description__ = """Rapidu.net account plugin""" __license__ = "GPLv3" @@ -25,7 +25,7 @@ class RapiduNet(Account): TRAFFIC_LEFT_PATTERN = r'class="tipsyS">(.+?)<' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): validuntil = None trafficleft = -1 premium = False @@ -41,7 +41,7 @@ class RapiduNet(Account): m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: - trafficleft = self.parseTraffic(m.group(1)) + trafficleft = self.parse_traffic(m.group(1)) return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} @@ -59,7 +59,7 @@ class RapiduNet(Account): 'pass' : data['password'], 'remember': "1"}, req=req)) - self.logDebug(json) + self.log_debug(json) if not json['message'] == "success": - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/RarefileNet.py b/module/plugins/accounts/RarefileNet.py index 577a6c8f6..e8be7925b 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.04" + __version__ = "0.05" __description__ = """RareFile.net account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py index 83fdc5dbc..f16ebed27 100644 --- a/module/plugins/accounts/RealdebridCom.py +++ b/module/plugins/accounts/RealdebridCom.py @@ -8,14 +8,14 @@ from module.plugins.internal.Account import Account class RealdebridCom(Account): __name__ = "RealdebridCom" __type__ = "account" - __version__ = "0.47" + __version__ = "0.48" __description__ = """Real-Debrid.com account plugin""" __license__ = "GPLv3" __authors__ = [("Devirex Hazzard", "naibaf_11@yahoo.de")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): if self.pin_code: return @@ -36,8 +36,8 @@ class RealdebridCom(Account): get={"user": user, "pass": data['password']}, req=req) if "Your login informations are incorrect" in html: - self.wrongPassword() + self.wrong_password() elif "PIN Code required" in html: - self.logWarning(_("PIN code required. Please login to https://real-debrid.com using the PIN or disable the double authentication in your control panel on https://real-debrid.com")) + self.log_warning(_("PIN code required. Please login to https://real-debrid.com using the PIN or disable the double authentication in your control panel on https://real-debrid.com")) self.pin_code = True diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index 5f0c1253e..43c0cb029 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -6,14 +6,14 @@ from module.plugins.internal.Account import Account class RehostTo(Account): __name__ = "RehostTo" __type__ = "account" - __version__ = "0.17" + __version__ = "0.18" __description__ = """Rehost.to account plugin""" __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): premium = False trafficleft = None validuntil = -1 @@ -21,7 +21,7 @@ class RehostTo(Account): html = self.load("https://rehost.to/api.php", get={'cmd' : "login", 'user': user, - 'pass': self.getAccountData(user)['password']}) + 'pass': self.get_account_data(user)['password']}) try: session = html.split(",")[1].split("=")[1] @@ -29,12 +29,12 @@ class RehostTo(Account): get={'cmd': "get_premium_credits", 'long_ses': session}, req=req) if html.strip() == "0,0" or "ERROR" in html: - self.logDebug(html) + self.log_debug(html) else: traffic, valid = html.split(",") premium = True - trafficleft = self.parseTraffic(traffic + "MB") + trafficleft = self.parse_traffic(traffic + "MB") validuntil = float(valid) finally: @@ -49,5 +49,5 @@ class RehostTo(Account): get={'cmd': "login", 'user': user, 'pass': data['password']}, req=req) if "ERROR" in html: - self.logDebug(html) - self.wrongPassword() + self.log_debug(html) + self.wrong_password() diff --git a/module/plugins/accounts/RyushareCom.py b/module/plugins/accounts/RyushareCom.py index 8c56ff20f..de627a8f7 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.06" + __version__ = "0.07" __description__ = """Ryushare.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/SafesharingEu.py b/module/plugins/accounts/SafesharingEu.py index 2e58d33b3..a42c06ac6 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.02" + __version__ = "0.03" __description__ = """Safesharing.eu account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/SecureUploadEu.py b/module/plugins/accounts/SecureUploadEu.py index b335c94da..3686e07e2 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.02" + __version__ = "0.03" __description__ = """SecureUpload.eu account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/SendmywayCom.py b/module/plugins/accounts/SendmywayCom.py index 4fcbe0b7a..eb5c3b033 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.02" + __version__ = "0.03" __description__ = """Sendmyway.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/SharebeastCom.py b/module/plugins/accounts/SharebeastCom.py index d233ffd37..68b76fda8 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.01" + __version__ = "0.02" __description__ = """Sharebeast.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 5a3359496..56c1d08f2 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account class ShareonlineBiz(Account): __name__ = "ShareonlineBiz" __type__ = "account" - __version__ = "0.34" + __version__ = "0.35" __description__ = """Share-online.biz account plugin""" __license__ = "GPLv3" @@ -20,10 +20,10 @@ class ShareonlineBiz(Account): get={'q' : "userdetails", 'aux' : "traffic", 'username': user, - 'password': self.getAccountData(user)['password']}) + 'password': self.get_account_data(user)['password']}) - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): premium = False validuntil = None trafficleft = -1 @@ -35,7 +35,7 @@ class ShareonlineBiz(Account): key, value = line.split("=") api[key] = value - self.logDebug(api) + self.log_debug(api) if api['a'].lower() != "not_available": req.cj.setCookie("share-online.biz", 'a', api['a']) @@ -64,5 +64,5 @@ class ShareonlineBiz(Account): html = self.api_response(user, req) err = re.search(r'\*\*(.+?)\*\*', html) if err: - self.logError(err.group(1).strip()) - self.wrongPassword() + self.log_error(err.group(1).strip()) + self.wrong_password() diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index 053f2c33b..e030a7dd8 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -7,21 +7,21 @@ from module.plugins.internal.Account import Account class SimplyPremiumCom(Account): __name__ = "SimplyPremiumCom" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __description__ = """Simply-Premium.com account plugin""" __license__ = "GPLv3" __authors__ = [("EvolutionClip", "evolutionclip@live.de")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): premium = False validuntil = -1 trafficleft = None json_data = self.load('http://www.simply-premium.com/api/user.php?format=json', req=req) - self.logDebug("JSON data: %s" % json_data) + self.log_debug("JSON data: %s" % json_data) json_data = json_loads(json_data) @@ -44,4 +44,4 @@ class SimplyPremiumCom(Account): post={'key': user} if not data['password'] else {'login_name': user, 'login_pass': data['password']}, req=req) if 'logout' not in html: - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index e9fda682b..14e33e827 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -8,14 +8,14 @@ from module.plugins.internal.Account import Account class SimplydebridCom(Account): __name__ = "SimplydebridCom" __type__ = "account" - __version__ = "0.12" + __version__ = "0.13" __description__ = """Simply-Debrid.com account plugin""" __license__ = "GPLv3" __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): get_data = {'login': 2, 'u': self.loginname, 'p': self.password} res = self.load("http://simply-debrid.com/api.php", get=get_data, req=req) data = [x.strip() for x in res.split(";")] @@ -32,4 +32,4 @@ class SimplydebridCom(Account): res = self.load("https://simply-debrid.com/api.php", get=get_data, req=req) if res != "02: loggin success": - self.wrongPassword() + self.wrong_password() diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 0b0d7ed74..853963c4a 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -26,17 +26,17 @@ from module.plugins.internal.Account import Account class SmoozedCom(Account): __name__ = "SmoozedCom" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __description__ = """Smoozed.com account plugin""" __license__ = "GPLv3" __authors__ = [("", "")] - def loadAccountInfo(self, user, req): - status = self.getAccountStatus(user, req) + def load_account_info(self, user, req): + status = self.get_account_status(user, req) - self.logDebug(status) + self.log_debug(status) if status['state'] != 'ok': info = {'validuntil' : None, @@ -62,15 +62,15 @@ class SmoozedCom(Account): def login(self, user, data, req): #: Get user data from premiumize.me - status = self.getAccountStatus(user, req) + status = self.get_account_status(user, req) #: Check if user and password are valid if status['state'] != 'ok': - self.wrongPassword() + self.wrong_password() - def getAccountStatus(self, user, req): - password = self.getAccountData(user)['password'] + def get_account_status(self, user, req): + password = self.get_account_data(user)['password'] salt = hashlib.sha256(password).hexdigest() encrypted = PBKDF2(password, salt, iterations=1000).hexread(32) diff --git a/module/plugins/accounts/StreamcloudEu.py b/module/plugins/accounts/StreamcloudEu.py index aa1eafcbd..46b1e97de 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.02" + __version__ = "0.03" __description__ = """Streamcloud.eu account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/TurbobitNet.py b/module/plugins/accounts/TurbobitNet.py index 7e3bd628f..518ed66f8 100644 --- a/module/plugins/accounts/TurbobitNet.py +++ b/module/plugins/accounts/TurbobitNet.py @@ -9,14 +9,14 @@ from module.plugins.internal.Account import Account class TurbobitNet(Account): __name__ = "TurbobitNet" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __description__ = """TurbobitNet account plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): html = self.load("http://turbobit.net", req=req) m = re.search(r'Turbo Access to ([\d.]+)', html) @@ -39,4 +39,4 @@ class TurbobitNet(Account): "user[submit]": "Login"}, req=req) if not '
[^>]*?alt="OK"' - def getHosters(self): + def get_hosters(self): html = self.load("http://www.multishare.cz/monitoring/") return re.findall(self.HOSTER_PATTERN, html) diff --git a/module/plugins/hooks/MyfastfileComHook.py b/module/plugins/hooks/MyfastfileComHook.py index 5ba44f89e..f1e5d669d 100644 --- a/module/plugins/hooks/MyfastfileComHook.py +++ b/module/plugins/hooks/MyfastfileComHook.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook class MyfastfileComHook(MultiHook): __name__ = "MyfastfileComHook" __type__ = "hook" - __version__ = "0.05" + __version__ = "0.06" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -19,9 +19,9 @@ class MyfastfileComHook(MultiHook): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def getHosters(self): + def get_hosters(self): json_data = self.load("http://myfastfile.com/api.php", get={'hosts': ""}) - self.logDebug("JSON data", json_data) + self.log_debug("JSON data", json_data) json_data = json_loads(json_data) return json_data['hosts'] diff --git a/module/plugins/hooks/NoPremiumPlHook.py b/module/plugins/hooks/NoPremiumPlHook.py index 3c7cc8d9d..1b011e6f8 100644 --- a/module/plugins/hooks/NoPremiumPlHook.py +++ b/module/plugins/hooks/NoPremiumPlHook.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook class NoPremiumPlHook(MultiHook): __name__ = "NoPremiumPlHook" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -19,10 +19,10 @@ class NoPremiumPlHook(MultiHook): __authors__ = [("goddie", "dev@nopremium.pl")] - def getHosters(self): + def get_hosters(self): 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.logDebug(hostings_domains) + self.log_debug(hostings_domains) return hostings_domains diff --git a/module/plugins/hooks/OverLoadMeHook.py b/module/plugins/hooks/OverLoadMeHook.py index 39401000d..611285818 100644 --- a/module/plugins/hooks/OverLoadMeHook.py +++ b/module/plugins/hooks/OverLoadMeHook.py @@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook class OverLoadMeHook(MultiHook): __name__ = "OverLoadMeHook" __type__ = "hook" - __version__ = "0.04" + __version__ = "0.05" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -18,7 +18,7 @@ class OverLoadMeHook(MultiHook): __authors__ = [("marley", "marley@over-load.me")] - def getHosters(self): + def get_hosters(self): html = self.load("https://api.over-load.me/hoster.php", get={'auth': "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}).replace("\"", "").strip() return [x.strip() for x in html.split(",") if x.strip()] diff --git a/module/plugins/hooks/PremiumToHook.py b/module/plugins/hooks/PremiumToHook.py index 1c15bf11a..dd85cb903 100644 --- a/module/plugins/hooks/PremiumToHook.py +++ b/module/plugins/hooks/PremiumToHook.py @@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook class PremiumToHook(MultiHook): __name__ = "PremiumToHook" __type__ = "hook" - __version__ = "0.09" + __version__ = "0.10" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -20,7 +20,7 @@ class PremiumToHook(MultiHook): ("stickell", "l.stickell@yahoo.it")] - def getHosters(self): + def get_hosters(self): user, data = self.account.selectAccount() html = self.load("http://premium.to/api/hosters.php", get={'username': user, 'password': data['password']}) diff --git a/module/plugins/hooks/PremiumizeMeHook.py b/module/plugins/hooks/PremiumizeMeHook.py index 1f38d374e..24d091454 100644 --- a/module/plugins/hooks/PremiumizeMeHook.py +++ b/module/plugins/hooks/PremiumizeMeHook.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook class PremiumizeMeHook(MultiHook): __name__ = "PremiumizeMeHook" __type__ = "hook" - __version__ = "0.18" + __version__ = "0.19" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -19,7 +19,7 @@ class PremiumizeMeHook(MultiHook): __authors__ = [("Florian Franzen", "FlorianFranzen@gmail.com")] - def getHosters(self): + def get_hosters(self): #: Get account data user, data = self.account.selectAccount() diff --git a/module/plugins/hooks/PutdriveComHook.py b/module/plugins/hooks/PutdriveComHook.py index 931e5f565..2c5310dbf 100644 --- a/module/plugins/hooks/PutdriveComHook.py +++ b/module/plugins/hooks/PutdriveComHook.py @@ -6,7 +6,7 @@ from module.plugins.hooks.ZeveraComHook import ZeveraComHook class PutdriveComHook(ZeveraComHook): __name__ = "PutdriveComHook" __type__ = "hook" - __version__ = "0.01" + __version__ = "0.02" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), diff --git a/module/plugins/hooks/RPNetBizHook.py b/module/plugins/hooks/RPNetBizHook.py index a19ed7228..be472af26 100644 --- a/module/plugins/hooks/RPNetBizHook.py +++ b/module/plugins/hooks/RPNetBizHook.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook class RPNetBizHook(MultiHook): __name__ = "RPNetBizHook" __type__ = "hook" - __version__ = "0.14" + __version__ = "0.15" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -19,7 +19,7 @@ class RPNetBizHook(MultiHook): __authors__ = [("Dman", "dmanugm@gmail.com")] - def getHosters(self): + def get_hosters(self): #: Get account data user, data = self.account.selectAccount() diff --git a/module/plugins/hooks/RapideoPlHook.py b/module/plugins/hooks/RapideoPlHook.py index 861f9e10d..adbe55f12 100644 --- a/module/plugins/hooks/RapideoPlHook.py +++ b/module/plugins/hooks/RapideoPlHook.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook class RapideoPlHook(MultiHook): __name__ = "RapideoPlHook" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -19,10 +19,10 @@ class RapideoPlHook(MultiHook): __authors__ = [("goddie", "dev@rapideo.pl")] - def getHosters(self): + def get_hosters(self): 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.logDebug(hostings_domains) + self.log_debug(hostings_domains) return hostings_domains diff --git a/module/plugins/hooks/RealdebridComHook.py b/module/plugins/hooks/RealdebridComHook.py index a1783ce84..da66249b6 100644 --- a/module/plugins/hooks/RealdebridComHook.py +++ b/module/plugins/hooks/RealdebridComHook.py @@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook class RealdebridComHook(MultiHook): __name__ = "RealdebridComHook" __type__ = "hook" - __version__ = "0.46" + __version__ = "0.47" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -18,6 +18,6 @@ class RealdebridComHook(MultiHook): __authors__ = [("Devirex Hazzard", "naibaf_11@yahoo.de")] - def getHosters(self): + def get_hosters(self): html = self.load("https://real-debrid.com/api/hosters.php").replace("\"", "").strip() return [x.strip() for x in html.split(",") if x.strip()] diff --git a/module/plugins/hooks/RehostToHook.py b/module/plugins/hooks/RehostToHook.py index 7c51823ca..016377e15 100644 --- a/module/plugins/hooks/RehostToHook.py +++ b/module/plugins/hooks/RehostToHook.py @@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook class RehostToHook(MultiHook): __name__ = "RehostToHook" __type__ = "hook" - __version__ = "0.50" + __version__ = "0.51" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -18,7 +18,7 @@ class RehostToHook(MultiHook): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def getHosters(self): + def get_hosters(self): user, data = self.account.selectAccount() html = self.load("http://rehost.to/api.php", get={'cmd' : "get_supported_och_dl", diff --git a/module/plugins/hooks/RestartFailed.py b/module/plugins/hooks/RestartFailed.py index 0c74a544a..e19705d31 100644 --- a/module/plugins/hooks/RestartFailed.py +++ b/module/plugins/hooks/RestartFailed.py @@ -6,7 +6,7 @@ from module.plugins.internal.Hook import Hook class RestartFailed(Hook): __name__ = "RestartFailed" __type__ = "hook" - __version__ = "1.59" + __version__ = "1.60" __config__ = [("interval", "int", "Check interval in minutes", 90)] @@ -18,28 +18,28 @@ class RestartFailed(Hook): MIN_CHECK_INTERVAL = 15 * 60 #: 15 minutes - #: def pluginConfigChanged(self, plugin, name, value): - #: if name == "interval": - #: interval = value * 60 - #: if self.MIN_CHECK_INTERVAL <= interval != self.interval: - #: self.core.scheduler.removeJob(self.cb) - #: self.interval = interval - #: self.init_periodical() - #: else: - #: self.logDebug("Invalid interval value, kept current") + # def plugin_config_changed(self, plugin, name, value): + # if name == "interval": + # interval = value * 60 + # if self.MIN_CHECK_INTERVAL <= interval != self.interval: + # self.core.scheduler.removeJob(self.cb) + # self.interval = interval + # self.init_periodical() + # else: + # self.log_debug("Invalid interval value, kept current") def periodical(self): - self.logDebug("Restart failed downloads") + self.log_debug("Restart failed downloads") self.core.api.restartFailed() def setup(self): self.info = {} #@TODO: Remove in 0.4.10 - #: self.event_list = ["pluginConfigChanged"] + # self.event_map = {'pluginConfigChanged': "plugin_config_changed"} self.interval = self.MIN_CHECK_INTERVAL def activate(self): - #: self.pluginConfigChanged(self.__name__, "interval", self.getConfig('interval')) - self.interval = max(self.MIN_CHECK_INTERVAL, self.getConfig('interval') * 60) + #: self.plugin_config_changed(self.__name__, "interval", self.get_config('interval')) + self.interval = max(self.MIN_CHECK_INTERVAL, self.get_config('interval') * 60) diff --git a/module/plugins/hooks/SimplyPremiumComHook.py b/module/plugins/hooks/SimplyPremiumComHook.py index db331283d..e522df8b5 100644 --- a/module/plugins/hooks/SimplyPremiumComHook.py +++ b/module/plugins/hooks/SimplyPremiumComHook.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook class SimplyPremiumComHook(MultiHook): __name__ = "SimplyPremiumComHook" __type__ = "hook" - __version__ = "0.05" + __version__ = "0.06" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -19,7 +19,7 @@ class SimplyPremiumComHook(MultiHook): __authors__ = [("EvolutionClip", "evolutionclip@live.de")] - def getHosters(self): + def get_hosters(self): json_data = self.load("http://www.simply-premium.com/api/hosts.php", get={'format': "json", 'online': 1}) json_data = json_loads(json_data) diff --git a/module/plugins/hooks/SimplydebridComHook.py b/module/plugins/hooks/SimplydebridComHook.py index 9e29a0c9f..228df2af4 100644 --- a/module/plugins/hooks/SimplydebridComHook.py +++ b/module/plugins/hooks/SimplydebridComHook.py @@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook class SimplydebridComHook(MultiHook): __name__ = "SimplydebridComHook" __type__ = "hook" - __version__ = "0.04" + __version__ = "0.05" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -18,6 +18,6 @@ class SimplydebridComHook(MultiHook): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def getHosters(self): + def get_hosters(self): html = self.load("http://simply-debrid.com/api.php", get={'list': 1}) return [x.strip() for x in html.rstrip(';').replace("\"", "").split(";")] diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py index 503833d53..8fd49889c 100644 --- a/module/plugins/hooks/SkipRev.py +++ b/module/plugins/hooks/SkipRev.py @@ -13,7 +13,7 @@ from module.plugins.internal.Hook import Hook class SkipRev(Hook): __name__ = "SkipRev" __type__ = "hook" - __version__ = "0.31" + __version__ = "0.32" __config__ = [("mode" , "Auto;Manual", "Choose recovery archives to skip" , "Auto"), ("revtokeep", "int" , "Number of recovery archives to keep for package", 0 )] @@ -39,9 +39,9 @@ class SkipRev(Hook): def _name(self, pyfile): if hasattr(pyfile.pluginmodule, "getInfo"): #@NOTE: getInfo is deprecated in 0.4.10 - return pyfile.pluginmodule.getInfo([pyfile.url]).next()[0] + return pyfile.pluginmodule.get_info([pyfile.url]).next()[0] else: - self.logWarning("Unable to grab file name") + self.log_warning("Unable to grab file name") return urlparse.urlparse(urllib.unquote(pyfile.url)).path.split('/')[-1] @@ -64,7 +64,7 @@ class SkipRev(Hook): if pyfile.statusname is _("unskipped") or not name.endswith(".rev") or not ".part" in name: return - revtokeep = -1 if self.getConfig('mode') == "Auto" else self.getConfig('revtokeep') + revtokeep = -1 if self.get_config('mode') == "Auto" else self.get_config('revtokeep') if revtokeep: status_list = (1, 4, 8, 9, 14) if revtokeep < 0 else (1, 3, 4, 8, 9, 14) @@ -89,7 +89,7 @@ class SkipRev(Hook): if pyfile.status != 8 or pyfile.name.rsplit('.', 1)[-1].strip() not in ("rar", "rev"): return - revtokeep = -1 if self.getConfig('mode') == "Auto" else self.getConfig('revtokeep') + revtokeep = -1 if self.get_config('mode') == "Auto" else self.get_config('revtokeep') if not revtokeep: return diff --git a/module/plugins/hooks/SmoozedComHook.py b/module/plugins/hooks/SmoozedComHook.py index 2f5e370ee..d1cbd8126 100644 --- a/module/plugins/hooks/SmoozedComHook.py +++ b/module/plugins/hooks/SmoozedComHook.py @@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook class SmoozedComHook(MultiHook): __name__ = "SmoozedComHook" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -18,6 +18,6 @@ class SmoozedComHook(MultiHook): __authors__ = [("", "")] - def getHosters(self): + def get_hosters(self): user, data = self.account.selectAccount() return self.account.getAccountInfo(user)["hosters"] diff --git a/module/plugins/hooks/UnSkipOnFail.py b/module/plugins/hooks/UnSkipOnFail.py index cbfbff1b6..4e1e60f61 100644 --- a/module/plugins/hooks/UnSkipOnFail.py +++ b/module/plugins/hooks/UnSkipOnFail.py @@ -7,7 +7,7 @@ from module.plugins.internal.Hook import Hook class UnSkipOnFail(Hook): __name__ = "UnSkipOnFail" __type__ = "hook" - __version__ = "0.08" + __version__ = "0.09" __config__ = [("activated", "bool", "Activated", True)] @@ -29,11 +29,11 @@ class UnSkipOnFail(Hook): return msg = _("Looking for skipped duplicates of: %s (pid:%s)") - self.logInfo(msg % (pyfile.name, pyfile.package().id)) + self.log_info(msg % (pyfile.name, pyfile.package().id)) - link = self.findDuplicate(pyfile) + link = self.find_duplicate(pyfile) if link: - self.logInfo(_("Queue found duplicate: %s (pid:%s)") % (link.name, link.packageID)) + self.log_info(_("Queue found duplicate: %s (pid:%s)") % (link.name, link.packageID)) # Change status of "link" to "new_status". # "link" has to be a valid FileData object, @@ -50,10 +50,10 @@ class UnSkipOnFail(Hook): pylink.release() else: - self.logInfo(_("No duplicates found")) + self.log_info(_("No duplicates found")) - def findDuplicate(self, pyfile): + def find_duplicate(self, pyfile): """Search all packages for duplicate links to "pyfile". Duplicates are links that would overwrite "pyfile". To test on duplicity the package-folder and link-name diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index a06ed97e9..488b300b8 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -28,7 +28,7 @@ def exists(path): class UpdateManager(Hook): __name__ = "UpdateManager" __type__ = "hook" - __version__ = "0.53" + __version__ = "0.54" __config__ = [("activated" , "bool", "Activated" , True ), ("checkinterval", "int" , "Check interval in hours" , 8 ), @@ -63,11 +63,11 @@ class UpdateManager(Hook): self.info = {'pyload': False, 'version': None, 'plugins': False, 'last_check': time.time()} self.mtimes = {} #: store modification time for each plugin - self.event_list = ["allDownloadsProcessed"] + self.event_map = {'allDownloadsProcessed': "all_downloads_processed"} self.interval = 10 - if self.getConfig('checkonstart'): + if self.get_config('checkonstart'): self.core.api.pauseServer() self.checkonstart = True else: @@ -76,27 +76,27 @@ class UpdateManager(Hook): self.do_restart = False - def allDownloadsProcessed(self): + def all_downloads_processed(self): if self.do_restart is True: - self.logWarning(_("Downloads are done, restarting pyLoad to reload the updated plugins")) + self.log_warning(_("Downloads are done, restarting pyLoad to reload the updated plugins")) self.core.api.restart() def periodical(self): if self.core.debug: - if self.getConfig('reloadplugins'): - self.autoreloadPlugins() + if self.get_config('reloadplugins'): + self.autoreload_plugins() - if self.getConfig('nodebugupdate'): + if self.get_config('nodebugupdate'): return - if self.getConfig('checkperiod') \ - and time.time() - max(self.MIN_CHECK_INTERVAL, self.getConfig('checkinterval') * 60 * 60) > self.info['last_check']: + if self.get_config('checkperiod') \ + and time.time() - max(self.MIN_CHECK_INTERVAL, self.get_config('checkinterval') * 60 * 60) > self.info['last_check']: self.update() @Expose - def autoreloadPlugins(self): + def autoreload_plugins(self): """ Reload and reindex all modified plugins """ @@ -133,7 +133,7 @@ class UpdateManager(Hook): get={'v': self.core.api.getServerVersion()}).splitlines() except Exception: - self.logWarning(_("Unable to retrieve server to get updates")) + self.log_warning(_("Unable to retrieve server to get updates")) @Expose @@ -142,12 +142,12 @@ class UpdateManager(Hook): """ Check for updates """ - if self._update() is 2 and self.getConfig('autorestart'): + if self._update() is 2 and self.get_config('autorestart'): if not self.core.api.statusDownloads(): self.core.api.restart() else: self.do_restart = True - self.logWarning(_("Downloads are active, will restart once the download is done")) + self.log_warning(_("Downloads are active, will restart once the download is done")) self.core.api.pauseServer() @@ -160,15 +160,15 @@ class UpdateManager(Hook): exitcode = 0 elif data[0] == "None": - self.logInfo(_("No new pyLoad version available")) - exitcode = self._updatePlugins(data[1:]) + self.log_info(_("No new pyLoad version available")) + exitcode = self._update_plugins(data[1:]) elif onlyplugin: exitcode = 0 else: - self.logInfo(_("*** New pyLoad Version %s available ***") % data[0]) - self.logInfo(_("*** Get it here: https://github.com/pyload/pyload/releases ***")) + self.log_info(_("*** New pyLoad Version %s available ***") % data[0]) + self.log_info(_("*** Get it here: https://github.com/pyload/pyload/releases ***")) self.info['pyload'] = True self.info['version'] = data[0] exitcode = 3 @@ -181,7 +181,7 @@ class UpdateManager(Hook): return exitcode - def _updatePlugins(self, data): + def _update_plugins(self, data): """ Check for plugin updates """ @@ -218,8 +218,8 @@ class UpdateManager(Hook): updatelist.pop(idx) break - for t, n in self.removePlugins(sorted(type_plugins)): - self.logInfo(_("Removed blacklisted plugin: [%(type)s] %(name)s") % { + for t, n in self.remove_plugins(sorted(type_plugins)): + self.log_info(_("Removed blacklisted plugin: [%(type)s] %(name)s") % { 'type': t, 'name': n, }) @@ -252,7 +252,7 @@ class UpdateManager(Hook): else: continue - self.logInfo(_(msg) % {'type' : type, + self.log_info(_(msg) % {'type' : type, 'name' : name, 'oldver': oldver, 'newver': newver}) @@ -269,21 +269,21 @@ class UpdateManager(Hook): raise Exception, _("Version mismatch") except Exception, e: - self.logError(_("Error updating plugin: %s") % filename, e) + self.log_error(_("Error updating plugin: %s") % filename, e) if updated: - self.logInfo(_("*** Plugins updated ***")) + self.log_info(_("*** Plugins updated ***")) if self.core.pluginManager.reloadPlugins(updated): exitcode = 1 else: - self.logWarning(_("pyLoad restart required to reload the updated plugins")) + self.log_warning(_("pyLoad restart required to reload the updated plugins")) self.info['plugins'] = True exitcode = 2 self.manager.dispatchEvent("plugin_updated", updated) else: - self.logInfo(_("No plugin updates available")) + self.log_info(_("No plugin updates available")) # Exit codes: # 0 = No plugin updated @@ -293,7 +293,7 @@ class UpdateManager(Hook): @Expose - def removePlugins(self, type_plugins): + def remove_plugins(self, type_plugins): """ Delete plugins from disk """ @@ -302,7 +302,7 @@ class UpdateManager(Hook): removed = set() - self.logDebug("Requested deletion of plugins: %s" % type_plugins) + self.log_debug("Requested deletion of plugins: %s" % type_plugins) for type, name in type_plugins: rootplugins = os.path.join(pypath, "module", "plugins") @@ -316,7 +316,7 @@ class UpdateManager(Hook): self.manager.deactivateHook(name) except Exception, e: - self.logDebug(e) + self.log_debug(e) for filename in (py_filename, pyc_filename): if not exists(filename): @@ -326,7 +326,7 @@ class UpdateManager(Hook): os.remove(filename) except OSError, e: - self.logError(_("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 ea2d84a43..fdfe4b673 100644 --- a/module/plugins/hooks/UserAgentSwitcher.py +++ b/module/plugins/hooks/UserAgentSwitcher.py @@ -8,7 +8,7 @@ from module.plugins.internal.Hook import Hook class UserAgentSwitcher(Hook): __name__ = "UserAgentSwitcher" __type__ = "hook" - __version__ = "0.09" + __version__ = "0.10" __config__ = [("activated" , "bool", "Activated" , True ), ("connecttimeout", "int" , "Connection timeout in seconds" , 60 ), @@ -28,9 +28,9 @@ class UserAgentSwitcher(Hook): def download_preparing(self, pyfile): - connecttimeout = self.getConfig('connecttimeout') - maxredirs = self.getConfig('maxredirs') - useragent = self.getConfig('useragent') + connecttimeout = self.get_config('connecttimeout') + maxredirs = self.get_config('maxredirs') + useragent = self.get_config('useragent') if connecttimeout: pyfile.plugin.req.http.c.setopt(pycurl.CONNECTTIMEOUT, connecttimeout) @@ -39,5 +39,5 @@ class UserAgentSwitcher(Hook): pyfile.plugin.req.http.c.setopt(pycurl.MAXREDIRS, maxredirs) if useragent: - self.logDebug("Use custom user-agent string: " + useragent) + self.log_debug("Use custom user-agent string: " + useragent) pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, useragent) diff --git a/module/plugins/hooks/WindowsPhoneNotify.py b/module/plugins/hooks/WindowsPhoneNotify.py index 713499322..511b4b568 100644 --- a/module/plugins/hooks/WindowsPhoneNotify.py +++ b/module/plugins/hooks/WindowsPhoneNotify.py @@ -9,7 +9,7 @@ from module.plugins.internal.Hook import Hook, Expose class WindowsPhoneNotify(Hook): __name__ = "WindowsPhoneNotify" __type__ = "hook" - __version__ = "0.11" + __version__ = "0.12" __config__ = [("push-id" , "str" , "Push ID" , "" ), ("push-url" , "str" , "Push url" , "" ), @@ -34,25 +34,26 @@ class WindowsPhoneNotify(Hook): def setup(self): self.info = {} #@TODO: Remove in 0.4.10 - self.event_list = ["allDownloadsProcessed", "plugin_updated"] + self.event_list = ["plugin_updated"] + self.event_map = {'allDownloadsProcessed': "all_downloads_processed"} self.last_notify = 0 self.notifications = 0 def plugin_updated(self, type_plugins): - if not self.getConfig('notifyupdate'): + if not self.get_config('notifyupdate'): return self.notify(_("Plugins updated"), str(type_plugins)) def activate(self): - self.key = (self.getConfig('push-id'), self.getConfig('push-url')) + self.key = (self.get_config('push-id'), self.get_config('push-url')) def exit(self): - if not self.getConfig('notifyexit'): + if not self.get_config('notifyexit'): return if self.core.do_restart: @@ -62,19 +63,19 @@ class WindowsPhoneNotify(Hook): def captcha_task(self, task): - if not self.getConfig('notifycaptcha'): + if not self.get_config('notifycaptcha'): return self.notify(_("Captcha"), _("New request waiting user input")) def package_finished(self, pypack): - if self.getConfig('notifypackage'): + if self.get_config('notifypackage'): self.notify(_("Package finished"), pypack.name) - def allDownloadsProcessed(self): - if not self.getConfig('notifyprocessed'): + def all_downloads_processed(self): + if not self.get_config('notifyprocessed'): return if any(True for pdata in self.core.api.getQueue() if pdata.linksdone < pdata.linkstotal): @@ -83,7 +84,7 @@ class WindowsPhoneNotify(Hook): self.notify(_("All packages finished")) - def getXmlData(self, msg): + def get_xml_data(self, msg): return (" " " pyLoad %s " " " % msg) @@ -99,21 +100,21 @@ class WindowsPhoneNotify(Hook): if not id or not url: return - if self.core.isClientConnected() and not self.getConfig('ignoreclient'): + if self.core.isClientConnected() and not self.get_config('ignoreclient'): return elapsed_time = time.time() - self.last_notify - if elapsed_time < self.getConfig("sendtimewait"): + if elapsed_time < self.get_config("sendtimewait"): return if elapsed_time > 60: self.notifications = 0 - elif self.notifications >= self.getConfig("sendpermin"): + elif self.notifications >= self.get_config("sendpermin"): return - request = self.getXmlData("%s: %s" % (event, msg) if msg else event) + request = self.get_xml_data("%s: %s" % (event, msg) if msg else event) webservice = httplib.HTTP(url) webservice.putrequest("POST", id) diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 0c103b56a..9c42d1c0a 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -8,7 +8,7 @@ from module.plugins.internal.Hook import Hook class XFileSharingPro(Hook): __name__ = "XFileSharingPro" __type__ = "hook" - __version__ = "0.39" + __version__ = "0.40" __config__ = [("activated" , "bool", "Activated" , True ), ("use_hoster_list" , "bool", "Load listed hosters only" , False), @@ -34,41 +34,41 @@ class XFileSharingPro(Hook): "junkyvideo.com", "linestorage.com", "ravishare.com", "ryushare.com", "salefiles.com", "sendmyway.com", "sharebeast.com", "sharesix.com", "thefile.me", "verzend.be", "worldbytez.com", "xvidstage.com", - #NOT TESTED: + # NOT TESTED: "101shared.com", "4upfiles.com", "filemaze.ws", "filenuke.com", "linkzhost.com", "mightyupload.com", "rockdizfile.com", "sharerepo.com", "shareswift.com", "uploadbaz.com", "uploadc.com", "vidbull.com", "zalaa.com", "zomgupload.com", - #NOT WORKING: + # NOT WORKING: "amonshare.com", "banicrazy.info", "boosterking.com", "host4desi.com", "laoupload.com", "rd-fs.com"] CRYPTER_BUILTIN = ["junocloud.me", "rapidfileshare.net"] - #: def pluginConfigChanged(self, plugin, name, value): - #: self.loadPattern() + # def plugin_config_changed(self, plugin, name, value): + # self.load_pattern() def setup(self): self.info = {} #@TODO: Remove in 0.4.10 - #: self.event_list = ["pluginConfigChanged"] + # self.event_map = {'pluginConfigChanged': "plugin_config_changed"} def activate(self): - self.loadPattern() + self.load_pattern() - def loadPattern(self): - use_builtin_list = self.getConfig('use_builtin_list') + def load_pattern(self): + use_builtin_list = self.get_config('use_builtin_list') for type, plugin in (("hoster", "XFileSharingPro"), ("crypter", "XFileSharingProFolder")): - every_plugin = not self.getConfig("use_%s_list" % type) + every_plugin = not self.get_config("use_%s_list" % type) if every_plugin: - self.logInfo(_("Handling any %s I can!") % type) + self.log_info(_("Handling any %s I can!") % type) pattern = self.regexp[type][0] else: - plugins = self.getConfig('%s_list' % type) + plugins = self.get_config('%s_list' % type) plugin_set = set(plugins.replace(' ', '').replace('\\', '').replace('|', ',').replace(';', ',').lower().split(',')) if use_builtin_list: @@ -77,14 +77,14 @@ class XFileSharingPro(Hook): plugin_set -= set(('', u'')) if not plugin_set: - self.logInfo(_("No %s to handle") % type) + self.log_info(_("No %s to handle") % type) self._unload(type, plugin) return match_list = '|'.join(sorted(plugin_set)) len_match_list = len(plugin_set) - self.logInfo(_("Handling %d %s%s: %s") % (len_match_list, + self.log_info(_("Handling %d %s%s: %s") % (len_match_list, type, "" if len_match_list == 1 else "s", match_list.replace('|', ', '))) @@ -95,7 +95,7 @@ class XFileSharingPro(Hook): dict['pattern'] = pattern dict['re'] = re.compile(pattern) - self.logDebug("Loaded %s pattern: %s" % (type, pattern)) + self.log_debug("Loaded %s pattern: %s" % (type, pattern)) def _unload(self, type, plugin): @@ -105,13 +105,13 @@ class XFileSharingPro(Hook): def deactivate(self): - #: self.unloadHoster("BasePlugin") + #: self.unload_hoster("BasePlugin") for type, plugin in (("hoster", "XFileSharingPro"), ("crypter", "XFileSharingProFolder")): self._unload(type, plugin) - def unloadHoster(self, hoster): + def unload_hoster(self, hoster): hdict = self.core.pluginManager.hosterPlugins[hoster] if "new_name" in hdict and hdict['new_name'] == "XFileSharingPro": if "module" in hdict: @@ -126,10 +126,10 @@ class XFileSharingPro(Hook): return False - #: def download_failed(self, pyfile): - #: if pyfile.pluginname == "BasePlugin" \ - #: and pyfile.hasStatus("failed") \ - #: and not self.getConfig('use_hoster_list') \ - #: and self.unloadHoster("BasePlugin"): - #: self.logDebug("Unloaded XFileSharingPro from BasePlugin") - #: pyfile.setStatus("queued") + # def download_failed(self, pyfile): + # if pyfile.pluginname == "BasePlugin" \ + # and pyfile.hasStatus("failed") \ + # and not self.get_config('use_hoster_list') \ + # and self.unload_hoster("BasePlugin"): + # self.log_debug("Unloaded XFileSharingPro from BasePlugin") + # pyfile.setStatus("queued") diff --git a/module/plugins/hooks/XMPPInterface.py b/module/plugins/hooks/XMPPInterface.py index 8a76257ad..a2c32166f 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.11" + __version__ = "0.12" __config__ = [("jid" , "str" , "Jabber ID" , "user@exmaple-jabber-server.org" ), ("pw" , "str" , "Password" , "" ), @@ -33,14 +33,14 @@ class XMPPInterface(IRCInterface, JabberClient): def __init__(self, core, manager): IRCInterface.__init__(self, core, manager) - self.jid = JID(self.getConfig('jid')) - password = self.getConfig('pw') + self.jid = JID(self.get_config('jid')) + password = self.get_config('pw') #: if bare JID is provided add a resource -- it is required if not self.jid.resource: self.jid = JID(self.jid.node, self.jid.domain, "pyLoad") - if self.getConfig('tls'): + if self.get_config('tls'): tls_settings = streamtls.TLSSettings(require=True, verify_peer=False) auth = ("sasl:PLAIN", "sasl:DIGEST-MD5") else: @@ -67,7 +67,7 @@ class XMPPInterface(IRCInterface, JabberClient): def package_finished(self, pypack): try: - if self.getConfig('info_pack'): + if self.get_config('info_pack'): self.announce(_("Package finished: %s") % pypack.name) except Exception: pass @@ -75,7 +75,7 @@ class XMPPInterface(IRCInterface, JabberClient): def download_finished(self, pyfile): try: - if self.getConfig('info_file'): + if self.get_config('info_file'): self.announce( _("Download finished: %(name)s @ %(plugin)s") % {"name": pyfile.name, "plugin": pyfile.pluginname}) except Exception: @@ -88,7 +88,7 @@ class XMPPInterface(IRCInterface, JabberClient): try: self.loop() except Exception, ex: - self.logError(ex) + self.log_error(ex) def stream_state_changed(self, state, arg): @@ -97,19 +97,19 @@ class XMPPInterface(IRCInterface, JabberClient): to a server changes. This will usually be used to let the user know what is going on. """ - self.logDebug("*** State changed: %s %r ***" % (state, arg)) + self.log_debug("*** State changed: %s %r ***" % (state, arg)) def disconnected(self): - self.logDebug("Client was disconnected") + self.log_debug("Client was disconnected") def stream_closed(self, stream): - self.logDebug("Stream was closed", stream) + self.log_debug("Stream was closed", stream) def stream_error(self, err): - self.logDebug("Stream Error", err) + self.log_debug("Stream Error", err) def get_message_handlers(self): @@ -129,8 +129,8 @@ class XMPPInterface(IRCInterface, JabberClient): subject = stanza.get_subject() body = stanza.get_body() t = stanza.get_type() - self.logDebug("Message from %s received." % stanza.get_from()) - self.logDebug("Body: %s Subject: %s Type: %s" % (body, subject, t)) + self.log_debug("Message from %s received." % stanza.get_from()) + self.log_debug("Body: %s Subject: %s Type: %s" % (body, subject, t)) if t == "headline": #: 'headline' messages should never be replied to @@ -141,11 +141,11 @@ class XMPPInterface(IRCInterface, JabberClient): to_jid = stanza.get_from() from_jid = stanza.get_to() - #j = JID() + # j = JID() to_name = to_jid.as_utf8() from_name = from_jid.as_utf8() - names = self.getConfig('owners').split(";") + names = self.get_config('owners').split(";") if to_name in names or to_jid.node + "@" + to_jid.domain in names: messages = [] @@ -174,7 +174,7 @@ class XMPPInterface(IRCInterface, JabberClient): messages.append(m) except Exception, e: - self.logError(e) + self.log_error(e) return messages @@ -190,8 +190,8 @@ class XMPPInterface(IRCInterface, JabberClient): """ Send message to all owners """ - for user in self.getConfig('owners').split(";"): - self.logDebug("Send message to", user) + for user in self.get_config('owners').split(";"): + self.log_debug("Send message to", user) to_jid = JID(user) diff --git a/module/plugins/hooks/ZeveraComHook.py b/module/plugins/hooks/ZeveraComHook.py index 611fc5d91..c0109eb38 100644 --- a/module/plugins/hooks/ZeveraComHook.py +++ b/module/plugins/hooks/ZeveraComHook.py @@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook class ZeveraComHook(MultiHook): __name__ = "ZeveraComHook" __type__ = "hook" - __version__ = "0.05" + __version__ = "0.06" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -19,6 +19,6 @@ class ZeveraComHook(MultiHook): ("Walter Purcaro", "vuolter@gmail.com" )] - def getHosters(self): + def get_hosters(self): html = self.account.api_response(pyreq.getHTTPRequest(timeout=120), cmd="gethosters") return [x.strip() for x in html.split(",")] diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index e0daa6657..46379bdc9 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -11,7 +11,7 @@ from module.utils import parseFileSize class AlldebridCom(MultiHoster): __name__ = "AlldebridCom" __type__ = "hoster" - __version__ = "0.47" + __version__ = "0.48" __pattern__ = r'https?://(?:www\.|s\d+\.)?alldebrid\.com/dl/[\w^_]+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -23,23 +23,23 @@ class AlldebridCom(MultiHoster): def setup(self): - self.chunkLimit = 16 + self.chunk_limit = 16 - def handlePremium(self, pyfile): - password = self.getPassword() + def handle_premium(self, pyfile): + password = self.get_password() data = json_loads(self.load("http://www.alldebrid.com/service.php", get={'link': pyfile.url, 'json': "true", 'pw': password})) - self.logDebug("Json data", data) + self.log_debug("Json data", data) if data['error']: if data['error'] == "This link isn't available on the hoster website.": self.offline() else: - self.logWarning(data['error']) - self.tempOffline() + self.log_warning(data['error']) + self.temp_offline() else: if pyfile.name and not pyfile.name.endswith('.tmp'): pyfile.name = data['filename'] diff --git a/module/plugins/hoster/AndroidfilehostCom.py b/module/plugins/hoster/AndroidfilehostCom.py index e5f2c7f88..35e311154 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.01" + __version__ = "0.02" __pattern__ = r'https?://(?:www\.)?androidfilehost\.com/\?fid=\d+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -31,17 +31,17 @@ class AndroidfilehostCom(SimpleHoster): def setup(self): - self.multiDL = True - self.resumeDownload = True - self.chunkLimit = 1 + self.multi_dl = True + self.resume_download = True + self.chunk_limit = 1 - def handleFree(self, pyfile): + def handle_free(self, pyfile): wait = re.search(self.WAIT_PATTERN, self.html) - self.logDebug("Waiting time: %s seconds" % wait.group(1)) + self.log_debug("Waiting time: %s seconds" % wait.group(1)) fid = re.search(r'id="fid" value="(\d+)" />', self.html).group(1) - self.logDebug("fid: %s" % fid) + self.log_debug("fid: %s" % fid) html = self.load("https://www.androidfilehost.com/libs/otf/mirrors.otf.php", post={'submit': 'submit', @@ -51,7 +51,7 @@ class AndroidfilehostCom(SimpleHoster): self.link = re.findall('"url":"(.*?)"', html)[0].replace("\\", "") mirror_host = self.link.split("/")[2] - self.logDebug("Mirror Host: %s" % mirror_host) + self.log_debug("Mirror Host: %s" % mirror_host) html = self.load("https://www.androidfilehost.com/libs/otf/stats.otf.php", get={'fid' : fid, diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 82311dd6b..7fc0426ea 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -12,7 +12,7 @@ from module.plugins.internal.Hoster import Hoster class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" - __version__ = "0.44" + __version__ = "0.45" __pattern__ = r'^unmatchable$' @@ -23,7 +23,7 @@ class BasePlugin(Hoster): @classmethod - def getInfo(cls, url="", html=""): #@TODO: Move to hoster class in 0.4.10 + def get_info(cls, url="", html=""): #@TODO: Move to hoster class in 0.4.10 url = urllib.unquote(url) url_p = urlparse.urlparse(url) return {'name' : (url_p.path.split('/')[-1] @@ -35,23 +35,23 @@ class BasePlugin(Hoster): def setup(self): - self.chunkLimit = -1 - self.multiDL = True - self.resumeDownload = True + self.chunk_limit = -1 + self.multi_dl = True + self.resume_download = True def process(self, pyfile): """ Main function """ - pyfile.name = self.getInfo(pyfile.url)['name'] + pyfile.name = self.get_info(pyfile.url)['name'] if not pyfile.url.startswith("http"): self.fail(_("No plugin matched")) for _i in xrange(5): try: - link = self.directLink(self, urllib.unquote(pyfile.url)) + link = self.direct_link(self, urllib.unquote(pyfile.url)) if link: self.download(link, ref=False, disposition=True) @@ -63,17 +63,17 @@ class BasePlugin(Hoster): self.offline() elif e.code in (401, 403): - self.logDebug("Auth required", "Received HTTP status code: %d" % e.code) + self.log_debug("Auth required", "Received HTTP status code: %d" % e.code) account = self.core.accountManager.getAccountPlugin('Http') servers = [x['login'] for x in account.getAllAccounts()] server = urlparse.urlparse(pyfile.url).netloc if server in servers: - self.logDebug("Logging on to %s" % server) + self.log_debug("Logging on to %s" % server) self.req.addAuth(account.getAccountData(server)['password']) else: - pwd = self.getPassword() + pwd = self.get_password() if ':' in pwd: self.req.addAuth(pwd) else: @@ -85,7 +85,7 @@ class BasePlugin(Hoster): else: self.fail(_("No file downloaded")) #@TODO: Move to hoster class in 0.4.10 - errmsg = self.checkDownload({'Empty file' : re.compile(r'\A\s*\Z'), + errmsg = self.check_download({'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*\s*\w+/\w+/[^/]+)' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index d3f25d52f..f0514b817 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.27" + __version__ = "0.28" __pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -24,22 +24,22 @@ class BezvadataCz(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = True + self.resume_download = True + self.multi_dl = True - def handleFree(self, pyfile): - #download button + def handle_free(self, pyfile): + # download button m = re.search(r'', self.html) if m is None: self.error(_("Page 2 URL not found")) url = "http://bezvadata.cz%s" % m.group(1) - self.logDebug("DL URL %s" % url) + self.log_debug("DL URL %s" % url) - #countdown + # countdown m = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html) wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 120 self.wait(wait_time, False) @@ -79,11 +79,11 @@ class BezvadataCz(SimpleHoster): self.link = url - def checkErrors(self): + def check_errors(self): if 'images/button-download-disable.png' in self.html: self.wait(5 * 60, 24, _("Download limit reached")) #: parallel dl limit elif '
\w+)(?(1)/(?P.+?)\.html)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -32,8 +32,8 @@ class BitshareCom(SimpleHoster): def setup(self): - self.multiDL = self.premium - self.chunkLimit = 1 + self.multi_dl = self.premium + self.chunk_limit = 1 def process(self, pyfile): @@ -43,7 +43,7 @@ class BitshareCom(SimpleHoster): #: File id m = re.match(self.__pattern__, pyfile.url) self.file_id = max(m.group('ID1'), m.group('ID2')) - self.logDebug("File id is [%s]" % self.file_id) + self.log_debug("File id is [%s]" % self.file_id) #: Load main page self.html = self.load(pyfile.url, ref=False) @@ -54,7 +54,7 @@ class BitshareCom(SimpleHoster): #: Check Traffic used up if re.search(self.TRAFFIC_USED_UP, self.html): - self.logInfo(_("Your Traffic is used up for today")) + self.log_info(_("Your Traffic is used up for today")) self.wait(30 * 60, True) self.retry() @@ -69,16 +69,16 @@ class BitshareCom(SimpleHoster): #: Ajax file id self.ajaxid = re.search(self.AJAXID_PATTERN, self.html).group(1) - self.logDebug("File ajax id is [%s]" % self.ajaxid) + self.log_debug("File ajax id is [%s]" % self.ajaxid) #: This may either download our file or forward us to an error page - self.link = self.getDownloadUrl() + self.link = self.get_download_url() - if self.checkDownload({"error": ">Error occured<"}): + if self.check_download({"error": ">Error occured<"}): self.retry(5, 5 * 60, "Bitshare host : Error occured") - def getDownloadUrl(self): + def get_download_url(self): #: Return location if direct download is active if self.premium: header = self.load(self.pyfile.url, just_header=True) @@ -86,22 +86,22 @@ class BitshareCom(SimpleHoster): return header['location'] #: Get download info - self.logDebug("Getting download info") + self.log_debug("Getting download info") res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html", post={"request": "generateID", "ajaxid": self.ajaxid}) - self.handleErrors(res, ':') + self.handle_errors(res, ':') parts = res.split(":") filetype = parts[0] wait = int(parts[1]) captcha = int(parts[2]) - self.logDebug("Download info [type: '%s', waiting: %d, captcha: %d]" % (filetype, wait, captcha)) + self.log_debug("Download info [type: '%s', waiting: %d, captcha: %d]" % (filetype, wait, captcha)) #: Waiting if wait > 0: - self.logDebug("Waiting %d seconds." % wait) + self.log_debug("Waiting %d seconds." % wait) if wait < 120: self.wait(wait, False) else: @@ -110,7 +110,7 @@ class BitshareCom(SimpleHoster): #: Resolve captcha if captcha == 1: - self.logDebug("File is captcha protected") + self.log_debug("File is captcha protected") recaptcha = ReCaptcha(self) #: Try up to 3 times @@ -121,23 +121,23 @@ class BitshareCom(SimpleHoster): "ajaxid" : self.ajaxid, "recaptcha_challenge_field": challenge, "recaptcha_response_field" : response}) - if self.handleCaptchaErrors(res): + if self.handle_captcha_errors(res): break #: Get download URL - self.logDebug("Getting download url") + self.log_debug("Getting download url") res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html", post={"request": "getDownloadURL", "ajaxid": self.ajaxid}) - self.handleErrors(res, '#') + self.handle_errors(res, '#') url = res.split("#")[-1] return url - def handleErrors(self, res, separator): - self.logDebug("Checking response [%s]" % res) + def handle_errors(self, res, separator): + self.log_debug("Checking response [%s]" % res) if "ERROR:Session timed out" in res: self.retry() elif "ERROR" in res: @@ -145,15 +145,15 @@ class BitshareCom(SimpleHoster): self.fail(msg) - def handleCaptchaErrors(self, res): - self.logDebug("Result of captcha resolving [%s]" % res) + def handle_captcha_errors(self, res): + self.log_debug("Result of captcha resolving [%s]" % res) if "SUCCESS" in res: - self.correctCaptcha() + self.correct_captcha() return True elif "ERROR:SESSION ERROR" in res: self.retry() - self.invalidCaptcha() + self.invalid_captcha() getInfo = create_getInfo(BitshareCom) diff --git a/module/plugins/hoster/BoltsharingCom.py b/module/plugins/hoster/BoltsharingCom.py index db813ba2e..579b4ce39 100644 --- a/module/plugins/hoster/BoltsharingCom.py +++ b/module/plugins/hoster/BoltsharingCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class BoltsharingCom(DeadHoster): __name__ = "BoltsharingCom" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 795da6229..04b9792ad 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.ReCaptcha import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -32,11 +32,11 @@ class CatShareNet(SimpleHoster): def setup(self): - self.multiDL = self.premium - self.resumeDownload = True + self.multi_dl = self.premium + self.resume_download = True - def handleFree(self, pyfile): + def handle_free(self, pyfile): recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge() diff --git a/module/plugins/hoster/CloudzerNet.py b/module/plugins/hoster/CloudzerNet.py index af40b8d5f..02cc416aa 100644 --- a/module/plugins/hoster/CloudzerNet.py +++ b/module/plugins/hoster/CloudzerNet.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class CloudzerNet(DeadHoster): __name__ = "CloudzerNet" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __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 09453137d..f58a0aa61 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.07" + __version__ = "0.08" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P[\w^_]+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -24,9 +24,9 @@ class CloudzillaTo(SimpleHoster): PASSWORD_PATTERN = r'
' - def checkErrors(self): + def check_errors(self): if re.search(self.PASSWORD_PATTERN, self.html): - pw = self.getPassword() + pw = self.get_password() if pw: self.html = self.load(self.pyfile.url, get={'key': pw}) else: @@ -38,13 +38,13 @@ class CloudzillaTo(SimpleHoster): return super(CloudzillaTo, self).checkErrors() - def handleFree(self, pyfile): + def handle_free(self, pyfile): self.html = self.load("http://www.cloudzilla.to/generateticket/", - post={'file_id': self.info['pattern']['ID'], 'key': self.getPassword()}) + post={'file_id': self.info['pattern']['ID'], 'key': self.get_password()}) ticket = dict(re.findall(r'<(.+?)>([^<>]+?)', '')] - def handleFree(self, pyfile): + def handle_free(self, pyfile): if "You need Premium membership to download this file." in self.html: self.fail(_("You need Premium membership to download this file")) @@ -57,8 +57,8 @@ class CrockoCom(SimpleHoster): inputs['recaptcha_response_field'], inputs['recaptcha_challenge_field'] = recaptcha.challenge() self.download(action, post=inputs) - if self.checkDownload({"captcha": recaptcha.KEY_AJAX_PATTERN}): - self.invalidCaptcha() + if self.check_download({"captcha": recaptcha.KEY_AJAX_PATTERN}): + self.invalid_captcha() else: break else: diff --git a/module/plugins/hoster/CyberlockerCh.py b/module/plugins/hoster/CyberlockerCh.py index 9d748bf85..e524f63fe 100644 --- a/module/plugins/hoster/CyberlockerCh.py +++ b/module/plugins/hoster/CyberlockerCh.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class CyberlockerCh(DeadHoster): __name__ = "CyberlockerCh" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 01e120e5e..0e28f31dd 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -12,7 +12,7 @@ from module.utils import parseFileSize class CzshareCom(SimpleHoster): __name__ = "CzshareCom" __type__ = "hoster" - __version__ = "1.00" + __version__ = "1.01" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -39,7 +39,7 @@ class CzshareCom(SimpleHoster): USER_CREDIT_PATTERN = r'
\s*kredit: ([\d .,]+)(\w+)\s*
' - def checkTrafficLeft(self): + def check_traffic_left(self): #: check if user logged in m = re.search(self.USER_CREDIT_PATTERN, self.html) if m is None: @@ -52,32 +52,32 @@ class CzshareCom(SimpleHoster): #: check user credit try: credit = parseFileSize(m.group(1).replace(' ', ''), m.group(2)) - self.logInfo(_("Premium download for %i KiB of Credit") % (self.pyfile.size / 1024)) - self.logInfo(_("User %s has %i KiB left") % (self.user, credit / 1024)) + self.log_info(_("Premium download for %i KiB of Credit") % (self.pyfile.size / 1024)) + self.log_info(_("User %s has %i KiB left") % (self.user, credit / 1024)) if credit < self.pyfile.size: - self.logInfo(_("Not enough credit to download file: %s") % self.pyfile.name) + self.log_info(_("Not enough credit to download file: %s") % self.pyfile.name) return False except Exception, e: #: let's continue and see what happens... - self.logError(e) + self.log_error(e) return True - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): #: parse download link try: form = re.search(self.PREMIUM_FORM_PATTERN, self.html, re.S).group(1) inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) except Exception, e: - self.logError(e) - self.resetAccount() + self.log_error(e) + self.reset_account() #: download the file, destination is determined by pyLoad self.download("http://sdilej.cz/profi_down.php", post=inputs, disposition=True) - def handleFree(self, pyfile): + def handle_free(self, pyfile): #: get free url m = re.search(self.FREE_URL_PATTERN, self.html) if m is None: @@ -85,7 +85,7 @@ class CzshareCom(SimpleHoster): parsed_url = "http://sdilej.cz" + m.group(1) - self.logDebug("PARSED_URL:" + parsed_url) + self.log_debug("PARSED_URL:" + parsed_url) #: get download ticket and parse html self.html = self.load(parsed_url) @@ -98,32 +98,32 @@ class CzshareCom(SimpleHoster): pyfile.size = int(inputs['size']) except Exception, e: - self.logError(e) + self.log_error(e) self.error(_("Form")) #: get and decrypt captcha captcha_url = 'http://sdilej.cz/captcha.php' for _i in xrange(5): - inputs['captchastring2'] = self.decryptCaptcha(captcha_url) + inputs['captchastring2'] = self.decrypt_captcha(captcha_url) self.html = self.load(parsed_url, post=inputs) if u"
  • Zadaný ověřovací kód nesouhlasí!
  • " in self.html: - self.invalidCaptcha() + self.invalid_captcha() elif re.search(self.MULTIDL_PATTERN, self.html): self.wait(5 * 60, 12, _("Download limit reached")) else: - self.correctCaptcha() + self.correct_captcha() break else: self.fail(_("No valid captcha code entered")) m = re.search("countdown_number = (\d+);", self.html) - self.setWait(int(m.group(1)) if m else 50) + self.set_wait(int(m.group(1)) if m else 50) #: download the file, destination is determined by pyLoad - self.logDebug("WAIT URL", self.req.lastEffectiveURL) + self.log_debug("WAIT URL", self.req.lastEffectiveURL) m = re.search("free_wait.php\?server=(.*?)&(.*)", self.req.lastEffectiveURL) if m is None: @@ -134,9 +134,9 @@ class CzshareCom(SimpleHoster): self.wait() - def checkFile(self): + def check_file(self): #: check download - check = self.checkDownload({ + check = self.check_download({ "temp offline" : re.compile(r"^Soubor je do.*asn.* nedostupn.*$"), "credit" : re.compile(r"^Nem.*te dostate.*n.* kredit.$"), "multi-dl" : re.compile(self.MULTIDL_PATTERN), @@ -147,13 +147,13 @@ class CzshareCom(SimpleHoster): self.fail(_("File not available - try later")) elif check == "credit": - self.resetAccount() + self.reset_account() elif check == "multi-dl": self.wait(5 * 60, 12, _("Download limit reached")) elif check == "captcha": - self.invalidCaptcha() + self.invalid_captcha() self.retry() return super(CzshareCom, self).checkFile() diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py index f9cc0d28e..18f84ff56 100644 --- a/module/plugins/hoster/DailymotionCom.py +++ b/module/plugins/hoster/DailymotionCom.py @@ -8,7 +8,7 @@ from module.network.RequestFactory import getURL from module.plugins.internal.Hoster import Hoster -def getInfo(urls): +def get_info(urls): result = [] regex = re.compile(DailymotionCom.__pattern__) apiurl = "https://api.dailymotion.com/video/%s" @@ -40,7 +40,7 @@ def getInfo(urls): class DailymotionCom(Hoster): __name__ = "DailymotionCom" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" __pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*video/(?P[\w^_]+)' __config__ = [("quality", "Lowest;LD 144p;LD 240p;SD 384p;HQ 480p;HD 720p;HD 1080p;Highest", "Quality", "Highest")] @@ -51,11 +51,11 @@ class DailymotionCom(Hoster): def setup(self): - self.resumeDownload = True - self.multiDL = True + self.resume_download = True + self.multi_dl = True - def getStreams(self): + def get_streams(self): streams = [] for result in re.finditer(r"\"(?Phttp:\\/\\/www.dailymotion.com\\/cdn\\/H264-(?P.*?)\\.*?)\"", @@ -71,8 +71,8 @@ class DailymotionCom(Hoster): return sorted(streams, key=lambda x: x[0][::-1]) - def getQuality(self): - q = self.getConfig('quality') + def get_quality(self): + q = self.get_config('quality') if q == "Lowest": quality = 0 @@ -84,7 +84,7 @@ class DailymotionCom(Hoster): return quality - def getLink(self, streams, quality): + def get_link(self, streams, quality): if quality > 0: for x, s in [item for item in enumerate(streams)][::-1]: qf = s[0][1] @@ -98,28 +98,28 @@ class DailymotionCom(Hoster): s = streams[idx] - self.logInfo(_("Download video quality %sx%s") % s[0]) + self.log_info(_("Download video quality %sx%s") % s[0]) return s[1] - def checkInfo(self, pyfile): - pyfile.name, pyfile.size, pyfile.status, pyfile.url = getInfo([pyfile.url])[0] + def check_info(self, pyfile): + pyfile.name, pyfile.size, pyfile.status, pyfile.url = get_info([pyfile.url])[0] if pyfile.status == 1: self.offline() elif pyfile.status == 6: - self.tempOffline() + self.temp_offline() def process(self, pyfile): - self.checkInfo(pyfile) + self.check_info(pyfile) id = re.match(self.__pattern__, pyfile.url).group('ID') self.html = self.load("http://www.dailymotion.com/embed/video/" + id) - streams = self.getStreams() - quality = self.getQuality() + streams = self.get_streams() + quality = self.get_quality() - self.download(self.getLink(streams, quality)) + self.download(self.get_link(streams, quality)) diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py index 955c94437..c6d14c8bf 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.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?data\.hu/get/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -28,8 +28,8 @@ class DataHu(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = self.premium + self.resume_download = True + self.multi_dl = self.premium getInfo = create_getInfo(DataHu) diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index 1b4041c69..d3b25d2ad 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.41" + __version__ = "0.42" __pattern__ = r'http://(?:www\.)?dataport\.cz/file/(.+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -24,12 +24,12 @@ class DataportCz(SimpleHoster): FREE_SLOTS_PATTERN = ur'Počet volných slotů: (\d+)
    ' - def handleFree(self, pyfile): + def handle_free(self, pyfile): captchas = {"1": "jkeG", "2": "hMJQ", "3": "vmEK", "4": "ePQM", "5": "blBd"} for _i in xrange(60): - action, inputs = self.parseHtmlForm('free_download_form') - self.logDebug(action, inputs) + action, inputs = self.parse_html_form('free_download_form') + self.log_debug(action, inputs) if not action or not inputs: self.error(_("free_download_form")) @@ -40,13 +40,13 @@ class DataportCz(SimpleHoster): self.download("http://www.dataport.cz%s" % action, post=inputs) - check = self.checkDownload({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', + check = self.check_download({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', "slot" : 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) if check == "captcha": self.error(_("invalid captcha")) elif check == "slot": - self.logDebug("No free slots - wait 60s and retry") + self.log_debug("No free slots - wait 60s and retry") self.wait(60, False) self.html = self.load(pyfile.url) continue diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index 92a96b9ec..fe1a65e12 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.09" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?datei\.to/datei/(?P\w+)\.html' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -29,19 +29,19 @@ class DateiTo(SimpleHoster): DATA_PATTERN = r'url: "(.*?)", data: "(.*?)",' - def handleFree(self, pyfile): + def handle_free(self, pyfile): url = 'http://datei.to/ajax/download.php' data = {'P': 'I', 'ID': self.info['pattern']['ID']} recaptcha = ReCaptcha(self) for _i in xrange(10): - self.logDebug("URL", url, "POST", data) + self.log_debug("URL", url, "POST", data) self.html = self.load(url, post=data) - self.checkErrors() + self.check_errors() if url.endswith('download.php') and 'P' in data: if data['P'] == 'I': - self.doWait() + self.do_wait() elif data['P'] == 'IV': break @@ -60,7 +60,7 @@ class DateiTo(SimpleHoster): self.link = self.html - def doWait(self): + def do_wait(self): m = re.search(self.WAIT_PATTERN, self.html) wait_time = int(m.group(1)) if m else 30 diff --git a/module/plugins/hoster/DdlstorageCom.py b/module/plugins/hoster/DdlstorageCom.py index 976d9ccf9..e4abeac2a 100644 --- a/module/plugins/hoster/DdlstorageCom.py +++ b/module/plugins/hoster/DdlstorageCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class DdlstorageCom(DeadHoster): __name__ = "DdlstorageCom" __type__ = "hoster" - __version__ = "1.02" + __version__ = "1.03" __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 9e3d87934..d67836d20 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.18" + __version__ = "0.19" __pattern__ = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -23,9 +23,9 @@ class DebridItaliaCom(MultiHoster): URL_REPLACEMENTS = [("https://", "http://")] - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): self.html = self.load("http://www.debriditalia.com/api.php", - get={'generate': "on", 'link': pyfile.url, 'p': self.getPassword()}) + get={'generate': "on", 'link': pyfile.url, 'p': self.get_password()}) if "ERROR:" not in self.html: self.link = self.html.strip() @@ -35,7 +35,7 @@ class DebridItaliaCom(MultiHoster): self.html = self.load("http://debriditalia.com/linkgen2.php", post={'xjxfun' : "convertiLink", 'xjxargs[]': "S" % pyfile.url, - 'xjxargs[]': "S%s" % self.getPassword()}) + 'xjxargs[]': "S%s" % self.get_password()}) try: self.link = re.search(r'
    \w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -40,18 +40,18 @@ class DepositfilesCom(SimpleHoster): LINK_MIRROR_PATTERN = r'class="repeat_mirror">' in self.html: - self.logWarning(_("Download limit reached")) + self.log_warning(_("Download limit reached")) self.retry(25, 60 * 60, "Download limit reached") elif 'onClick="show_gold_offer' in self.html: diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index a8a031aaf..27bf100de 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.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -30,8 +30,8 @@ class DevhostSt(SimpleHoster): def setup(self): - self.multiDL = True - self.chunkLimit = 1 + self.multi_dl = True + self.chunk_limit = 1 getInfo = create_getInfo(DevhostSt) diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index e3be19782..f8c684ed4 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.30" + __version__ = "0.31" __pattern__ = r'http://(?:www\.)?dl\.free\.fr/(\w+|getfile\.pl\?file=/\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -53,10 +53,10 @@ class DlFreeFr(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = True - self.limitDL = 5 - self.chunkLimit = 1 + self.resume_download = True + self.multi_dl = True + self.limit_dl = 5 + self.chunk_limit = 1 def init(self): @@ -78,7 +78,7 @@ class DlFreeFr(SimpleHoster): if content_type and content_type.startswith("text/html"): #: Undirect acces to requested file, with a web page providing it (captcha) self.html = self.load(valid_url) - self.handleFree(pyfile) + self.handle_free(pyfile) else: #: Direct access to requested file for users using free.fr as Internet Service Provider. self.link = valid_url @@ -92,10 +92,10 @@ class DlFreeFr(SimpleHoster): self.fail(_("Invalid return code: ") + str(headers.get('code'))) - def handleFree(self, pyfile): - action, inputs = self.parseHtmlForm('action="getfile.pl"') + def handle_free(self, pyfile): + action, inputs = self.parse_html_form('action="getfile.pl"') self.load("http://dl.free.fr/getfile.pl", post=inputs) - headers = self.getLastHeaders() + headers = self.get_last_headers() if headers.get("code") == 302 and "set-cookie" in headers and "location" in headers: m = re.search("(.*?)=(.*?); path=(.*?); domain=(.*)", headers.get("set-cookie")) cj = CookieJar(__name__) @@ -110,8 +110,8 @@ class DlFreeFr(SimpleHoster): self.fail(_("Invalid response")) - def getLastHeaders(self): - #parse header + def get_last_headers(self): + # parse header header = {"code": self.req.code} for line in self.req.http.header.splitlines(): line = line.strip() diff --git a/module/plugins/hoster/DodanePl.py b/module/plugins/hoster/DodanePl.py index 46f748cc4..c0aeaafbe 100644 --- a/module/plugins/hoster/DodanePl.py +++ b/module/plugins/hoster/DodanePl.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class DodanePl(DeadHoster): __name__ = "DodanePl" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __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 eec968f5a..9bc022515 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.04" + __version__ = "0.05" __pattern__ = r'https?://(?:www\.)?dropbox\.com/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -27,12 +27,12 @@ class DropboxCom(SimpleHoster): def setup(self): - self.multiDL = True - self.chunkLimit = 1 - self.resumeDownload = True + self.multi_dl = True + self.chunk_limit = 1 + self.resume_download = True - def handleFree(self, pyfile): + def handle_free(self, pyfile): self.download(pyfile.url, get={'dl': "1"}) diff --git a/module/plugins/hoster/DuploadOrg.py b/module/plugins/hoster/DuploadOrg.py index 076171544..57535c46a 100644 --- a/module/plugins/hoster/DuploadOrg.py +++ b/module/plugins/hoster/DuploadOrg.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class DuploadOrg(DeadHoster): __name__ = "DuploadOrg" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 693910c1b..5de267cde 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.23" + __version__ = "0.24" __pattern__ = r'http://(?:www\.)?easybytez\.com/\w{12}' diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index 96be21860..100c6d269 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.23" + __version__ = "0.24" __pattern__ = r'http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -26,13 +26,13 @@ class EdiskCz(SimpleHoster): def setup(self): - self.multiDL = False + self.multi_dl = False def process(self, pyfile): url = re.sub("/(stahni|sk/stahni)/", "/en/download/", pyfile.url) - self.logDebug("URL:" + url) + self.log_debug("URL:" + url) m = re.search(self.ACTION_PATTERN, url) if m is None: diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index 78108962f..3f081da41 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class EgoFilesCom(DeadHoster): __name__ = "EgoFilesCom" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __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 8ef994e1e..46215f5a2 100644 --- a/module/plugins/hoster/EnteruploadCom.py +++ b/module/plugins/hoster/EnteruploadCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class EnteruploadCom(DeadHoster): __name__ = "EnteruploadCom" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 7e3c8ba0e..91858ef3f 100644 --- a/module/plugins/hoster/EpicShareNet.py +++ b/module/plugins/hoster/EpicShareNet.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class EpicShareNet(DeadHoster): __name__ = "EpicShareNet" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 deb138ec7..4401391a9 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.29" + __version__ = "0.30" __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -29,25 +29,25 @@ class EuroshareEu(SimpleHoster): URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")] - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): if self.ERROR_PATTERN in self.html: self.account.relogin(self.user) self.retry(reason=_("User not logged in")) self.link = pyfile.url.rstrip('/') + "/download/" - check = self.checkDownload({"login": re.compile(self.ERROR_PATTERN), + check = self.check_download({"login": re.compile(self.ERROR_PATTERN), "json" : re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) - if check == "login" or (check == "json" and self.lastCheck.group(1) == "Access token expired"): + if check == "login" or (check == "json" and self.last_check.group(1) == "Access token expired"): self.account.relogin(self.user) self.retry(reason=_("Access token expired")) elif check == "json": - self.fail(self.lastCheck.group(1)) + self.fail(self.last_check.group(1)) - def handleFree(self, pyfile): + def handle_free(self, pyfile): if re.search(self.DL_LIMIT_PATTERN, self.html): self.wait(5 * 60, 12, _("Download limit reached")) diff --git a/module/plugins/hoster/ExashareCom.py b/module/plugins/hoster/ExashareCom.py index d70ca6d3a..6c117f596 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.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?exashare\.com/\w{12}' @@ -21,12 +21,12 @@ class ExashareCom(XFSHoster): def setup(self): - self.multiDL = True - self.chunkLimit = 1 - self.resumeDownload = self.premium + self.multi_dl = True + self.chunk_limit = 1 + self.resume_download = self.premium - def handleFree(self, pyfile): + def handle_free(self, pyfile): m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: self.error(_("Free download link not found")) diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index ead2e1e53..c2ae32099 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -5,13 +5,13 @@ import re from module.common.json_layer import json_loads from module.plugins.internal.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, secondsToMidnight +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, seconds_to_midnight class ExtabitCom(SimpleHoster): __name__ = "ExtabitCom" __type__ = "hoster" - __version__ = "0.66" + __version__ = "0.67" __pattern__ = r'http://(?:www\.)?extabit\.com/(file|go|fid)/(?P\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -29,7 +29,7 @@ class ExtabitCom(SimpleHoster): LINK_FREE_PATTERN = r'[\'"](http://guest\d+\.extabit\.com/\w+/.*?)[\'"]' - def handleFree(self, pyfile): + def handle_free(self, pyfile): if r">Only premium users can download this file" in self.html: self.fail(_("Only premium users can download this file")) @@ -37,10 +37,10 @@ class ExtabitCom(SimpleHoster): if m: self.wait(int(m.group(1)) * 60, True) elif "The daily downloads limit from your IP is exceeded" in self.html: - self.logWarning(_("You have reached your daily downloads limit for today")) - self.wait(secondsToMidnight(gmt=2), True) + self.log_warning(_("You have reached your daily downloads limit for today")) + self.wait(seconds_to_midnight(gmt=2), True) - self.logDebug("URL: " + self.req.http.lastEffectiveURL) + self.log_debug("URL: " + self.req.http.lastEffectiveURL) m = re.match(self.__pattern__, self.req.http.lastEffectiveURL) fileID = m.group('ID') if m else self.info['pattern']['ID'] @@ -54,10 +54,10 @@ class ExtabitCom(SimpleHoster): get_data['capture'], get_data['challenge'] = recaptcha.challenge(captcha_key) res = json_loads(self.load("http://extabit.com/file/%s/" % fileID, get=get_data)) if "ok" in res: - self.correctCaptcha() + self.correct_captcha() break else: - self.invalidCaptcha() + self.invalid_captcha() else: self.fail(_("Invalid captcha")) else: diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index 468bcc8af..4e6b2e236 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -10,7 +10,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class FastixRu(MultiHoster): __name__ = "FastixRu" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'http://(?:www\.)?fastix\.(ru|it)/file/\w{24}' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -22,10 +22,10 @@ class FastixRu(MultiHoster): def setup(self): - self.chunkLimit = 3 + self.chunk_limit = 3 - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): api_key = self.account.getAccountData(self.user) api_key = api_key['api'] @@ -34,7 +34,7 @@ class FastixRu(MultiHoster): data = json_loads(self.html) - self.logDebug("Json data", data) + self.log_debug("Json data", data) if "error\":true" in self.html: self.offline() diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index e56a05d37..1ed3213ff 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.30" + __version__ = "0.31" __pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -33,20 +33,20 @@ class FastshareCz(SimpleHoster): CREDIT_ERROR = " credit for " - def checkErrors(self): + def check_errors(self): if self.SLOT_ERROR in self.html: errmsg = self.info['error'] = _("No free slots") self.retry(12, 60, errmsg) if self.CREDIT_ERROR in self.html: errmsg = self.info['error'] = _("Not enough traffic left") - self.logWarning(errmsg) - self.resetAccount() + self.log_warning(errmsg) + self.reset_account() self.info.pop('error', None) - def handleFree(self, pyfile): + def handle_free(self, pyfile): m = re.search(self.FREE_URL_PATTERN, self.html) if m: action, captcha_src = m.groups() @@ -54,12 +54,12 @@ class FastshareCz(SimpleHoster): self.error(_("FREE_URL_PATTERN not found")) baseurl = "http://www.fastshare.cz" - captcha = self.decryptCaptcha(urlparse.urljoin(baseurl, captcha_src)) + captcha = self.decrypt_captcha(urlparse.urljoin(baseurl, captcha_src)) self.download(urlparse.urljoin(baseurl, action), post={'code': captcha, 'btn.x': 77, 'btn.y': 18}) - def checkFile(self): - check = self.checkDownload({ + def check_file(self): + check = self.check_download({ 'paralell-dl' : re.compile(r"FastShare.cz|', self.html) if m: jscript = self.load("http://hostuje.net/" + m.group(1)) @@ -39,7 +39,7 @@ class HostujeNet(SimpleHoster): else: self.error(_("script not found")) - action, inputs = self.parseHtmlForm(pyfile.url.replace(".", "\.").replace( "?", "\?")) + action, inputs = self.parse_html_form(pyfile.url.replace(".", "\.").replace( "?", "\?")) if not action: self.error(_("form not found")) diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index 082415c6b..4878b111b 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class HotfileCom(DeadHoster): __name__ = "HotfileCom" __type__ = "hoster" - __version__ = "0.37" + __version__ = "0.38" __pattern__ = r'https?://(?:www\.)?hotfile\.com/dl/\d+/\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/hoster/HugefilesNet.py b/module/plugins/hoster/HugefilesNet.py index 3fdcca1ba..d3851d137 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.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?hugefiles\.net/\w{12}' diff --git a/module/plugins/hoster/HundredEightyUploadCom.py b/module/plugins/hoster/HundredEightyUploadCom.py index 2a35a008f..74f69fd3b 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.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?180upload\.com/\w{12}' diff --git a/module/plugins/hoster/IFileWs.py b/module/plugins/hoster/IFileWs.py index ff263d43a..a0149d034 100644 --- a/module/plugins/hoster/IFileWs.py +++ b/module/plugins/hoster/IFileWs.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class IFileWs(DeadHoster): __name__ = "IFileWs" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 f81381c66..6d5accddb 100644 --- a/module/plugins/hoster/IcyFilesCom.py +++ b/module/plugins/hoster/IcyFilesCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class IcyFilesCom(DeadHoster): __name__ = "IcyFilesCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __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 18aa0b60f..148cd57d3 100644 --- a/module/plugins/hoster/IfileIt.py +++ b/module/plugins/hoster/IfileIt.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class IfileIt(DeadHoster): __name__ = "IfileIt" __type__ = "hoster" - __version__ = "0.29" + __version__ = "0.30" __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 5f3b4bb51..cc39b32cb 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.39" + __version__ = "0.40" __pattern__ = r'http://(?:www)?(files\.)?(ifolder\.ru|metalarea\.org|rusfolder\.(com|net|ru))/(files/)?(?P\d+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -34,11 +34,11 @@ class IfolderRu(SimpleHoster): def setup(self): - self.resumeDownload = self.multiDL = bool(self.account) - self.chunkLimit = 1 + self.resume_download = self.multi_dl = bool(self.account) + self.chunk_limit = 1 - def handleFree(self, pyfile): + def handle_free(self, pyfile): url = "http://rusfolder.com/%s" % self.info['pattern']['ID'] self.html = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID']) self.getFileInfo() @@ -47,14 +47,14 @@ class IfolderRu(SimpleHoster): captcha_url = "http://ints.rusfolder.com/random/images/?session=%s" % session_id for _i in xrange(5): - action, inputs = self.parseHtmlForm('id="download-step-one-form"') - inputs['confirmed_number'] = self.decryptCaptcha(captcha_url, cookies=True) + action, inputs = self.parse_html_form('id="download-step-one-form"') + inputs['confirmed_number'] = self.decrypt_captcha(captcha_url, cookies=True) inputs['action'] = '1' - self.logDebug(inputs) + self.log_debug(inputs) self.html = self.load(url, post=inputs) if self.WRONG_CAPTCHA_PATTERN in self.html: - self.invalidCaptcha() + self.invalid_captcha() else: break else: diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py index 4812f0224..1da6d7d3c 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.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?jumbofiles\.com/(?P\w{12})' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -24,11 +24,11 @@ class JumbofilesCom(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = True + self.resume_download = True + self.multi_dl = True - def handleFree(self, pyfile): + def handle_free(self, pyfile): post_data = {"id": self.info['pattern']['ID'], "op": "download3", "rand": ""} html = self.load(self.pyfile.url, post=post_data) self.link = re.search(self.LINK_FREE_PATTERN, html).group(1) diff --git a/module/plugins/hoster/JunocloudMe.py b/module/plugins/hoster/JunocloudMe.py index 415d5e2d0..fb5eae4f8 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.05" + __version__ = "0.06" __pattern__ = r'http://(?:\w+\.)?junocloud\.me/\w{12}' diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py index d90466904..c743f4fc9 100644 --- a/module/plugins/hoster/Keep2ShareCc.py +++ b/module/plugins/hoster/Keep2ShareCc.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class Keep2ShareCc(SimpleHoster): __name__ = "Keep2ShareCc" __type__ = "hoster" - __version__ = "0.23" + __version__ = "0.24" __pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -39,11 +39,11 @@ class Keep2ShareCc(SimpleHoster): ERROR_PATTERN = r'>\s*(Free user can\'t download large files|You no can access to this file|This download available only for premium users|This is private file)' - def checkErrors(self): + def check_errors(self): m = re.search(self.TEMP_ERROR_PATTERN, self.html) if m: self.info['error'] = m.group(1) - self.wantReconnect = True + self.want_reconnect = True self.retry(wait_time=30 * 60, reason=m.group(0)) m = re.search(self.ERROR_PATTERN, self.html) @@ -53,30 +53,30 @@ class Keep2ShareCc(SimpleHoster): m = re.search(self.WAIT_PATTERN, self.html) if m: - self.logDebug("Hoster told us to wait for %s" % m.group(1)) + self.log_debug("Hoster told us to wait for %s" % m.group(1)) #: string to time convert courtesy of https://stackoverflow.com/questions/10663720 ftr = [3600, 60, 1] wait_time = sum(a * b for a, b in zip(ftr, map(int, m.group(1).split(':')))) - self.wantReconnect = True + self.want_reconnect = True self.retry(wait_time=wait_time, reason="Please wait to download this file") self.info.pop('error', None) - def handleFree(self, pyfile): + def handle_free(self, pyfile): self.fid = re.search(r'', self.html).group(1) self.html = self.load(pyfile.url, post={'yt0': '', 'slow_id': self.fid}) - #: self.logDebug(self.fid) - #: self.logDebug(pyfile.url) + #: self.log_debug(self.fid) + #: self.log_debug(pyfile.url) - self.checkErrors() + self.check_errors() m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: - self.handleCaptcha() + self.handle_captcha() self.wait(31) self.html = self.load(pyfile.url) @@ -87,20 +87,20 @@ class Keep2ShareCc(SimpleHoster): self.link = m.group(1) - def handleCaptcha(self): + def handle_captcha(self): post_data = {'free' : 1, 'freeDownloadRequest': 1, 'uniqueId' : self.fid, 'yt0' : ''} m = re.search(r'id="(captcha\-form)"', self.html) - self.logDebug("captcha-form found %s" % m) + self.log_debug("captcha-form found %s" % m) m = re.search(self.CAPTCHA_PATTERN, self.html) - self.logDebug("CAPTCHA_PATTERN found %s" % m) + self.log_debug("CAPTCHA_PATTERN found %s" % m) if m: captcha_url = urlparse.urljoin("http://keep2s.cc/", m.group(1)) - post_data['CaptchaForm[code]'] = self.decryptCaptcha(captcha_url) + post_data['CaptchaForm[code]'] = self.decrypt_captcha(captcha_url) else: recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge() @@ -110,9 +110,9 @@ class Keep2ShareCc(SimpleHoster): self.html = self.load(self.pyfile.url, post=post_data) if 'verification code is incorrect' not in self.html: - self.correctCaptcha() + self.correct_captcha() else: - self.invalidCaptcha() + self.invalid_captcha() getInfo = create_getInfo(Keep2ShareCc) diff --git a/module/plugins/hoster/KickloadCom.py b/module/plugins/hoster/KickloadCom.py index 7690c85c8..2be82bcfd 100644 --- a/module/plugins/hoster/KickloadCom.py +++ b/module/plugins/hoster/KickloadCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class KickloadCom(DeadHoster): __name__ = "KickloadCom" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" __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 f14cbd8b4..41e6f1c46 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.08" + __version__ = "0.09" __pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P\w{12})' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -31,11 +31,11 @@ class KingfilesNet(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = True + self.resume_download = True + self.multi_dl = True - def handleFree(self, pyfile): + def handle_free(self, pyfile): #: Click the free user button post_data = {'op' : "download1", 'usr_login' : "", @@ -55,7 +55,7 @@ class KingfilesNet(SimpleHoster): self.error(_("Random key not found")) rand = m.group(1) - self.logDebug("rand = ", rand) + self.log_debug("rand = ", rand) post_data = {'op' : "download2", 'id' : self.info['pattern']['ID'], diff --git a/module/plugins/hoster/LemUploadsCom.py b/module/plugins/hoster/LemUploadsCom.py index 098867c8b..71ad1c5db 100644 --- a/module/plugins/hoster/LemUploadsCom.py +++ b/module/plugins/hoster/LemUploadsCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class LemUploadsCom(DeadHoster): __name__ = "LemUploadsCom" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 62afb6c7c..60634354b 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -12,7 +12,7 @@ import urlparse from module.common.json_layer import json_loads, json_dumps from module.network.RequestFactory import getURL from module.plugins.internal.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, secondsToMidnight +from module.plugins.internal.SimpleHoster import SimpleHoster, seconds_to_midnight def api_response(url): @@ -22,7 +22,7 @@ def api_response(url): return json_loads(api_rep) -def getInfo(urls): +def get_info(urls): for url in urls: api_rep = api_response(url) if api_rep['status'] == 'OK': @@ -35,7 +35,7 @@ def getInfo(urls): class LetitbitNet(SimpleHoster): __name__ = "LetitbitNet" __type__ = "hoster" - __version__ = "0.31" + __version__ = "0.32" __pattern__ = r'https?://(?:www\.)?(letitbit|shareflare)\.net/download/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -53,16 +53,16 @@ class LetitbitNet(SimpleHoster): def setup(self): - self.resumeDownload = True + self.resume_download = True - def handleFree(self, pyfile): - action, inputs = self.parseHtmlForm('id="ifree_form"') + def handle_free(self, pyfile): + action, inputs = self.parse_html_form('id="ifree_form"') if not action: self.error(_("ifree_form")) pyfile.size = float(inputs['sssize']) - self.logDebug(action, inputs) + self.log_debug(action, inputs) inputs['desc'] = "" self.html = self.load(urlparse.urljoin("http://letitbit.net/", action), post=inputs) @@ -70,12 +70,12 @@ class LetitbitNet(SimpleHoster): m = re.search(self.SECONDS_PATTERN, self.html) seconds = int(m.group(1)) if m else 60 - self.logDebug("Seconds found", seconds) + self.log_debug("Seconds found", seconds) m = re.search(self.CAPTCHA_CONTROL_FIELD, self.html) recaptcha_control_field = m.group(1) - self.logDebug("ReCaptcha control field found", recaptcha_control_field) + self.log_debug("ReCaptcha control field found", recaptcha_control_field) self.wait(seconds) @@ -83,7 +83,7 @@ class LetitbitNet(SimpleHoster): if res != '1': self.error(_("Unknown response - ajax_check_url")) - self.logDebug(res) + self.log_debug(res) recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge() @@ -92,21 +92,21 @@ class LetitbitNet(SimpleHoster): "recaptcha_response_field": response, "recaptcha_control_field": recaptcha_control_field} - self.logDebug("Post data to send", post_data) + self.log_debug("Post data to send", post_data) res = self.load("http://letitbit.net/ajax/check_recaptcha.php", post=post_data) - self.logDebug(res) + self.log_debug(res) if not res: - self.invalidCaptcha() + self.invalid_captcha() if res == "error_free_download_blocked": - self.logWarning(_("Daily limit reached")) - self.wait(secondsToMidnight(gmt=2), True) + self.log_warning(_("Daily limit reached")) + self.wait(seconds_to_midnight(gmt=2), True) if res == "error_wrong_captcha": - self.invalidCaptcha() + self.invalid_captcha() self.retry() elif res.startswith('['): @@ -121,13 +121,13 @@ class LetitbitNet(SimpleHoster): self.link = urls[0] - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): api_key = self.user premium_key = self.account.getAccountData(self.user)['password'] json_data = [api_key, ["download/direct_links", {"pass": premium_key, "link": pyfile.url}]] api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}) - self.logDebug("API Data: " + api_rep) + self.log_debug("API Data: " + api_rep) api_rep = json_loads(api_rep) if api_rep['status'] == 'FAIL': diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py index f7bdef0dd..19cad7b97 100644 --- a/module/plugins/hoster/LinksnappyCom.py +++ b/module/plugins/hoster/LinksnappyCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class LinksnappyCom(MultiHoster): __name__ = "LinksnappyCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'https?://(?:[^/]+\.)?linksnappy\.com' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -24,7 +24,7 @@ class LinksnappyCom(MultiHoster): SINGLE_CHUNK_HOSTERS = ["easybytez.com"] - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): host = self._get_host(pyfile.url) json_params = json_dumps({'link' : pyfile.url, 'type' : host, @@ -34,7 +34,7 @@ class LinksnappyCom(MultiHoster): r = self.load("http://gen.linksnappy.com/genAPI.php", post={'genLinks': json_params}) - self.logDebug("JSON data: " + r) + self.log_debug("JSON data: " + r) j = json_loads(r)['links'][0] @@ -45,7 +45,7 @@ class LinksnappyCom(MultiHoster): self.link = j['generated'] if host in self.SINGLE_CHUNK_HOSTERS: - self.chunkLimit = 1 + self.chunk_limit = 1 else: self.setup() diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index e974b9f3d..5c276ff38 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.24" + __version__ = "0.25" __pattern__ = r'http://(?:www\.)?load\.to/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -35,11 +35,11 @@ class LoadTo(SimpleHoster): def setup(self): - self.multiDL = True - self.chunkLimit = 1 + self.multi_dl = True + self.chunk_limit = 1 - def handleFree(self, pyfile): + def handle_free(self, pyfile): #: Search for Download URL m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: diff --git a/module/plugins/hoster/LolabitsEs.py b/module/plugins/hoster/LolabitsEs.py index 08773888b..e5656b6a0 100644 --- a/module/plugins/hoster/LolabitsEs.py +++ b/module/plugins/hoster/LolabitsEs.py @@ -9,7 +9,7 @@ from module.utils import html_unescape class LolabitsEs(SimpleHoster): __name__ = "LolabitsEs" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?lolabits\.es/.+' @@ -28,15 +28,15 @@ class LolabitsEs(SimpleHoster): def setup(self): - self.chunkLimit = 1 + self.chunk_limit = 1 - def handleFree(self, pyfile): + def handle_free(self, pyfile): fileid = re.search(self.FILEID_PATTERN, self.html).group(1) - self.logDebug("FileID: " + fileid) + self.log_debug("FileID: " + fileid) token = re.search(self.TOKEN_PATTERN, self.html).group(1) - self.logDebug("Token: " + token) + self.log_debug("Token: " + token) self.html = self.load("http://lolabits.es/action/License/Download", post={'fileId' : fileid, diff --git a/module/plugins/hoster/LomafileCom.py b/module/plugins/hoster/LomafileCom.py index ef05cd1ea..67cb32608 100644 --- a/module/plugins/hoster/LomafileCom.py +++ b/module/plugins/hoster/LomafileCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class LomafileCom(DeadHoster): __name__ = "LomafileCom" __type__ = "hoster" - __version__ = "0.52" + __version__ = "0.53" __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 c08203346..ec5e87f12 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LuckyShareNet(SimpleHoster): __name__ = "LuckyShareNet" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P\d{10,})' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -25,13 +25,13 @@ class LuckyShareNet(SimpleHoster): OFFLINE_PATTERN = r'There is no such file available' - def parseJson(self, rep): + def parse_json(self, rep): if 'AJAX Error' in rep: html = self.load(self.pyfile.url) m = re.search(r"waitingtime = (\d+);", html) if m: seconds = int(m.group(1)) - self.logDebug("You have to wait %d seconds between free downloads" % seconds) + self.log_debug("You have to wait %d seconds between free downloads" % seconds) self.retry(wait_time=seconds) else: self.error(_("Unable to detect wait time between free downloads")) @@ -42,12 +42,12 @@ class LuckyShareNet(SimpleHoster): #@TODO: There should be a filesize limit for free downloads # Some files could not be downloaded in free mode - def handleFree(self, pyfile): + def handle_free(self, pyfile): rep = self.load(r"http://luckyshare.net/download/request/type/time/file/" + self.info['pattern']['ID']) - self.logDebug("JSON: " + rep) + self.log_debug("JSON: " + rep) - json = self.parseJson(rep) + json = self.parse_json(rep) self.wait(json['time']) recaptcha = ReCaptcha(self) @@ -56,13 +56,13 @@ class LuckyShareNet(SimpleHoster): response, challenge = recaptcha.challenge() rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" % (challenge, response, json['hash'])) - self.logDebug("JSON: " + rep) + self.log_debug("JSON: " + rep) if 'link' in rep: - json.update(self.parseJson(rep)) - self.correctCaptcha() + json.update(self.parse_json(rep)) + self.correct_captcha() break elif 'Verification failed' in rep: - self.invalidCaptcha() + self.invalid_captcha() else: self.error(_("Unable to get downlaod link")) diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 56f13362a..b1a7477e1 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.89" + __version__ = "0.90" __pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)(?P\w{15})' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -31,11 +31,11 @@ class MediafireCom(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = True + self.resume_download = True + self.multi_dl = True - def handleCaptcha(self): + def handle_captcha(self): solvemedia = SolveMedia(self) captcha_key = solvemedia.detect_key() @@ -55,22 +55,22 @@ class MediafireCom(SimpleHoster): post={'g-recaptcha-response': response}) - def handleFree(self, pyfile): - self.handleCaptcha() + def handle_free(self, pyfile): + self.handle_captcha() if self.PASSWORD_PATTERN in self.html: - password = self.getPassword() + password = self.get_password() if not password: self.fail(_("No password found")) else: - self.logInfo(_("Password protected link, trying: ") + password) + self.log_info(_("Password protected link, trying: ") + password) self.html = self.load(self.link, post={'downloadp': password}) if self.PASSWORD_PATTERN in self.html: self.fail(_("Incorrect password")) - return super(MediafireCom, self).handleFree(pyfile) + return super(MediafireCom, self).handle_free(pyfile) getInfo = create_getInfo(MediafireCom) diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index 2e6dcfda6..411c12c4a 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -48,7 +48,7 @@ from module.utils import decode, fs_decode, fs_encode class MegaCoNz(Hoster): __name__ = "MegaCoNz" __type__ = "hoster" - __version__ = "0.30" + __version__ = "0.31" __pattern__ = r'(https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#(?PN|)!(?P[\w^_]+)!(?P[\w,-]+)' @@ -67,7 +67,7 @@ class MegaCoNz(Hoster): return standard_b64decode(data + '=' * (-len(data) % 4)) - def getCipherKey(self, key): + def get_cipher_key(self, key): """ Construct the cipher key from the given data """ @@ -88,16 +88,16 @@ class MegaCoNz(Hoster): uid = random.randint(10 << 9, 10 ** 10) res = self.load(self.API_URL, get={'id': uid}, post=json_dumps([kwargs])) - self.logDebug("Api Response: " + res) + self.log_debug("Api Response: " + res) return json_loads(res) - def decryptAttr(self, data, key): - k, iv, meta_mac = self.getCipherKey(key) + def decrypt_attr(self, data, key): + k, iv, meta_mac = self.get_cipher_key(key) cbc = AES.new(k, AES.MODE_CBC, "\0" * 16) attr = decode(cbc.decrypt(self.b64_decode(data))) - self.logDebug("Decrypted Attr: %s" % attr) + self.log_debug("Decrypted Attr: %s" % attr) if not attr.startswith("MEGA"): self.fail(_("Decryption failed")) @@ -105,7 +105,7 @@ class MegaCoNz(Hoster): return json_loads(re.search(r'{.+?}', attr).group(0)) - def decryptFile(self, key): + def decrypt_file(self, key): """ Decrypts the file at lastDownload` """ @@ -113,14 +113,14 @@ class MegaCoNz(Hoster): n = self.b64_decode(key)[16:24] #: convert counter to long and shift bytes - k, iv, meta_mac = self.getCipherKey(key) + k, iv, meta_mac = self.get_cipher_key(key) ctr = Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) cipher = AES.new(k, AES.MODE_CTR, counter=ctr) self.pyfile.setStatus("decrypting") self.pyfile.setProgress(0) - file_crypted = fs_encode(self.lastDownload) + file_crypted = fs_encode(self.last_download) file_decrypted = file_crypted.rsplit(self.FILE_SUFFIX)[0] try: @@ -167,17 +167,17 @@ class MegaCoNz(Hoster): #: self.fail(_("Checksum mismatch")) os.remove(file_crypted) - self.lastDownload = fs_decode(file_decrypted) + self.last_download = fs_decode(file_decrypted) - def checkError(self, code): + def check_error(self, code): ecode = abs(code) if ecode in (9, 16, 21): self.offline() elif ecode in (3, 13, 17, 18, 19): - self.tempOffline() + self.temp_offline() elif ecode in (1, 4, 6, 10, 15, 21): self.retry(5, 30, _("Error code: [%s]") % -ecode) @@ -192,7 +192,7 @@ class MegaCoNz(Hoster): key = pattern['KEY'] public = pattern['TYPE'] == '' - self.logDebug("ID: %s" % id, "Key: %s" % key, "Type: %s" % ("public" if public else "node")) + self.log_debug("ID: %s" % id, "Key: %s" % key, "Type: %s" % ("public" if public else "node")) #: g is for requesting a download url #: this is similar to the calls in the mega js app, documentation is very bad @@ -202,11 +202,11 @@ class MegaCoNz(Hoster): mega = self.api_response(a="g", g=1, n=id, ssl=1)[0] if isinstance(mega, int): - self.checkError(mega) + self.check_error(mega) elif "e" in mega: - self.checkError(mega['e']) + self.check_error(mega['e']) - attr = self.decryptAttr(mega['at'], key) + attr = self.decrypt_attr(mega['at'], key) pyfile.name = attr['n'] + self.FILE_SUFFIX pyfile.size = mega['s'] @@ -215,7 +215,7 @@ class MegaCoNz(Hoster): self.download(mega['g']) - self.decryptFile(key) + self.decrypt_file(key) #: Everything is finished and final name can be set pyfile.name = attr['n'] diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py index e4a002f9b..67c8f087b 100644 --- a/module/plugins/hoster/MegaDebridEu.py +++ b/module/plugins/hoster/MegaDebridEu.py @@ -10,7 +10,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class MegaDebridEu(MultiHoster): __name__ = "MegaDebridEu" __type__ = "hoster" - __version__ = "0.48" + __version__ = "0.49" __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^_]+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -41,7 +41,7 @@ class MegaDebridEu(MultiHoster): return False - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): """ Debrid a link Return The debrided link if succeed or original link if fail diff --git a/module/plugins/hoster/MegaFilesSe.py b/module/plugins/hoster/MegaFilesSe.py index 249eff952..f592c940b 100644 --- a/module/plugins/hoster/MegaFilesSe.py +++ b/module/plugins/hoster/MegaFilesSe.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class MegaFilesSe(DeadHoster): __name__ = "MegaFilesSe" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 ed6e0a3ad..e00efc1a9 100644 --- a/module/plugins/hoster/MegaRapidCz.py +++ b/module/plugins/hoster/MegaRapidCz.py @@ -8,7 +8,7 @@ from module.network.RequestFactory import getRequest from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo -def getInfo(urls): +def get_info(urls): h = getRequest() h.c.setopt(pycurl.HTTPHEADER, ["Accept: text/html", @@ -22,7 +22,7 @@ def getInfo(urls): class MegaRapidCz(SimpleHoster): __name__ = "MegaRapidCz" __type__ = "hoster" - __version__ = "0.56" + __version__ = "0.57" __pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/soubor/\d+/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -48,10 +48,10 @@ class MegaRapidCz(SimpleHoster): def setup(self): - self.chunkLimit = 1 + self.chunk_limit = 1 - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): m = re.search(self.LINK_PREMIUM_PATTERN, self.html) if m: self.link = m.group(1) diff --git a/module/plugins/hoster/MegaRapidoNet.py b/module/plugins/hoster/MegaRapidoNet.py index 4b0465e44..cc5be0ea3 100644 --- a/module/plugins/hoster/MegaRapidoNet.py +++ b/module/plugins/hoster/MegaRapidoNet.py @@ -5,7 +5,7 @@ import random from module.plugins.internal.MultiHoster import MultiHoster -def random_with_N_digits(n): +def random_with_n_digits(n): rand = "0." not_zero = 0 for i in xrange(1, n + 1): @@ -23,7 +23,7 @@ def random_with_N_digits(n): class MegaRapidoNet(MultiHoster): __name__ = "MegaRapidoNet" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?\w+\.megarapido\.net/\?file=\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -39,7 +39,7 @@ class MegaRapidoNet(MultiHoster): ERROR_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?["\']?alert-message error.*?>([^<]*)' - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): self.html = self.load("http://megarapido.net/gerar.php", post={'rand' :random_with_N_digits(16), 'urllist' : pyfile.url, @@ -52,4 +52,4 @@ class MegaRapidoNet(MultiHoster): if "desloga e loga novamente para gerar seus links" in self.html.lower(): self.error("You have logged in at another place") - return super(MegaRapidoNet, self).handlePremium(pyfile) + return super(MegaRapidoNet, self).handle_premium(pyfile) diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py index 27c3c7253..7152a1cbc 100644 --- a/module/plugins/hoster/MegacrypterCom.py +++ b/module/plugins/hoster/MegacrypterCom.py @@ -10,7 +10,7 @@ from module.plugins.hoster.MegaCoNz import MegaCoNz class MegacrypterCom(MegaCoNz): __name__ = "MegacrypterCom" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __pattern__ = r'https?://\w{0,10}\.?megacrypter\.com/[\w!-]+' @@ -27,9 +27,9 @@ class MegacrypterCom(MegaCoNz): """ Dispatch a call to the api, see megacrypter.com/api_doc """ - self.logDebug("JSON request: " + json_dumps(kwargs)) + self.log_debug("JSON request: " + json_dumps(kwargs)) res = self.load(self.API_URL, post=json_dumps(kwargs)) - self.logDebug("API Response: " + res) + self.log_debug("API Response: " + res) return json_loads(res) @@ -53,7 +53,7 @@ class MegacrypterCom(MegaCoNz): self.download(dl['url']) - self.decryptFile(key) + self.decrypt_file(key) #: Everything is finished and final name can be set pyfile.name = info['name'] diff --git a/module/plugins/hoster/MegareleaseOrg.py b/module/plugins/hoster/MegareleaseOrg.py index 6349144ec..5273a1d5e 100644 --- a/module/plugins/hoster/MegareleaseOrg.py +++ b/module/plugins/hoster/MegareleaseOrg.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class MegareleaseOrg(DeadHoster): __name__ = "MegareleaseOrg" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __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 0c74e380d..34ed8bf8b 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.28" + __version__ = "0.29" __pattern__ = r'http://(?:www\.)?(d\d{2}\.)?megashares\.com/((index\.php)?\?d\d{2}=|dl/)\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -35,15 +35,15 @@ class MegasharesCom(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = self.premium + self.resume_download = True + self.multi_dl = self.premium - def handlePremium(self, pyfile): - self.handleDownload(True) + def handle_premium(self, pyfile): + self.handle_download(True) - def handleFree(self, pyfile): + def handle_free(self, pyfile): if self.NO_SLOTS_PATTERN in self.html: self.retry(wait_time=5 * 60) @@ -55,10 +55,10 @@ class MegasharesCom(SimpleHoster): for _i in xrange(5): random_num = re.search(self.REACTIVATE_NUM_PATTERN, self.html).group(1) - verifyinput = self.decryptCaptcha("http://d01.megashares.com/index.php", + verifyinput = self.decrypt_captcha("http://d01.megashares.com/index.php", get={'secgfx': "gfx", 'random_num': random_num}) - self.logInfo(_("Reactivating passport %s: %s %s") % (passport_num, random_num, verifyinput)) + self.log_info(_("Reactivating passport %s: %s %s") % (passport_num, random_num, verifyinput)) res = self.load("http://d01.megashares.com%s" % request_uri, get={'rs' : "check_passport_renewal", @@ -69,10 +69,10 @@ class MegasharesCom(SimpleHoster): 'rsrnd[]' : str(int(time.time() * 1000))}) if 'Thank you for reactivating your passport.' in res: - self.correctCaptcha() + self.correct_captcha() self.retry() else: - self.invalidCaptcha() + self.invalid_captcha() else: self.fail(_("Failed to reactivate passport")) @@ -80,7 +80,7 @@ class MegasharesCom(SimpleHoster): if m: time = [int(x) for x in m.groups()] renew = time[0] + (time[1] * 60) + (time[2] * 60) - self.logDebug("Waiting %d seconds for a new passport" % renew) + self.log_debug("Waiting %d seconds for a new passport" % renew) self.retry(wait_time=renew, reason=_("Passport renewal")) #: Check traffic left on passport @@ -88,17 +88,17 @@ class MegasharesCom(SimpleHoster): if m is None: self.fail(_("Passport not found")) - self.logInfo(_("Download passport: %s") % m.group(1)) + self.log_info(_("Download passport: %s") % m.group(1)) data_left = float(m.group(2)) * 1024 ** {'B': 0, 'KB': 1, 'MB': 2, 'GB': 3}[m.group(3)] - self.logInfo(_("Data left: %s %s (%d MB needed)") % (m.group(2), m.group(3), self.pyfile.size / 1048576)) + self.log_info(_("Data left: %s %s (%d MB needed)") % (m.group(2), m.group(3), self.pyfile.size / 1048576)) if not data_left: self.retry(wait_time=600, reason=_("Passport renewal")) - self.handleDownload(False) + self.handle_download(False) - def handleDownload(self, premium=False): + def handle_download(self, premium=False): #: Find download link m = re.search(self.LINK_PATTERN % (1 if premium else 2), self.html) msg = _('%s download URL' % ('Premium' if premium else 'Free')) @@ -106,7 +106,7 @@ class MegasharesCom(SimpleHoster): self.error(msg) self.link = m.group(1) - self.logDebug("%s: %s" % (msg, self.link)) + self.log_debug("%s: %s" % (msg, self.link)) getInfo = create_getInfo(MegasharesCom) diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index 590819f7f..b2f177dd6 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class MegauploadCom(DeadHoster): __name__ = "MegauploadCom" __type__ = "hoster" - __version__ = "0.31" + __version__ = "0.32" __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 accd079fc..c2051703f 100644 --- a/module/plugins/hoster/MegavideoCom.py +++ b/module/plugins/hoster/MegavideoCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class MegavideoCom(DeadHoster): __name__ = "MegavideoCom" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" __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 2fe5184ae..c7de30841 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.24" + __version__ = "1.25" __pattern__ = r'http://(?:www\.)?movreel\.com/\w{12}' diff --git a/module/plugins/hoster/MultihostersCom.py b/module/plugins/hoster/MultihostersCom.py index bcd7c6237..97894030d 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.03" + __version__ = "0.04" __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 2a5031f08..1f6ed4334 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.40" + __version__ = "0.41" __pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P\d+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -28,20 +28,20 @@ class MultishareCz(SimpleHoster): OFFLINE_PATTERN = ur'

    Stáhnout soubor

    Požadovaný soubor neexistuje.

    ' - def handleFree(self, pyfile): + def handle_free(self, pyfile): self.download("http://www.multishare.cz/html/download_free.php", get={'ID': self.info['pattern']['ID']}) - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): self.download("http://www.multishare.cz/html/download_premium.php", get={'ID': self.info['pattern']['ID']}) - def handleMulti(self, pyfile): + def handle_multi(self, pyfile): self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={"link": pyfile.url}) - self.checkInfo() + self.check_info() - if not self.checkTrafficLeft(): + if not self.check_traffic_left(): self.fail(_("Not enough credit left to download file")) self.download("http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random.random() * 10000 * random.random()), diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 1211a532f..f68bfab18 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class MyfastfileCom(MultiHoster): __name__ = "MyfastfileCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -21,14 +21,14 @@ class MyfastfileCom(MultiHoster): def setup(self): - self.chunkLimit = -1 + self.chunk_limit = -1 - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): self.html = self.load('http://myfastfile.com/api.php', get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'], 'link': pyfile.url}) - self.logDebug("JSON data: " + self.html) + self.log_debug("JSON data: " + self.html) self.html = json_loads(self.html) if self.html['status'] != 'ok': diff --git a/module/plugins/hoster/MystoreTo.py b/module/plugins/hoster/MystoreTo.py index 531368134..1609abf7e 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.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?mystore\.to/dl/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -27,12 +27,12 @@ class MystoreTo(SimpleHoster): def setup(self): - self.chunkLimit = 1 - self.resumeDownload = True - self.multiDL = True + self.chunk_limit = 1 + self.resume_download = True + self.multi_dl = True - def handleFree(self, pyfile): + def handle_free(self, pyfile): try: fid = re.search(r'wert="(.+?)"', self.html).group(1) diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py index 2194069f5..ce43c0764 100644 --- a/module/plugins/hoster/MyvideoDe.py +++ b/module/plugins/hoster/MyvideoDe.py @@ -9,7 +9,7 @@ from module.utils import html_unescape class MyvideoDe(Hoster): __name__ = "MyvideoDe" __type__ = "hoster" - __version__ = "0.91" + __version__ = "0.92" __pattern__ = r'http://(?:www\.)?myvideo\.de/watch/' diff --git a/module/plugins/hoster/NahrajCz.py b/module/plugins/hoster/NahrajCz.py index cf708be09..c463fbcfb 100644 --- a/module/plugins/hoster/NahrajCz.py +++ b/module/plugins/hoster/NahrajCz.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class NahrajCz(DeadHoster): __name__ = "NahrajCz" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" __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 0a44cd6eb..3c3b0d124 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.12" + __version__ = "0.13" __pattern__ = r'http://(?:www\.)?narod(\.yandex)?\.ru/(disk|start/\d+\.\w+-narod\.yandex\.ru)/(?P\d+)/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -32,7 +32,7 @@ class NarodRu(SimpleHoster): LINK_FREE_PATTERN = r'
    ' - def handleFree(self, pyfile): + def handle_free(self, pyfile): for _i in xrange(5): self.html = self.load('http://narod.ru/disk/getcapchaxml/?rnd=%d' % int(random.random() * 777)) @@ -42,18 +42,18 @@ class NarodRu(SimpleHoster): post_data = {"action": "sendcapcha"} captcha_url, post_data['key'] = m.groups() - post_data['rep'] = self.decryptCaptcha(captcha_url) + post_data['rep'] = self.decrypt_captcha(captcha_url) self.html = self.load(pyfile.url, post=post_data) m = re.search(self.LINK_FREE_PATTERN, self.html) if m: self.link = urlparse.urljoin("http://narod.ru", m.group(1)) - self.correctCaptcha() + self.correct_captcha() break elif u'Ошиблись?' in self.html: - self.invalidCaptcha() + self.invalid_captcha() else: self.error(_("Download link")) diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 82f5c22fb..208b8fb6a 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class NetloadIn(DeadHoster): __name__ = "NetloadIn" __type__ = "hoster" - __version__ = "0.50" + __version__ = "0.51" __pattern__ = r'https?://(?:www\.)?netload\.(in|me)/(?Pdatei|index\.php\?id=10&file_id=)(?P\w+)' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py index efd54dd62..f60a9c2e2 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.14" + __version__ = "0.15" __pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P[\w^_]+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -31,7 +31,7 @@ class NitroflareCom(SimpleHoster): # ERROR_PATTERN = r'downloading is not possible' - def handleFree(self, pyfile): + def handle_free(self, pyfile): #: used here to load the cookies which will be required later self.load(pyfile.url, post={'goToFreePage': ""}) @@ -39,7 +39,7 @@ class NitroflareCom(SimpleHoster): self.html = self.load("http://nitroflare.com/ajax/freeDownload.php", post={'method': "startTimer", 'fileId': self.info['pattern']['ID']}) - self.checkErrors() + self.check_errors() try: js_file = self.load("http://nitroflare.com/js/downloadFree.js?v=1.0.1") @@ -59,4 +59,4 @@ class NitroflareCom(SimpleHoster): 'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) - return super(NitroflareCom, self).handleFree(pyfile) + return super(NitroflareCom, self).handle_free(pyfile) diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index e300194a6..9e935cd08 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class NoPremiumPl(MultiHoster): __name__ = "NoPremiumPl" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://direct\.nopremium\.pl.+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -44,7 +44,7 @@ class NoPremiumPl(MultiHoster): self.pwd = data['pwd'] - def runFileQuery(self, url, mode=None): + def run_file_query(self, url, mode=None): query = self.API_QUERY.copy() query['username'] = self.usr @@ -55,27 +55,27 @@ class NoPremiumPl(MultiHoster): query['check'] = 2 query['loc'] = 1 - self.logDebug(query) + self.log_debug(query) return self.load(self.API_URL, post=query) - def handleFree(self, pyfile): + def handle_free(self, pyfile): try: - data = self.runFileQuery(pyfile.url, 'fileinfo') + data = self.run_file_query(pyfile.url, 'fileinfo') except Exception: - self.logDebug("runFileQuery error") - self.tempOffline() + self.log_debug("runFileQuery error") + self.temp_offline() try: parsed = json_loads(data) except Exception: - self.logDebug("loads error") - self.tempOffline() + self.log_debug("loads error") + self.temp_offline() - self.logDebug(parsed) + self.log_debug(parsed) if "errno" in parsed.keys(): if parsed['errno'] in self.ERROR_CODES: @@ -98,8 +98,8 @@ class NoPremiumPl(MultiHoster): pyfile.size = parsed['filesize'] try: - self.link = self.runFileQuery(pyfile.url, 'filedownload') + self.link = self.run_file_query(pyfile.url, 'filedownload') except Exception: - self.logDebug("runFileQuery error #2") - self.tempOffline() + self.log_debug("runFileQuery error #2") + self.temp_offline() diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py index 4f3f34ddb..922fd7654 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.31" + __version__ = "0.32" __pattern__ = r'http://(?:www\.)?nosupload\.com/\?d=\w{12}' @@ -23,15 +23,15 @@ class NosuploadCom(XFSHoster): WAIT_PATTERN = r'Please wait.*?>(\d+)' - def getDownloadLink(self): + def get_download_link(self): #: stage1: press the "Free Download" button - data = self.getPostParameters() + data = self.get_post_parameters() self.html = self.load(self.pyfile.url, post=data) #: stage2: wait some time and press the "Download File" button - data = self.getPostParameters() + data = self.get_post_parameters() wait_time = re.search(self.WAIT_PATTERN, self.html, re.M | re.S).group(1) - self.logDebug("Hoster told us to wait %s seconds" % wait_time) + self.log_debug("Hoster told us to wait %s seconds" % wait_time) self.wait(wait_time) self.html = self.load(self.pyfile.url, post=data) diff --git a/module/plugins/hoster/NovafileCom.py b/module/plugins/hoster/NovafileCom.py index b00f71635..8de511ed5 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.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?novafile\.com/\w{12}' diff --git a/module/plugins/hoster/NowDownloadSx.py b/module/plugins/hoster/NowDownloadSx.py index 7be699ae4..ef43c7c94 100644 --- a/module/plugins/hoster/NowDownloadSx.py +++ b/module/plugins/hoster/NowDownloadSx.py @@ -9,7 +9,7 @@ from module.utils import fixup class NowDownloadSx(SimpleHoster): __name__ = "NowDownloadSx" __type__ = "hoster" - __version__ = "0.10" + __version__ = "0.11" __pattern__ = r'http://(?:www\.)?(nowdownload\.[a-zA-Z]{2,}/(dl/|download\.php.+?id=|mobile/(#/files/|.+?id=))|likeupload\.org/)\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -32,12 +32,12 @@ class NowDownloadSx(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = True - self.chunkLimit = -1 + self.resume_download = True + self.multi_dl = True + self.chunk_limit = -1 - def handleFree(self, pyfile): + def handle_free(self, pyfile): tokenlink = re.search(self.TOKEN_PATTERN, self.html) continuelink = re.search(self.CONTINUE_PATTERN, self.html) if tokenlink is None or continuelink is None: diff --git a/module/plugins/hoster/NowVideoSx.py b/module/plugins/hoster/NowVideoSx.py index 477379597..849a35edd 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.12" + __version__ = "0.13" __pattern__ = r'http://(?:www\.)?nowvideo\.[a-zA-Z]{2,}/(video/|mobile/(#/videos/|.+?id=))(?P\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -28,11 +28,11 @@ class NowVideoSx(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = True + self.resume_download = True + self.multi_dl = True - def handleFree(self, pyfile): + def handle_free(self, pyfile): self.html = self.load("http://www.nowvideo.sx/mobile/video.php", get={'id': self.info['pattern']['ID']}) m = re.search(self.LINK_FREE_PATTERN, self.html) diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index 4f845394a..fb42243c5 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -13,7 +13,7 @@ from module.plugins.internal.ReCaptcha import ReCaptcha class OboomCom(Hoster): __name__ = "OboomCom" __type__ = "hoster" - __version__ = "0.34" + __version__ = "0.35" __pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P\w{8})' @@ -26,52 +26,52 @@ class OboomCom(Hoster): def setup(self): - self.chunkLimit = 1 - self.multiDL = self.resumeDownload = self.premium + self.chunk_limit = 1 + self.multi_dl = self.resume_download = self.premium def process(self, pyfile): self.pyfile.url.replace(".com/#id=", ".com/#") self.pyfile.url.replace(".com/#/", ".com/#") self.html = self.load(pyfile.url) - self.getFileId(self.pyfile.url) - self.getSessionToken() - self.getFileInfo(self.sessionToken, self.fileId) - self.pyfile.name = self.fileName - self.pyfile.size = self.fileSize + self.get_file_id(self.pyfile.url) + self.get_session_token() + self.getFileInfo(self.session_token, self.file_id) + self.pyfile.name = self.file_name + self.pyfile.size = self.file_size if not self.premium: - self.solveCaptcha() - self.getDownloadTicket() - self.download("https://%s/1.0/dlh" % self.downloadDomain, get={"ticket": self.downloadTicket, "http_errors": 0}) + self.solve_captcha() + self.get_download_ticket() + self.download("https://%s/1.0/dlh" % self.download_domain, get={"ticket": self.download_ticket, "http_errors": 0}) - def loadUrl(self, url, get=None): + def load_url(self, url, get=None): if get is None: get = dict() return json_loads(self.load(url, get)) - def getFileId(self, url): - self.fileId = re.match(OboomCom.__pattern__, url).group('ID') + def get_file_id(self, url): + self.file_id = re.match(OboomCom.__pattern__, url).group('ID') - def getSessionToken(self): + def get_session_token(self): if self.premium: accountInfo = self.account.getAccountInfo(self.user, True) if "session" in accountInfo: - self.sessionToken = accountInfo['session'] + self.session_token = accountInfo['session'] else: self.fail(_("Could not retrieve premium session")) else: apiUrl = "https://www.oboom.com/1.0/guestsession" - result = self.loadUrl(apiUrl) + result = self.load_url(apiUrl) if result[0] == 200: - self.sessionToken = result[1] + self.session_token = result[1] else: self.fail(_("Could not retrieve token for guest session. Error code: %s") % result[0]) - def solveCaptcha(self): + def solve_captcha(self): recaptcha = ReCaptcha(self) for _i in xrange(5): @@ -79,35 +79,35 @@ class OboomCom(Hoster): apiUrl = "https://www.oboom.com/1.0/download/ticket" params = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": response, - "download_id": self.fileId, - "token": self.sessionToken} - result = self.loadUrl(apiUrl, params) + "download_id": self.file_id, + "token": self.session_token} + result = self.load_url(apiUrl, params) if result[0] == 200: - self.downloadToken = result[1] - self.downloadAuth = result[2] - self.correctCaptcha() - self.setWait(30) + self.download_token = result[1] + self.download_auth = result[2] + self.correct_captcha() + self.set_wait(30) self.wait() break elif result[0] == 400: if result[1] == "incorrect-captcha-sol": - self.invalidCaptcha() + self.invalid_captcha() elif result[1] == "captcha-timeout": - self.invalidCaptcha() + self.invalid_captcha() elif result[1] == "forbidden": self.retry(5, 15 * 60, _("Service unavailable")) elif result[0] == 403: if result[1] == -1: #: another download is running - self.setWait(15 * 60) + self.set_wait(15 * 60) else: - self.setWait(result[1], True) + self.set_wait(result[1], True) self.wait() self.retry(5) else: - self.invalidCaptcha() + self.invalid_captcha() self.fail(_("Received invalid captcha 5 times")) @@ -115,31 +115,31 @@ class OboomCom(Hoster): apiUrl = "https://api.oboom.com/1.0/info" params = {"token": token, "items": fileId, "http_errors": 0} - result = self.loadUrl(apiUrl, params) + result = self.load_url(apiUrl, params) if result[0] == 200: item = result[1][0] if item['state'] == "online": - self.fileSize = item['size'] - self.fileName = item['name'] + self.file_size = item['size'] + self.file_name = item['name'] else: self.offline() else: self.fail(_("Could not retrieve file info. Error code %s: %s") % (result[0], result[1])) - def getDownloadTicket(self): + def get_download_ticket(self): apiUrl = "https://api.oboom.com/1/dl" - params = {"item": self.fileId, "http_errors": 0} + params = {"item": self.file_id, "http_errors": 0} if self.premium: - params['token'] = self.sessionToken + params['token'] = self.session_token else: - params['token'] = self.downloadToken - params['auth'] = self.downloadAuth + params['token'] = self.download_token + params['auth'] = self.download_auth - result = self.loadUrl(apiUrl, params) + result = self.load_url(apiUrl, params) if result[0] == 200: - self.downloadDomain = result[1] - self.downloadTicket = result[2] + self.download_domain = result[1] + self.download_ticket = result[2] elif result[0] == 421: self.retry(wait_time=result[2] + 60, reason=_("Connection limit exceeded")) else: diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 4b947c554..5ea400b8d 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" - __version__ = "0.84" + __version__ = "0.85" __pattern__ = r'https?://(?:www\.)?(?:(?P\w+)\.)?(?P1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?(?P\w+))?' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -36,26 +36,26 @@ class OneFichierCom(SimpleHoster): def setup(self): - self.multiDL = self.premium - self.resumeDownload = True + self.multi_dl = self.premium + self.resume_download = True - def handleFree(self, pyfile): + def handle_free(self, pyfile): id = self.info['pattern']['ID1'] or self.info['pattern']['ID2'] - url, inputs = self.parseHtmlForm('action="https://1fichier.com/\?%s' % id) + url, inputs = self.parse_html_form('action="https://1fichier.com/\?%s' % id) if not url: self.fail(_("Download link not found")) if "pass" in inputs: - inputs['pass'] = self.getPassword() + inputs['pass'] = self.get_password() inputs['submit'] = "Download" self.download(url, post=inputs) - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): self.download(pyfile.url, post={'dl': "Download", 'did': 0}) diff --git a/module/plugins/hoster/OpenloadIo.py b/module/plugins/hoster/OpenloadIo.py index 5a60b6787..fbdb95383 100644 --- a/module/plugins/hoster/OpenloadIo.py +++ b/module/plugins/hoster/OpenloadIo.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class OpenloadIo(SimpleHoster): __name__ = "OpenloadIo" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?openload\.io/f/\w{11}' @@ -20,7 +20,7 @@ class OpenloadIo(SimpleHoster): LINK_FREE_PATTERN = r'id="realdownload">= 500: - self.tempOffline() + self.temp_offline() else: self.fail(data['statusmessage']) diff --git a/module/plugins/hoster/PromptfileCom.py b/module/plugins/hoster/PromptfileCom.py index c6878cbb0..ddfce8e19 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.13" + __version__ = "0.14" __pattern__ = r'https?://(?:www\.)?promptfile\.com/' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -25,20 +25,20 @@ class PromptfileCom(SimpleHoster): LINK_FREE_PATTERN = r'Download File' - def handleFree(self, pyfile): + def handle_free(self, pyfile): # STAGE 1: get link to continue m = re.search(self.CHASH_PATTERN, self.html) if m is None: self.error(_("CHASH_PATTERN not found")) chash = m.group(1) - self.logDebug("Read chash %s" % chash) + self.log_debug("Read chash %s" % chash) #: continue to stage2 self.html = self.load(pyfile.url, post={'chash': chash}) # STAGE 2: get the direct link - return super(PromptfileCom, self).handleFree(pyfile) + return super(PromptfileCom, self).handle_free(pyfile) getInfo = create_getInfo(PromptfileCom) diff --git a/module/plugins/hoster/PrzeklejPl.py b/module/plugins/hoster/PrzeklejPl.py index e984d0033..591428757 100644 --- a/module/plugins/hoster/PrzeklejPl.py +++ b/module/plugins/hoster/PrzeklejPl.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class PrzeklejPl(DeadHoster): __name__ = "PrzeklejPl" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __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 7f4b7b6cc..a04b43cdb 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.02" + __version__ = "0.03" __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 26bb1e2df..e9cfdb085 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.56" + __version__ = "0.57" __pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -30,34 +30,34 @@ class QuickshareCz(SimpleHoster): #: parse js variables self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'.+?')", self.html)) - self.logDebug(self.jsvars) + self.log_debug(self.jsvars) pyfile.name = self.jsvars['ID3'] #: determine download type - free or premium if self.premium: if 'UU_prihlasen' in self.jsvars: if self.jsvars['UU_prihlasen'] == '0': - self.logWarning(_("User not logged in")) + self.log_warning(_("User not logged in")) self.relogin(self.user) self.retry() elif float(self.jsvars['UU_kredit']) < float(self.jsvars['kredit_odecet']): - self.logWarning(_("Not enough credit left")) + self.log_warning(_("Not enough credit left")) self.premium = False if self.premium: - self.handlePremium(pyfile) + self.handle_premium(pyfile) else: - self.handleFree(pyfile) + self.handle_free(pyfile) - if self.checkDownload({"error": re.compile(r"\AChyba!")}, max_size=100): + if self.check_download({"error": re.compile(r"\AChyba!")}, max_size=100): self.fail(_("File not m or plugin defect")) - def handleFree(self, pyfile): + def handle_free(self, pyfile): #: get download url download_url = '%s/download.php' % self.jsvars['server'] data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID3", "ID4")) - self.logDebug("FREE URL1:" + download_url, data) + self.log_debug("FREE URL1:" + download_url, data) self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) self.load(download_url, post=data) @@ -69,7 +69,7 @@ class QuickshareCz(SimpleHoster): self.fail(_("File not found")) self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 - self.logDebug("FREE URL2:" + self.link) + self.log_debug("FREE URL2:" + self.link) #: check errors m = re.search(r'/chyba/(\d+)', self.link) @@ -82,7 +82,7 @@ class QuickshareCz(SimpleHoster): self.fail(_("Error %d") % m.group(1)) - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): download_url = '%s/download_premium.php' % self.jsvars['server'] data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID4", "ID5")) self.download(download_url, get=data) diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py index 2e6271ac6..a548e1670 100644 --- a/module/plugins/hoster/RPNetBiz.py +++ b/module/plugins/hoster/RPNetBiz.py @@ -9,7 +9,7 @@ from module.common.json_layer import json_loads class RPNetBiz(MultiHoster): __name__ = "RPNetBiz" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'https?://.+rpnet\.biz' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -21,10 +21,10 @@ class RPNetBiz(MultiHoster): def setup(self): - self.chunkLimit = -1 + self.chunk_limit = -1 - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): user, data = self.account.selectAccount() #: Get the download link @@ -34,36 +34,36 @@ class RPNetBiz(MultiHoster): "action" : "generate", "links" : pyfile.url}) - self.logDebug("JSON data: %s" % res) + self.log_debug("JSON data: %s" % res) 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: - self.logDebug("Need to wait at least 30 seconds before requery") - self.setWait(30) #: wait for 30 seconds + self.log_debug("Need to wait at least 30 seconds before requery") + self.set_wait(30) #: wait for 30 seconds self.wait() #: Lets query the server again asking for the status on the link, #: we need to keep doing this until we reach 100 max_tries = 30 my_try = 0 while (my_try <= max_tries): - self.logDebug("Try: %d ; Max Tries: %d" % (my_try, max_tries)) + self.log_debug("Try: %d ; Max Tries: %d" % (my_try, max_tries)) res = self.load("https://premium.rpnet.biz/client_api.php", get={"username": user, "password": data['password'], "action": "downloadInformation", "id": link_status['id']}) - self.logDebug("JSON data hdd query: %s" % res) + self.log_debug("JSON data hdd query: %s" % res) download_status = json_loads(res)['download'] if download_status['status'] == '100': link_status['generated'] = download_status['rpnet_link'] - self.logDebug("Successfully downloaded to rpnet HDD: %s" % link_status['generated']) + self.log_debug("Successfully downloaded to rpnet HDD: %s" % link_status['generated']) break else: - self.logDebug("At %s%% for the file download" % download_status['status']) + self.log_debug("At %s%% for the file download" % download_status['status']) - self.setWait(30) + self.set_wait(30) self.wait() my_try += 1 diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index dc6e9253e..a9a0b354a 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class RapideoPl(MultiHoster): __name__ = "RapideoPl" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'^unmatchable$' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -44,7 +44,7 @@ class RapideoPl(MultiHoster): self.pwd = data['pwd'] - def runFileQuery(self, url, mode=None): + def run_file_query(self, url, mode=None): query = self.API_QUERY.copy() query['username'] = self.usr @@ -55,27 +55,27 @@ class RapideoPl(MultiHoster): query['check'] = 2 query['loc'] = 1 - self.logDebug(query) + self.log_debug(query) return self.load(self.API_URL, post=query) - def handleFree(self, pyfile): + def handle_free(self, pyfile): try: - data = self.runFileQuery(pyfile.url, 'fileinfo') + data = self.run_file_query(pyfile.url, 'fileinfo') except Exception: - self.logDebug("RunFileQuery error") - self.tempOffline() + self.log_debug("RunFileQuery error") + self.temp_offline() try: parsed = json_loads(data) except Exception: - self.logDebug("Loads error") - self.tempOffline() + self.log_debug("Loads error") + self.temp_offline() - self.logDebug(parsed) + self.log_debug(parsed) if "errno" in parsed.keys(): if parsed['errno'] in self.ERROR_CODES: @@ -98,8 +98,8 @@ class RapideoPl(MultiHoster): pyfile.size = parsed['filesize'] try: - self.link = self.runFileQuery(pyfile.url, 'filedownload') + self.link = self.run_file_query(pyfile.url, 'filedownload') except Exception: - self.logDebug("runFileQuery error #2") - self.tempOffline() + self.log_debug("runFileQuery error #2") + self.temp_offline() diff --git a/module/plugins/hoster/RapidfileshareNet.py b/module/plugins/hoster/RapidfileshareNet.py index 0bbaed57f..b10cf9aff 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.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?rapidfileshare\.net/\w{12}' diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index e5298726c..b2962af10 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -14,7 +14,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RapidgatorNet(SimpleHoster): __name__ = "RapidgatorNet" __type__ = "hoster" - __version__ = "0.34" + __version__ = "0.35" __pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -57,8 +57,8 @@ class RapidgatorNet(SimpleHoster): if self.sid: self.premium = True - self.resumeDownload = self.multiDL = self.premium - self.chunkLimit = 1 + self.resume_download = self.multi_dl = self.premium + self.chunk_limit = 1 def api_response(self, cmd): @@ -66,13 +66,13 @@ class RapidgatorNet(SimpleHoster): json = self.load('%s/%s' % (self.API_URL, cmd), get={'sid': self.sid, 'url': self.pyfile.url}) - self.logDebug("API:%s" % cmd, json, "SID: %s" % self.sid) + self.log_debug("API:%s" % cmd, json, "SID: %s" % self.sid) json = json_loads(json) status = json['response_status'] msg = json['response_details'] except BadHeader, e: - self.logError("API: %s" % cmd, e, "SID: %s" % self.sid) + self.log_error("API: %s" % cmd, e, "SID: %s" % self.sid) status = e.code msg = e @@ -88,7 +88,7 @@ class RapidgatorNet(SimpleHoster): self.retry(wait_time=60) - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): self.api_data = self.api_response('info') self.api_data['md5'] = self.api_data['hash'] @@ -98,22 +98,22 @@ class RapidgatorNet(SimpleHoster): self.link = self.api_response('download')['url'] - def handleFree(self, pyfile): + def handle_free(self, pyfile): jsvars = dict(re.findall(self.JSVARS_PATTERN, self.html)) - self.logDebug(jsvars) + self.log_debug(jsvars) self.req.http.lastURL = pyfile.url self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) url = "http://rapidgator.net%s?fid=%s" % ( jsvars.get('startTimerUrl', '/download/AjaxStartTimer'), jsvars['fid']) - jsvars.update(self.getJsonResponse(url)) + jsvars.update(self.get_json_response(url)) self.wait(jsvars.get('secs', 45), False) url = "http://rapidgator.net%s?sid=%s" % ( jsvars.get('getDownloadUrl', '/download/AjaxGetDownload'), jsvars['sid']) - jsvars.update(self.getJsonResponse(url)) + jsvars.update(self.get_json_response(url)) self.req.http.lastURL = pyfile.url self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With:"]) @@ -127,7 +127,7 @@ class RapidgatorNet(SimpleHoster): self.link = m.group(1) break else: - captcha = self.handleCaptcha() + captcha = self.handle_captcha() if not captcha: self.error(_("Captcha pattern not found")) @@ -139,25 +139,25 @@ class RapidgatorNet(SimpleHoster): 'adcopy_response' : response}) if "The verification code is incorrect" in self.html: - self.invalidCaptcha() + self.invalid_captcha() else: - self.correctCaptcha() + self.correct_captcha() else: self.error(_("Download link")) - def handleCaptcha(self): + def handle_captcha(self): for klass in (AdsCaptcha, ReCaptcha, SolveMedia): inst = klass(self) if inst.detect_key(): return inst - def getJsonResponse(self, url): + def get_json_response(self, url): res = self.load(url) if not res.startswith('{'): self.retry() - self.logDebug(url, res) + self.log_debug(url, res) return json_loads(res) diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py index f2f1abfb7..30e453b93 100644 --- a/module/plugins/hoster/RapiduNet.py +++ b/module/plugins/hoster/RapiduNet.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RapiduNet(SimpleHoster): __name__ = "RapiduNet" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P\d{10})' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -33,22 +33,22 @@ class RapiduNet(SimpleHoster): def setup(self): - self.resumeDownload = True - self.multiDL = self.premium + self.resume_download = True + self.multi_dl = self.premium - def handleFree(self, pyfile): + def handle_free(self, pyfile): self.req.http.lastURL = pyfile.url self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) - jsvars = self.getJsonResponse("https://rapidu.net/ajax.php", + jsvars = self.get_json_response("https://rapidu.net/ajax.php", get={'a': "getLoadTimeToDownload"}, post={'_go': ""}) if str(jsvars['timeToDownload']) is "stop": t = (24 * 60 * 60) - (int(time.time()) % (24 * 60 * 60)) + time.altzone - self.logInfo("You've reach your daily download transfer") + self.log_info("You've reach your daily download transfer") self.retry(10, 10 if t < 1 else None, _("Try tomorrow again")) #@NOTE: check t in case of not synchronised clock @@ -58,7 +58,7 @@ class RapiduNet(SimpleHoster): recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) - jsvars = self.getJsonResponse("https://rapidu.net/ajax.php", + jsvars = self.get_json_response("https://rapidu.net/ajax.php", get={'a': "getCheckCaptcha"}, post={'_go' : "", 'captcha1': challenge, @@ -69,12 +69,12 @@ class RapiduNet(SimpleHoster): self.link = jsvars['url'] - def getJsonResponse(self, *args, **kwargs): + def get_json_response(self, *args, **kwargs): res = self.load(*args, **kwargs) if not res.startswith('{'): self.retry() - self.logDebug(res) + self.log_debug(res) return json_loads(res) diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index a45e4ed4d..e3ac29b7d 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.09" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index 54cd54008..812598f77 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -12,7 +12,7 @@ from module.utils import parseFileSize class RealdebridCom(MultiHoster): __name__ = "RealdebridCom" __type__ = "hoster" - __version__ = "0.68" + __version__ = "0.69" __pattern__ = r'https?://((?:www\.|s\d+\.)?real-debrid\.com/dl/|[\w^_]\.rdb\.so/d/)[\w^_]+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -24,24 +24,24 @@ class RealdebridCom(MultiHoster): def setup(self): - self.chunkLimit = 3 + self.chunk_limit = 3 - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): data = json_loads(self.load("https://real-debrid.com/ajax/unrestrict.php", get={'lang' : "en", 'link' : pyfile.url, - 'password': self.getPassword(), + 'password': self.get_password(), 'time' : int(time.time() * 1000)})) - self.logDebug("Returned Data: %s" % data) + self.log_debug("Returned Data: %s" % data) if data['error'] != 0: if data['message'] == "Your file is unavailable on the hoster.": self.offline() else: - self.logWarning(data['message']) - self.tempOffline() + self.log_warning(data['message']) + self.temp_offline() else: if pyfile.name and pyfile.name.endswith('.tmp') and data['file_name']: pyfile.name = data['file_name'] diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index 15ce3b2b1..43647b8cf 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -9,7 +9,7 @@ from module.utils import html_unescape class RedtubeCom(Hoster): __name__ = "RedtubeCom" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" __pattern__ = r'http://(?:www\.)?redtube\.com/\d+' diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 54778ef00..f3a011067 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.22" + __version__ = "0.23" __pattern__ = r'https?://.*rehost\.to\..+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -19,7 +19,7 @@ class RehostTo(MultiHoster): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): self.download("http://rehost.to/process_download.php", get={'user': "cookie", 'pass': self.account.getAccountInfo(self.user)['session'], diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index d60101aed..78b88459b 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.05" + __version__ = "0.06" __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -39,11 +39,11 @@ class RemixshareCom(SimpleHoster): def setup(self): - self.multiDL = True - self.chunkLimit = 1 + self.multi_dl = True + self.chunk_limit = 1 - def handleFree(self, pyfile): + def handle_free(self, pyfile): b = re.search(self.LINK_PATTERN, self.html) if not b: self.error(_("File url")) diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py index 1a45def44..bc6f4f9ce 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.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?rghost\.(net|ru)/[\d-]+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] diff --git a/module/plugins/hoster/SafesharingEu.py b/module/plugins/hoster/SafesharingEu.py index 08612e413..cfea37016 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.05" + __version__ = "0.06" __pattern__ = r'https?://(?:www\.)?safesharing\.eu/\w{12}' diff --git a/module/plugins/hoster/SecureUploadEu.py b/module/plugins/hoster/SecureUploadEu.py index 6bfbce328..80892932e 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.05" + __version__ = "0.06" __pattern__ = r'https?://(?:www\.)?secureupload\.eu/\w{12}' diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py index 0ab20949d..e645bb604 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.17" + __version__ = "0.18" __pattern__ = r'https?://(?:www\.)?sendspace\.com/file/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -28,30 +28,30 @@ class SendspaceCom(SimpleHoster): USER_CAPTCHA_PATTERN = r'