bugatsinho / bugatsinho.github.io

Bugatsinho New Repository
GNU General Public License v3.0
77 stars 41 forks source link

[Cartoonsgr] Partially broken due to gamato's site changes #149

Closed pitsi closed 4 months ago

pitsi commented 5 months ago

Since there is nothing helpful in the log, I will be as descriptive as possible. The following started this weekend, but I was afk.

Under gamato movies > dubbed cartoons the addon lists all movies available on the site, because the /id11088 part redirects to the site's main page. Editing default.py on line 128 and changing that part to /64565 restores the intended functionality. And yes, I do not know how to find its /category/ id so as to match the rest, but as it seems the site redirects any $gamatourl/category/number url to $gamatourl/number. The other categories listed under gamato movies work as they should.

The addon fails to scrape the video and trailer links when the links are under the description, e.g. $gamatourl/33728. If they are part of the description. e.g. $gamatourl/345, they are scraped as usual.

There are no posters of the movies, anywhere.

Last but not least, the failed scrapping and the missing poster issues also happen under the christmas category from the main menu. I am not sure, but I think this category is scraped from gamato as well. And I really do not want to ask, because it will open a really offtopic conversation.

p.s. For obvious reasons, I am not posting direct links to any url! I think one can easily figure out what I mean.

pitsi commented 4 months ago

Am I the only one who has noticed these issues all those 10+ days that the addon is broken?

bugatsinho commented 4 months ago

Is coming an update ASAP I have it almost ready but I was way too busy😎

Sent from Proton Mail for iOS

On Mon, Apr 8, 2024 at 11:40, pitsi @.***(mailto:On Mon, Apr 8, 2024 at 11:40, pitsi < wrote:

Since there is nothing helpful in the log, I will be as descriptive as possible. The following started this weekend, but I was afk.

Under gamato movies > dubbed cartoons the addon lists all movies available on the site, because the /id11088 part redirects to the site's main page. Editing default.py on line 128 and changing that part to /64565 restores the intended functionality. And yes, I do not now how to find its /category/ so as to match the rest, but as it seems the site redirects any $gamatourl/category/number url to $gamatourl/number. The other categories listed under gamato movies work as they should.

The addon fails to scrape the video and trailer links when the links are under the description, e.g. $gamatourl/33728. If they are part of the description. e.g. $gamatourl/345, they are scraped as usual.

There are no posters of the movies, anywhere.

Last but not least, the failed scrapping and the missing poster issues also happen under the christmas category from the main menu. I am not sure, but I think this category is scraped from gamato as well. And I really do not want to ask, because it will open a really offtopic conversation.

p.s. For obvious reasons, I am not posting direct links to any url! I think one can easily figure out what I mean.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

pitsi commented 4 months ago

Oh ok. I will be afk from this afternoon to tomorrow morning due to severe weather warnings here in Greece. And that is IF they won't cause any damage like on September.

Anyway, I just noticed that the number change on line 128 leads to a wrong page now. It should be 64567.

pitsi commented 4 months ago

Thank you for upgrading the addon. However, the gamato movies part is now completely empty!

2024-04-21 12:00:57.846 T:717      INFO <general>: CPythonInvoker(12, /storage/.kodi/addons/plugin.video.cartoonsgr/default.py): script successfully run
2024-04-21 12:00:58.272 T:717      INFO <general>: Python interpreter stopped
2024-04-21 12:00:58.724 T:721      INFO <general>: initializing python engine.
2024-04-21 12:00:59.231 T:721      INFO <general>: CPythonInvoker(13, /storage/.kodi/addons/plugin.video.cartoonsgr/default.py): script successfully run
pitsi commented 4 months ago

I think I fixed it. Uncommenting lines 107 to 118, the entire get_category_links function, and lines 177 to 180, which are part of the gamatokids function, restores functionality of the addon, at least for the stuff it scrapes from gamato.

I do not know if this is its complete functionality, because I think tenies-online is no longer used anywhere.

Right now, from all the 3 issues I mentioned at the start, only the posters are missing.

bugatsinho commented 4 months ago

I need a log mate. Also before I sent the update i tested it in 3 kodi versions 18-20-21. FYI add-on now because website owner changes all the time the categories links, is scrapping the infos from the website. also now on your addon_data/cartoons you have to see 2 txt files. post here what you've got. Also by enable the lines 177-180 you just enabled the previous version with the hardcoded links in the menu. once they will changed you don't have a workable addon. Lastly if the gamato_url.txt returns a domain then you should have the gamato menu

bugatsinho commented 4 months ago

New version 1.0.56. Now addon uses a pastebin to get the domain and categories links too. I came to that solution cause of too many changes by website owner and the mouse-cat game we are playing. Addon tested on kodi18.9 and 21.0 before the release.

pitsi commented 4 months ago

I would post a log if there was something in the log. E.g. I just ran the addon after a fresh start of kodi and all the log says is what repos are enabled etc, and not a single error. And a screenshot of the addon showing only 2 dots is pretty useless. That behavior was also verified with another user running kodi 21, but has no idea how to get logs, so all he said was "the menu only has 2 dots now". So, the best "log" I could get were those 4 lines above.

As for the uncommented lines, I uncommented the ones from the first function, but the menu was still empty, so I uncommented the ones from the second function and it worked. I am no expert in python, all I can do is test stuff. And as it seems, there is a lot of unused code in there, which makes both testing and maintenance harder.

Anyway, I will create a clean kodi installation, install the repo and cartoonsgr from it, post a screensjht and a complete log, but that will be with 1.0.56 and on kodi 20.4 (because my distro has not upgraded it to 21 yet).

Last but not least, is that gamato_url.txt (or any other file that needs to be created) mandatory for the addon to work? Because it may fail because the file is just not there.

pitsi commented 4 months ago

I deleted gamato_url.txt from ~/.kodi/userdata/addon_data/plugin.video.cartoonsgr as another user suggested and now everything* works fine! Thank you! Can you make the delete cache function also delete the txt file so as to force a fresh download from the addon next time it is run?

*Almost everything, because some posters are missing here and there.

pitsi commented 4 months ago

Thank you for adding the deletion of the txt file on the clean cache function!

One last thing I noticed for the urls mentioned under settings > gamato domains. When the domain is https://gamatotv/info/whatever/ (which is the default setting in settings.xml), it redirects straight to the main page, e.g. this https://gamatotv.info/64567/ redirects to https://gamatotv.info.

But when the domain has the el. part at the start, like https://el.gamatotv/info/64567/, it does not redirect at all. Broken site :D

Last but not least, the url number for the Christmas category in the settings should be 205, not 51. But all those are minor corrections for a future update.

kolekan commented 4 months ago

https://el.gamatotv/info/64567/

the correct domain is el.gamatotv.info so the url format is https://el.gamatotv.info/whatever/ not https://el.gamatotv/info/whatever/ thats why you don't get redirection

Last but not least, the url number for the Christmas category in the settings should be 205, not 51. But all those are minor corrections for a future update.

What i see is that the url number for christmas category in settings is what it should be (205). So there is nothing to correct.

update ---> Now i see what you mean about christmas number in settings. You are talking about settings.xml in addon's resources folder. That's really no issue cause it is there only for getting info about urls and and as soon as you open the addon these info comes from settings.xml in CartoonsGR addon_data folder.

bugatsinho commented 4 months ago

So guys, as @koleklol mentioned now the addon gets the links from a pastebin (I tried to scrape the website to get the categories links but at the end they changed them again and the addon didn't work)that the addon reads and saves to the gamato_url.txt and also set them to settings.xml. Now user can check on settings the links and compare them with the site. Also added function that creates the addon_data/cartoonsgr folder if doesn't exit that was the error in the previous version @pitsi. Also if you find any title that doesn't return link or links plz mention it here. Lastly the kodi.log shows everything when you enable the debugging option in kodi and reproduce the error.

pitsi commented 4 months ago

Lastly the kodi.log shows everything when you enable the debugging option in kodi and reproduce the error.

About this bit. It would be really helpful if kodi's debug log focused on stuff that matters and not on everything. E.g. If I want to launch cartoonsgr only, kodi will log ALL the button presses I will do, from the main menu all the way to the addon!