Collabsvito / REpo-AiO

My personal new REPO
GNU General Public License v3.0
10 stars 1 forks source link

plugin.video.kika_de - URLs broken #3

Closed Windsurfer87 closed 1 year ago

Windsurfer87 commented 1 year ago

For the addon MATRIX/plugin.video.kika_de the URLs to display the available videos are no longer available:

kodi:~ # wget "https://www.kika.de/videos/uebersicht-alle-videos-100.html" Connecting to www.kika.de (104.66.205.247:443) wget: server returned error: HTTP/1.1 308 Permanent Redirect

Full Log

DEBUG <general>: -->Python Interpreter Initialized<--
DEBUG <general>: CPythonInvoker(25, /storage/.kodi/addons/plugin.video.kika_de/default.py): the source file to load is "/storage/.kodi/addons/plugin.video.kika_de/default.py"
DEBUG <general>: CPythonInvoker(25, /storage/.kodi/addons/plugin.video.kika_de/default.py): setting the Python path to /storage/.kodi/addons/plugin.video.kika_de:/storage/.kodi/addons/script.module.certifi/lib:/storage/.kodi/addons/script.module.chardet/lib:/storage/.kodi/addons/script.module.idna/lib:/storage/.kodi/addons/script.module.requests/lib:/storage/.kodi/addons/script.module.urllib3/lib:/usr/lib/python38.zip:/usr/lib/python3.8:/usr/lib/python3.8/lib-dynload:/usr/lib/python3.8/site-packages
DEBUG <general>: CPythonInvoker(25, /storage/.kodi/addons/plugin.video.kika_de/default.py): entering source directory /storage/.kodi/addons/plugin.video.kika_de
DEBUG <general>: CPythonInvoker(25, /storage/.kodi/addons/plugin.video.kika_de/default.py): instantiating addon using automatically obtained id of "plugin.video.kika_de" dependent on version 3.0.0 of the xbmc.python api
DEBUG <general>: ------ Window Init (DialogBusy.xml) ------
DEBUG <general>: [plugin.video.kika_de v.3.4.6+matrix.1](navigator.listAlphabet) ------------------------------------------------ START = listAlphabet -----------------------------------------------
DEBUG <general>: [plugin.video.kika_de v.3.4.6+matrix.1](navigator.listAlphabet) ### URL : https://www.kika.de/videos/uebersicht-alle-videos-100.html ### EXTRA : DEFAULT ###
DEBUG <general>: [plugin.video.kika_de v.3.4.6+matrix.1](common.getUrl) === URL that wanted : https://www.kika.de/videos/uebersicht-alle-videos-100.html ===
DEBUG <general>: [plugin.video.kika_de v.3.4.6+matrix.1](common.getUrl) === send url-HEADERS : {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36', 'Accept-Encoding': 'gzip', 'Accept': '*/*', 'Connection': 'keep-alive', 'Pragma': 'no-cache', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Accept-Language': 'en-US,en;q=0.8,de;q=0.7', 'Referer': 'https://www.kika.de/videos/uebersicht-alle-videos-100.html'} ===
ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                  - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                 Error Type: <class 'IndexError'>
                 Error Contents: list index out of range
                 Traceback (most recent call last):
                   File "/storage/.kodi/addons/plugin.video.kika_de/default.py", line 72, in <module>
                     run()
                   File "/storage/.kodi/addons/plugin.video.kika_de/default.py", line 56, in run
                     navigator.listAlphabet(url, extras)
                   File "/storage/.kodi/addons/plugin.video.kika_de/resources/lib/navigator.py", line 54, in listAlphabet
                     result = re.findall(r'class="bundleNaviWrapper"(.+?)class="modCon"', content, re.S)[0]
                 IndexError: list index out of range
                 -->End of Python script error report<--

DEBUG <general>: onExecutionDone(25, /storage/.kodi/addons/plugin.video.kika_de/default.py)
DEBUG <general>: ------ Window Init (DialogNotification.xml) ------
DEBUG <general>: .
 INFO <general>: Python interpreter stopped
DEBUG <general>: Thread LanguageInvoker 3828699776 terminating
ERROR <general>: GetDirectory - Error getting plugin://plugin.video.kika_de/?mode=listAlphabet&url=https%3a%2f%2fwww.kika.de%2fvideos%2fuebersicht-alle-videos-100.html
DEBUG <general>: Thread waiting 3906572928 terminating
DEBUG <general>: ------ Window Deinit (DialogBusy.xml) ------
ERROR <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.kika_de/?mode=listAlphabet&url=https%3a%2f%2fwww.kika.de%2fvideos%2fuebersicht-alle-videos-100.html) failed
DEBUG <general>: CGUIMediaWindow::GetDirectory (plugin://plugin.video.kika_de/)
DEBUG <general>:   ParentPath = [plugin://plugin.video.kika_de/]
DEBUG <general>: Loading items: 14, directory: plugin://plugin.video.kika_de/ sort method: 0, ascending: false
DEBUG <general>: CAddonDatabase::SetLastUsed[plugin.video.kika_de] took 12 ms
DEBUG <general>: Thread BackgroundLoader start, auto delete: false
DEBUG <general>: Thread BackgroundLoader 3935572608 terminating
Collabsvito commented 1 year ago

@Windsurfer87 Auf Grund der Veränderungen der Webseite von https://www.kika.de/ muss ich das Addon leider komplett neu schreiben, da ein Web Scraping (wie bisher im Addon angewendet) nicht mehr realistisch umsetzbar ist. Krankheitsbedingt wird dieses Vorhaben einige Tage in Anspruch nehmen, ich bitte um etwas Geduld !

Gruß

Windsurfer87 commented 1 year ago

Vielen Dank für deine Bemühungen und erst einmal gute Besserung!

buzz-tee commented 1 year ago

@Collabsvito vielleicht magst du dir meine Änderungen anschauen. Sind gar nicht sooo umfangreich und damit funktioniert das Plugin erst mal wieder (ok, die Ansicht für Gebärden- und Hörfassungen ist noch nicht ideal) https://github.com/buzz-tee/kika-plus-kodi-addon

Wenn du ein Repo hast, in dem du das Plugin entwickelst, kann ich meine Changes auch rebasen und dir einen PR schicken.

So long, viele Grüße

Collabsvito commented 1 year ago

@buzz-tee

Ich hätte das Addon gerne auf der Basis der Web-Api wiederhergestellt, da diese doch viel mehr bietet als die Android-Api. Aber bis ich mich mit der Api angefreundet habe wird es wohl noch eine Zeit dauern, daher wäre ich gerne bereit Deine Änderungen mit ein paar Anpassungen meinerseits vorerst zu übernehmen !

Daher noch eine kurze Frage: Bist Du Dir sicher, dass der Eintrag 'targetGroup' für die festgelegte Altersstufe steht ? Hier mal der Link zur Einstufung: https://www.kika.de/erwachsene/aktuelles/sendungen-nach-alter/index.html Falls das nämlich nicht übereinstimmt, wäre das ordnen nach Alter im Addon hinfällig.

P.S. Meine Addons entwickle ich grundsätzlich nicht im Netz, um ein direktes forken und verbreiten mit diversen Releases zu vermeiden.

Gruß

buzz-tee commented 1 year ago

Ok, da hast du recht, das funktioniert mit targetGroup echt nicht, wäre auch zu schön gewesen.

Allerdings ist mir bei der API vom KiKA Player aufgefallen, dass man scheinbar überall (sowohl bei Brands als auch bei Videos) den Query Parameter userAge=<int> anhängen kann. Damit stimmt das Ergebnis zumindest soweit, dass "Videos ab 6 Jahren" keine Videos anzeigt, die erst ab 7 sind, wohl aber - anders als die Webansicht - auch die Videos, die bei "Videos ab 3 Jahren" enthalten sind.

Ich habe das Addon bei mir mal dahingehend aktualisiert. Bedien' dich, wenn du denkst, da ist was dabei.

Die Kategorie "Lollywood" kam übrigens auf explizite Anweisung meiner Kinder hinzu... wenn du magst, kannst du ja auch drüber nachdenken, das ins Addon zu übernehmen :wink:

Viele Grüße

Collabsvito commented 1 year ago

@buzz-tee

Offizielles Update ist online. Vielen Dank für Deine Unterstützung !!!:satisfied:

Gruß

Windsurfer87 commented 1 year ago

Gerade getestet - funktioniert einwandfrei. Vielen Dank 😃

30.03.2023 15:39:22 Collabsvito @.***>:

@buzz-tee[https://github.com/buzz-tee]

Offizielles Update ist online. Vielen Dank für Deine Unterstützung !!! 😆

Gruß

— Reply to this email directly, view it on GitHub[https://github.com/Collabsvito/REpo-AiO/issues/3#issuecomment-1490323373], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ATDJ6CBWQPZWUYDEM7AB5NLW6WEIRANCNFSM6AAAAAASX6GVFE]. You are receiving this because you were mentioned.[Verfolgungsbild][https://github.com/notifications/beacon/ATDJ6CARYKCFXCVKBQWXQYDW6WEIRA5CNFSM6AAAAAASX6GVFGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSY2SD22.gif]

buzz-tee commented 1 year ago

Kann ich bestätigen, funktioniert wunderbar. Schöne Idee, gleich die Anzahl der Episoden mit anzuzeigen!