From 5fd5946c685ac8d8167a730379310a8deac58ba6 Mon Sep 17 00:00:00 2001 From: Leon Date: Fri, 25 Feb 2022 17:52:09 +0100 Subject: [PATCH] Ascii | UTF-8 Switch --- __pycache__/animeloads.cpython-39.pyc | Bin 27510 -> 27810 bytes animeloads.py | 32 ++++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/__pycache__/animeloads.cpython-39.pyc b/__pycache__/animeloads.cpython-39.pyc index d05ee89a9667b0c18a8b92a62bf30d111f793418..989de30bcbddc11995a2c1b005143e91cc6f6e8f 100644 GIT binary patch delta 8312 zcmaJ`33Qy*b^hP%+D41DTbr$QY%ODJ^CsD{Hd~fuVJ)`Dw&Z{2|0Ru`eyAyS|OatI_S7~+r+dJ0WBCWanD%b%n`3n5L@h9-ulyYIdG?z`{KM{kg?zDb;7T3WIIf3G?Uyz^iGmh&Am@vMAcULYis%~+Qg zbD@vs0T^~K4V+hHY9vPsvjHE?#2%YO{pVy#>v+W%2+a89#{}98)sMGz?m9IBT=S*jXbM>4hBBd;oaGsQ^=baNS6PmB*hBMFJ zl+vR08p#<>fqHthzC+63^~`AffRx4S8>02&QZ}#WMC(&hF0bcB>ldW_h`@qq!-MRL zj=~BUp$Hr3O+6d5cuFGS?6WuZyl@ielPo1;jook@CO=}uNsVNb-H}vGnphwyXKRz@ z(3A9JJw;E|({!hvu4m|(xEAYI;q0R;PbT?HJ81#z7~P7ym?Q@MQ}S#OwmWrF)`nz} z`ld#X_8Zn9^(&f@qH3ZRQpbG(Nv1{YQ0g_}X0|kmWV4yHePlO#JgtfBV(+94m7y7M zTc9l{*`{(?hoG$91t73d=dm;gu@MU~!M}yr*fpoO;UIKzg?J$UESlI`#U{$ zN%qnCpk|oo#2_67`G#fIuWBxvL1qj)?~^5Z4hP1`80LU?+91*zE%@FffgIS-&Vl}K zv6k$ovyUUKRSC@n=RH=~_Qvh>82e*(Rn|Jqi1!87n)9m+q^Dtoze2de8gq9Qt)orB zEt7^cFr&%q?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upHri z9(*ytut%@7@w~m5`YnQ22$t{6oFZcUwT3RRR$}@{<7=nFe@R_41hha_20ln(;`38#xSQY+f_vbw&pRSE-9wgw4N6caooQun&&R!6hM~*D=+ydl!%5+nD^-0;i~WV8{Evzvhm+z z%eHx#!&byfSrN9-v#6UDvQn^}JvKi}^5zI`C)iCuDTN58yp>9A1cRcNN_zfu}C()`BgyZe5rUE zS-FZ4nd@pQ9V!8HbTfSaeDIK$gxtW74VIH0G6Onqq25bL=^qn#53hn{f-qwuA`fn;hZmM{&aMG2cQioP)BhQ=|-R{E21 zUR(guF^R-EIHwMSsVplaHa`tDKZeSjgx8gxWC|uWFb$>nF{Vqy3&m7a8$ScXYHxB) z{3s*s3N~QJS+RnzsPD4>gYS(s923dIDw7fd#6F~qYn5H4(Mb4&QRo?$lZps~Oh>sB z6$!w#@!hNa*RRO*=rD5;~t6zO6#B~ zw5)YV@TrNdwtNN!g==76a2>ohQMz-LOBGHn1?0B*1aeQ{{aB}4tD9jxA)%s$!tM|c z-fUdzo?5}VRk*`_!HR7|$npt{)UB;x97+voeDaXgeQ^b+ksPw^=qC?J-Np(=s^itT z48As5&Yps6lcQ~SqHOU_&mW-Dg9JW;I)XxEu(G2(6bkyAgpU?KukmWQFm-2u6UnOt zFCgF#2NQU|4aJkBd1~$_I6^Q$KwB117HIi7tt6*a;WR-`%6)97;ZUffvLJU}I-l## QZN~5TXC!wx-yZ+`KWGhzUjP6A diff --git a/animeloads.py b/animeloads.py index e9c81ec..2cbe1b2 100644 --- a/animeloads.py +++ b/animeloads.py @@ -1011,26 +1011,40 @@ def downloadEpisode(self, episode, release, hoster, browser, browserlocation="", except: raise ALLinkExtractionException("Linkdaten konnten nicht gelesen werden") - k_list = list(k) - tmp = k_list[15] - k_list[15] = k_list[16] - k_list[16] = tmp - k = "".join(k_list) + try: + k_list = list(k) + tmp = k_list[15] + k_list[15] = k_list[16] + k_list[16] = tmp + k = "".join(k_list) + except: + print("Failed to deobfuscate key") + raise ALLinkExtractionException("Linkdaten konnten nicht gelesen werden") + +# print("Key wurde erfolgreich deobfuskiert") jk = "function f(){ return \'" + k + "\';}" if(pkgName == ""): pkgName = anime_identifier - if(jdhost != "" and myjd_user == ""): return utils.addToJD(jdhost, release.getPassword(), self.url, crypted, jk) elif(jdhost == "" and myjd_user != ""): - links_decoded = utils.decodeCNL(k, crypted) + try: + links_decoded = utils.decodeCNL(k, crypted) + print("Successfully decoded links") + except: + print("Failed to decode links") + raise ALUnknownException("Failed to decode links") links = [] linkstring = "" for link in links_decoded: - linkstring += link.decode('ascii') - myjd_return = utils.addToMYJD(myjd_user, myjd_pw, myjd_device, linkstring, pkgName, release.getPassword()) + linkstring += link.decode('utf-8') + try: + myjd_return = utils.addToMYJD(myjd_user, myjd_pw, myjd_device, linkstring, pkgName, release.getPassword()) + except: + print("Failed to add Link to MyJD") + raise ALUnknownException("Failed to add Link to MyJD") try: pkgID = myjd_return['id'] return True