Pfuenzle / anime-loads

17 stars 7 forks source link

Skript / Python Fehler #2

Closed Mega-Bits closed 3 years ago

Mega-Bits commented 3 years ago

Hey, bin gestern auf dein Projekt gestoßen und war sehr begeistert. Habe es dann sofort ausprobiert und musste dann festellen das es bei mir nicht funktioniert. JDowloader läuft auch in einem Dockercontainer aber nicht im gleichen wie Ubuntu.

System: Ubuntu 18.04. (Läuft in Docker) Python Version: Python 3.6.9 Browser: Geckodriver (https://github.com/mozilla/geckodriver/releases geckodriver-v0.29.0-linux64.tar.gz)

Das ist der output von downloader.py

python3 downloader.py
Starte interaktiven Modus
Möchtest du dich anmelden? [J/N]: y
Username: User
Passwort:
Angemeldet als Nutzer User, VIP: True
Erfolgreich eingeloggt
Möchtest du deine Einstellungen ändern? [J/N]: n
Nach welchem Anime möchtst du suchen? (Du kannst jederzeit "suche" eingeben, um zurück zur Suche zu kommen oder "exit", um das Programm zu beenden): Cells at Work!!
Ergebnisse:
[1] Name: Cells at Work!!, Typ: , Episoden: 8/12, Dub: ['UNKNOWN'], Subs: ['UNKNOWN']
Wähle einen Anime (Zahl links daneben eingeben): 1

Releases:

Release ID: 1, Group: Tanuki, Resolution: 720p, Videocodec: UNKNOWN, Audiocodec: UNKNOWN, Dubs: [], Subs: [], Format: MKV, Size: 293.0MB, Password: www.anime-loads.org
Release ID: 2, Group: Tanuki, Resolution: 1080p, Videocodec: UNKNOWN, Audiocodec: UNKNOWN, Dubs: [], Subs: [], Format: MKV, Size: 537.0MB, Password: www.anime-loads.org
Release ID: 3, Group: Tanuki, Resolution: 720p, Videocodec: UNKNOWN, Audiocodec: UNKNOWN, Dubs: [], Subs: [], Format: MKV, Size: 326.0MB, Password: www.anime-loads.org
Release ID: 4, Group: Tanuki, Resolution: 1080p, Videocodec: UNKNOWN, Audiocodec: UNKNOWN, Dubs: [], Subs: [], Format: MKV, Size: 610.0MB, Password: www.anime-loads.org

Bestes Release nach Qualität: Release ID: 4, Group: Tanuki, Resolution: 1080p, Videocodec: UNKNOWN, Audiocodec: UNKNOWN, Dubs: [], Subs: [], Format: MKV, Size: 610.0MB, Password: www.anime-loads.org
Wähle eine Release ID: 2
Du hast folgendes Release gewählt: Release ID: 2, Group: Tanuki, Resolution: 1080p, Videocodec: UNKNOWN, Audiocodec: UNKNOWN, Dubs: [], Subs: [], Format: MKV, Size: 537.0MB, Password: www.anime-loads.org
Das Release hat 8 Episode(n)
Welche Episode möchtest du herunterladen? (Mehrere mit Komma getrennt, 0 für alle (Achtung: Lädt im Moment noch jede Episode einzeln runter, zählt also zum Downloadlimit)): 0
Lade episode 0
Traceback (most recent call last):
  File "downloader.py", line 668, in <module>
    interactive()
  File "downloader.py", line 386, in interactive
    ret = anime.downloadEpisode(i + 1, release, hoster, browserengine, browserlocation=browserlocation, jdhost=jdhost, myjd_user=myjd_user, myjd_pw=myjd_pw, myjd_device=myjd_device)
UnboundLocalError: local variable 'myjd_pw' referenced before assignment

Das ist der inhalt der settings.json

{
    "browserengine": 0,
    "browserlocation": "",
    "hoster": 0,
    "jdhost": "",
    "mode": "jdownloader",
    "myjd_device": "Name",
    "myjd_pw": "PW",
    "myjd_user": "EMail"
}

Das ist der output von anibot.py

python3 anibot.py
Möchtest du dich anmelden? [J/N]: j
Username: User
Passwort:
Erfolgreich eingeloggt
[13:05:57] Prüfe Cells at Work!! auf updates
[INFO] Cells at Work!!hat fehlende Episode(n)
[DOWNLOAD] Lade fehlende Episode 1 von Cells at Work!!
Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

[ERROR] Fehler beim hinzufügen von Episode 1 von Cells at Work!!, wird im nächsten Durchlauf erneut versucht. Ist JDownloader gestartet?
[DOWNLOAD] Lade fehlende Episode 2 von Cells at Work!!
Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

[ERROR] Fehler beim hinzufügen von Episode 2 von Cells at Work!!, wird im nächsten Durchlauf erneut versucht. Ist JDownloader gestartet?
[DOWNLOAD] Lade fehlende Episode 3 von Cells at Work!!
Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

[ERROR] Fehler beim hinzufügen von Episode 3 von Cells at Work!!, wird im nächsten Durchlauf erneut versucht. Ist JDownloader gestartet?
[DOWNLOAD] Lade fehlende Episode 4 von Cells at Work!!
Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

[ERROR] Fehler beim hinzufügen von Episode 4 von Cells at Work!!, wird im nächsten Durchlauf erneut versucht. Ist JDownloader gestartet?
[DOWNLOAD] Lade fehlende Episode 5 von Cells at Work!!
Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

[ERROR] Fehler beim hinzufügen von Episode 5 von Cells at Work!!, wird im nächsten Durchlauf erneut versucht. Ist JDownloader gestartet?
[DOWNLOAD] Lade fehlende Episode 6 von Cells at Work!!
Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

[ERROR] Fehler beim hinzufügen von Episode 6 von Cells at Work!!, wird im nächsten Durchlauf erneut versucht. Ist JDownloader gestartet?
[DOWNLOAD] Lade fehlende Episode 7 von Cells at Work!!
Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

[ERROR] Fehler beim hinzufügen von Episode 7 von Cells at Work!!, wird im nächsten Durchlauf erneut versucht. Ist JDownloader gestartet?
[DOWNLOAD] Lade fehlende Episode 8 von Cells at Work!!
Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

[ERROR] Fehler beim hinzufügen von Episode 8 von Cells at Work!!, wird im nächsten Durchlauf erneut versucht. Ist JDownloader gestartet?
[INFO]Cells at Work!! hat keine neuen Folgen verfügbar
Schlafe 600 Sekunden

Das ist der inhalt der ani.json

{
    "anime": [
        {
            "episodes": 8,
            "missing": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8
            ],
            "name": "Cells at Work!!",
            "releaseID": 2,
            "url": "https://www.anime-loads.org/media/hataraku-saibou"
        }
    ],
    "settings": {
        "browserengine": 0,
        "browserlocation": "",
        "hoster": 0,
        "jdhost": "",
        "myjd_device": "Name",
        "myjd_pw": "PW",
        "myjd_user": "EMail",
        "pushbullet_apikey": "",
        "timedelay": 600
    }
}

Wenn ich etwas vergessen habe, reiche ich es sofort nach. :)

Pfuenzle commented 3 years ago

Hi, danke für den Buchreport ^^. Also der Fehler in downloader.py kommt daher, dass ich bei den Variablennamen für MyJdownloader etwas durcheinander gekommen bin. Der kann direkt gefixt werden.

Der anibot.py Fehler liegt an Ubuntu mehr oder weniger. Wenn du Geckodriver nutzt, nehme ich an dass du Firefox installiert hast, aber Geckodriver findet die Firefox binary nicht. Du könntest in dem Container mit "whereis firefox" den Pfad herausfinden und den bei anibot.py einfügen, dann sollte der Fehler nicht mehr kommen.

Ich bin aber auch grade dabei, einen Dockercontainer dafür zu erstellen, damit das alles wegfällt, sollte heute Abend Mal fertig sein

Mega-Bits commented 3 years ago

Hi, danke für den Buchreport ^^. Also der Fehler in downloader.py kommt daher, dass ich bei den Variablennamen für MyJdownloader etwas durcheinander gekommen bin. Der kann direkt gefixt werden.

Der anibot.py Fehler liegt an Ubuntu mehr oder weniger. Wenn du Geckodriver nutzt, nehme ich an dass du Firefox installiert hast, aber Geckodriver findet die Firefox binary nicht. Du könntest in dem Container mit "whereis firefox" den Pfad herausfinden und den bei anibot.py einfügen, dann sollte der Fehler nicht mehr kommen.

Ich bin aber auch grade dabei, einen Dockercontainer dafür zu erstellen, damit das alles wegfällt, sollte heute Abend Mal fertig sein

Face Palm. Habe nur Gecko nicht auch Firefox. Sry für den Falschen Alarm. Installiere den Fix nach und versuche es erneut. EDIT: Funktioniert jetzt einwand Frei.

Pfuenzle commented 3 years ago

Am Ende von deinem Edit wurde was abgeschnitten, was wolltest du schreiben? Ich habe jetzt für anibot.py und downloader.py docker container hochgeladen, damit sollte es keine Probleme mehr geben. In der Readme ist noch eine Anleitung dafür

Mega-Bits commented 3 years ago

Am Ende von deinem Edit wurde was abgeschnitten, was wolltest du schreiben? Ich habe jetzt für anibot.py und downloader.py docker container hochgeladen, damit sollte es keine Probleme mehr geben. In der Readme ist noch eine Anleitung dafür

Wollte da nach der Comment funktion fragen, aber dachte mir das dass Off-Topic wäre :)