Twoure / KissNetwork.bundle

Plex Channel to view Anime, Asian Drama, Cartoons, Manga & Comics from KissAnime, KissAsian, KissCartoon, KissManga & ReadComicOnline
94 stars 21 forks source link

Caching url on link error? #36

Closed carlosfrade closed 7 years ago

carlosfrade commented 7 years ago

KissAnime as been having high traffic problems and it seems that when "unexpected error" occurs when trying to view an episode it stays that way until a certain time expires. This is just a theory. Is there a safe way to clear caches?

I notice this when opening/closing all episodes of a season those that gave an error would only be available after some time even if they are view able on the website.

Twoure commented 7 years ago

I notice this when opening/closing all episodes of a season those that gave an error would only be available after some time even if they are view able on the website.

Yes, this is due to the one hour cache time. The recent kissanime site issues have giving me time to work on code to help with this issue. In the past, I knew it was present, but couldn't debug the code as the site would normalize before I was finished.

Try the dev branch. I've worked out some better error handling. If the site is offline, returning a service unavailable, or the maintenance page then the request is no longer cached. This should allow the user to go back a step and retry the same page.

carlosfrade commented 7 years ago

Using dev branch and clearing the HTTP cache works.

Today i notice that kissanime.to is not available but kissanime.io is. Maybe you can add an option to input domain changes. Updating with the dev tools did nothing.

Also, is there a reason for not caching all the links when you bookmark a series? Maybe re-caching all episodes when you enter the view list of a season. This may help when there are kissanime site issues.

carlosfrade commented 7 years ago

Updated the Domain_Dict to use the kissanime.io domain. Still fails but now it seems that its because the source of the site changed.

Here: show_name_raw = html.xpath('//div[@class="barContent"]/div/a[@class="bigChar"]/text()')[0] getitem = lambda x, y: x.getitem(y), IndexError

Twoure commented 7 years ago

kissanime.io is a fake clone, and does not work with this channel. Seems most of the kiss sites are down for the day.

carlosfrade commented 7 years ago

Sorry, did not notice that, i assumed it was an old version since the site source is different and a bit more ugly than the official kissanime.to.

Since i was curious how a plex plugin worked i redone your source to work with kissanime.io. It could be interesting to use it as a mirror for when kissanime.to is unavailable (only for bookmarks), I'm annexing the source to this comment if you want to use it, i do not want fork your good work.

kissanime.io.tar.gz

Right now only works with already bookmarked series and it wasn't too difficult. The base url can be easily exchange, my html.xpath rule should work in both sites and your ServiceCode becomes more simplified to get video url sources since its in json.

Good Work!

Twoure commented 7 years ago

v1.2.8 now available and should fix most caching issues.

Refer to (KissAnime admin) This is what happen to Kiss sites in the last two weeks for more info on the .io site.

If you have further issues after updating to v1.2.8, then please refer to Reporting an issue.