Someone266 / aniworld-downloader

AniWorld Down ist ein Tool, um Videos von AniWorld (ehemalig AniCloud) herunterzuladen und zu organisieren
MIT License
8 stars 0 forks source link

Cannot download anime’s #3

Closed palpex closed 2 months ago

palpex commented 2 months ago

I’ve downloaded the main.py file and installed everything with pip it missed when I started it. Ether I use manual nor automatic mode, it gives me this error: Enter the url of the anime https://aniworld.to/anime/stream/death-note/staffel-1/ Traceback (most recent call last): File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 479, in <module> if __name__=='__main__':BK() File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 462, in BK elif C=='ui':Z() File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 320, in Z Ab(C) File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 409, in Ab j();C=Y(url);o(C) File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 152, in Y a='span';M='div';N=url;f=P.get(N);h=f.text;C=w.BeautifulSoup(h,q);E=C.find(M,class_='series-title').text;E=E.strip();E=E.split(I)[0];A('Getting info for:',E);i=C.find('p',class_='seri_des').get('data-full-description');L=C.find(a,itemprop='startDate').text;O=C.find(a,itemprop='endDate').text AttributeError: 'NoneType' object has no attribute 'text'

JMcrafter26 commented 2 months ago

I think this is because aniworld implemented a captcha to prevent scraping. I will find alternatives soon

Someone266 commented 2 months ago

I released a new version. Please give it a try! (It will update automatically)

palpex commented 2 months ago

Ive tried version 1.1.7. The new feature to either use the url or search for the anime directly is really nice. But I’m still getting an error while parsing the json. Here it’s the error: Try again later Traceback (most recent call last): File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 547, in <module> if __name__=='__main__':Ba() File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 530, in Ba elif C=='ui':T() File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 320, in T if D=='1':AQ() File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 486, in AQ C=f(G);A1(C) File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 122, in f if'/filme/'in G:A(B.WARNING+'This type of url is not supported yet. It will probably be supported in the future'+B.ENDC);J.sleep(2);return TypeError: argument of type 'NoneType' is not iterable

JMcrafter26 commented 2 months ago

There is currently a bug with URL’s. Just use the search function

palpex commented 2 months ago

I've tried both Here is the one with me searching for the anime

Death Note Error parsing JSON Try again later Traceback (most recent call last): File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 547, in <module> if __name__=='__main__':Ba() File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 530, in Ba elif C=='ui':T() File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 320, in T if D=='1':AQ() File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 486, in AQ C=f(G);A1(C) File "/var/www/palpex/projects/AniDown/AniDown/main.py", line 122, in f if'/filme/'in G:A(B.WARNING+'This type of url is not supported yet. It will probably be supported in the future'+B.ENDC);J.sleep(2);return TypeError: argument of type 'NoneType' is not iterable

JMcrafter26 commented 2 months ago

What os are you using?

JMcrafter26 commented 2 months ago

I tested it multiple times on windows and Linux IMG_0960

palpex commented 2 months ago

I'm using Ubuntu server 22.04.4

JMcrafter26 commented 2 months ago

Hmm that’s strange. I also tested it on Ubuntu 22 and it worked perfectly

palpex commented 2 months ago

curl -I http://aniworld.to HTTP/1.1 301 Moved Permanently Server: ddos-guard Date: Tue, 23 Jul 2024 10:46:37 GMT Connection: keep-alive Keep-Alive: timeout=60 Location: https://aniworld.to/

palpex commented 2 months ago

Can you send me exactly which pip installations you're using? Maybe it depends on the version

JMcrafter26 commented 2 months ago

I used Python 3.11 as well as 3.12 with the latest pip version.

pip packages you need to have installed:

There may be more, but I need to look it up

palpex commented 2 months ago

I've installed python 3.12 and reinstalled all packages, but it still gives me the same error while parsing the json. Any ideas?

JMcrafter26 commented 2 months ago

Could you try the code inside src so I can see where in the code this happens? (The release main.py file is minified) Also, are you able to access aniworld.to normally through a browser?

palpex commented 2 months ago

Yes, but logically I couldn't test it on the server (except for my try with curl, that I posted earlier), only on my PC and smartphone. And with src, ive already tried it and it failed to.

Enter the name of the anime you want to search for or paste the url of the anime

death note

Error parsing JSON Try again later Traceback (most recent call last): File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/main.py", line 281, in <module> handleCommands() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/main.py", line 219, in handleCommands update.checkForUpdates() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/update.py", line 14, in checkForUpdates functions.firstRun() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/functions.py", line 818, in firstRun gui.guide1() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/gui.py", line 146, in guide1 guide2() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/gui.py", line 210, in guide2 guide3() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/gui.py", line 221, in guide3 guide4a() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/gui.py", line 240, in guide4a guide4b() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/gui.py", line 259, in guide4b guide5() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/gui.py", line 274, in guide5 startUi() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/gui.py", line 33, in startUi main.runAuto() File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/main.py", line 71, in runAuto info = functions.getInfo(url) ^^^^^^^^^^^^^^^^^^^^^^ File "/var/www/palpex/projects/AniDown/aniworld-downloader/src/functions.py", line 31, in getInfo if '/filme/' in url: ^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable

JMcrafter26 commented 2 months ago

You won't believe me. Literally one line of code was missing. I somehow forgot to add the line that sets the URL to the input (when a URL is pasted)

palpex commented 2 months ago

Hahahah, yeah. The errors looked somewhat like that and when i was looking at the code i felt like there was something missing, but I didn't know what. Is that also the case for me not being able to download anime's with the search function ? Because that throw the error parsing json too at me... I'm not good working with python, so I didn't mention it. but maybe there is the possibility to use curl with the same params as used in the python so see exactly what I receive? Did you already update the script? But great work! Keep it going! I like this project

JMcrafter26 commented 2 months ago

Thanks for the support, and I am glad you like the project! I am still learning Python, so it's still new to me and mistakes can happen. But back to the program, I updated it and currently testing it. I will upload it to GitHub first before pushing the update so you can test it first. :)

palpex commented 2 months ago

Actually I just tested the exe and with the search function i don't get an error with parsing the json. I'm gonna test the python script on my windows machine, might be a problem with my server!?

JMcrafter26 commented 2 months ago

Hmm, that's weird. BTW, are you German? Perhaps, we could communicate in German?

palpex commented 2 months ago

Jo, klaro. Spreche meistens englisch, darum hab ich einfach so angefangen, sorry. Folgendes: Jetzt geht es einfach. Ich habe kein neues Script heruntergeladen oder so. Ich habe es erst auf meinem Windows PC getestet und dann mit VSC per SSH auf meinem Server. Da ging plötzlich das Suchen und ich bekam keinen error mehr. Als ich den Anime downloaden wollte, bekam ich einen anderen error. Wenige Sekunden später ging es aber über Termius (der ios SSH app) mit der ich vorher nie auch nur bis zur suche kam.

hier der error den ich kurzzeitig bekam : image

JMcrafter26 commented 2 months ago

Kann das mit dem Englisch verstehen. Ich habe auch aus Gewohnheit das ganze Programm auf Englisch geschrieben, obwohl es für eine deutsche Streamingseite bestimmt ist. Der Fehler, den du da siehst, habe ich höchstwahrscheinlich behoben (Kann es nicht 100 % garantieren, da es bei mir von Anfang an funktioniert hat)

palpex commented 2 months ago

Wobei mir eine sache noch aufgefallen ist. Und zwar nutze ich apache als webserver, wenn ich nun aber den ordner anime aufrufe, wo auch die index.html usw. ist, sehe ich keine serien und auch das bild nicht, weil der den pfad /anime/anime/deathDeath%20Note verwendet in der annahme, dass ich den server auf port 3333 nutze. besteht die möglichkeit, dass ich das anpasse? Sonst nehme ich den localhost usw. edit: hab in der anime config den /anime teil entfernt. nun steht dort ./Death Note

JMcrafter26 commented 2 months ago

Ich habe gerade nachgedacht und man könnte theoretisch eine Einstellung dafür machen, ob /anime verwendet werden soll oder nicht. PS: Wenn du im Programm clean ausführst, werden die JSON Dateien überschieben

JMcrafter26 commented 2 months ago

Die neue Version habe ich gerade auf Github hochgeladen (in dist). Wenn du Zeit hast, kannst du sie ja mal testen.

palpex commented 2 months ago

Ich werde es direkt mal testen. Wäre echt gut wenn man noch einstellen könnte, wo Animes gesichert werden. Sonst muss ich immer manuell die json bearbeiten. Oder ich lasse nen Script drüberlaufen. Falls ihr noch Hilfe gebrauchen könnt, würde ich auch wohl gerne mithelfen. Ich mag das Projekt echt sehr und kenne mich recht gut mit Servern, html und php aus. Aber erstmal freue ich mich auf die neue Version :D

JMcrafter26 commented 2 months ago

Unterstützung ist immer gut, zu dir aber keinen Zwang an. 😅

Du hast erwähnt, dass du dich mit PHP auskennst, dann haben wir was gemeinsam, ich mag nämlich auch PHP. Du kannst ja mal meine andere repos auschecken wenn du willst 😂

palpex commented 2 months ago

Jo, falls du was für mich hättest, kannste mir ja bescheid sagen. Hätte da auf jeden fall lust drauf. Ich werde mir mal das Notepad ansehen. wollte demnächst auch mal etwas ähnliches machen, nur dass man online zusammenarbeiten kann.

palpex commented 2 months ago

😱 image

es hat einen download lang funktioniert und dann auch einmal suchen, aber jetzt geht wieder nix edit: es lebt wieder nun bekomme ich KeyError: '2' Hier irgendein anime als beispiel: image Bei anderen geht es aber wieder?! edit: scheint ein Problem mit allen Animes welche mehr als eine Staffel haben zu sein

palpex commented 2 months ago

Und hätte auch noch eine Idee, und zwar, dass markiert wird, welche folgen man schon gesehen hat und angefangene folgen fortsetzten kann.

palpex commented 2 months ago

Ich habe js2py installiert und bekomme diesen error seit Update 18:

`ython3 main.py Traceback (most recent call last): File "/mnt/hdd/palpex/AniDown/main.py", line 145, in import requests as R,bs4 as w,js2py,re as g File "/usr/local/lib/python3.12/dist-packages/js2py/init.py", line 72, in from .base import PyJsException File "/usr/local/lib/python3.12/dist-packages/js2py/base.py", line 2965, in @Js ^^ File "/usr/local/lib/python3.12/dist-packages/js2py/base.py", line 165, in Js return PyJsFunction(val, FunctionPrototype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/js2py/base.py", line 1377, in init cand = fix_js_args(func) ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/js2py/utils/injector.py", line 27, in fix_js_args code = append_arguments(six.get_function_code(func), ('this', 'arguments')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/js2py/utils/injector.py", line 121, in append_arguments arg = name_translations[inst.arg]


KeyError: 3`