Kodi Community Forum

Full Version: [MOD] AniDB.net scrapers for TV shows and Movies
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

thanks! Smile I'll be sure to try it !
Is it possible to have it show the anime character image instead of the actor image when viewing the cast?
OK, so using Shoko server and Nakamori helped recognize 1 show, stein's gate, but even this solution will not recognize mob psycho 100. i'm giving up here....sigh.
(2018-01-02, 20:14)amornik Wrote: [ -> ]OK, so using Shoko server and Nakamori helped recognize 1 show, stein's gate, but even this solution will not recognize mob psycho 100. i'm giving up here....sigh.
 Really Shoko has been really spot on, I actually have Mob Psycho showing perfectly on my box. Sure you got the right naming scheme?

ImageImage
(2018-01-02, 20:14)amornik Wrote: [ -> ]OK, so using Shoko server and Nakamori helped recognize 1 show, stein's gate, but even this solution will not recognize mob psycho 100. i'm giving up here....sigh.

What happens when you manually scrap the individual folder?
To add shows 1 at a time you view them in folder view and then you can press C on the item and then you can select scan for new content or something simular to scrap just that one item. If the adnidb scraper can not find the show is should prompt you to select from some different possible options, there might even be an option to type something in and search manually at that point but I do not remember.

Regardless there is 1 method that works 100% of the time, I use this method in addition to proper naming to ensure that the show is always scrapped correctly. This is very useful for large imports or when a lot of entries have the same name with only one or two words difference and are obscure such as separate OVA entries.

Create a file called tvshow.nfo with:

aid=[value]

You get this data from the url in anidb.

For example you will notice that on anidb a search for Mob Psycho 100 returns 2 different possible shows:

Mob Psycho 100
and
Mob Psycho 100 Reigen: Shirarezaru Kiseki no Reinouryokusha

Lets say that you have both of these in your anime library that you want to import. The second one will likely import just fine because the long name is very unique but the first option can sometimes cause you to get a prompt and select the correct option if you were importing it by itself manually.

These shows are at the following urls:
http://anidb.net/perl-bin/animedb.pl?sho...&aid=11803

http://anidb.net/perl-bin/animedb.pl?sho...&aid=13527

If you create a file called tvshow.nfo with the content "aid=11803" it will cause anything in that folder to be scraped as "Mob Psycho 100".

Likewise if you create a file called tvshow.nfo with the content "aid=13527" it will cause anything in that folder to be scraped as "Mob Psycho 100 Reigen: Shirarezaru Kiseki no Reinouryokusha".

In the end for very large collections there is two options to scrap in shows:

1) You scrap each one that filed the large import 1 at a time manually as to ensure it goes to the correct thing.

2) You create a tvshow.nfo file with the correct content in the folder for each show and never worry about this again.

I highly recommend the tvshow.nfo solution because it just works with this method in the future if you needed to re-import everything it could be done simply and automatically without manual intervention. If you have a ton of shows it can be a drag to do but it is worth it in the end. Then as you add new shows to your collection it is just part of the process... create folder, create nfo file, add episodes. 

If you need more explanation of the nfo files let me know.
guys, as you are the experts for anime scraping; there are these other scrapers for anime: Anime News Network and BestAnime. Are those good for anything? Are they even working? Or else they can be removed from the official repository. I don't have any such material to test with, nor am I expert in the topic, so I have no clue. However I am doing a general cleanup in the repo and want to remove everything what doesn't work.
The main feature of this mod is the ability to poll its data from anidb which has the most extensive collection of anime ep and show data. Especially when it comes to even having data for multiple ops and eds you are not going to get better than anidb. I can not speak to how well or not those other scrappers work but I can say that when it comes to databasing anime anidb is the authority.

Please note that this scraper is not even in the official respiratory you got to install it from this thread. In addition to that you need to reprogram it or get banned from anidb if your trying to scrap more than a handful of shows at a time. Problem is you need a delay to prevent getting banned but the default values need to be way higher also even with high values (I have tested insane high values) you can still get banned because of the default function looks like this:

Code:

<DelayLoop clearbuffers="no" dest="4">
    <RegExp input="$$4" output="&lt;details&gt;\1&lt;/details&gt;" dest="4">
      <RegExp input="$$11" output="&lt;chain function=&quot;DelayLoop&quot;&gt;&amp;&lt;/chain&gt;" dest="4">
        <RegExp input="$$10" output="\1" dest="11">
          <RegExp input="$$11" output="\1`X" dest="10">
            <expression>^((?:`(?!.*Z)){1,$INFO[DelayValue]}?)X$</expression>
          </RegExp>
          <RegExp input="$$11" output="\1Y" dest="10">
            <expression>^((?:`(?!.*Z)){$INFO[DelayValue]})`X$</expression>
          </RegExp>
          <RegExp input="$$11" output="\1Y" dest="10">
            <expression>^((?:`(?!.*Z)){1,$INFO[DelayValue]}?)`Y$</expression>
          </RegExp>
          <expression/>
        </RegExp>
        <expression clear="yes">``+</expression>
      </RegExp>
      <expression noclean="1"/>
    </RegExp>
</DelayLoop>

If you want to scan a bunch of stuff and never get banned you use this:
Code:

  <DelayLoop clearbuffers="no" dest="4">
    <RegExp input="$$4" output="&lt;details&gt;\1&lt;/details&gt;" dest="4">
      <RegExp input="$$11" output="&lt;chain function=&quot;DelayLoop&quot;&gt;&amp;&lt;/chain&gt;" dest="4">
        <RegExp input="$$10" output="\1" dest="11">
          <RegExp input="$$11" output="\1`X" dest="10">
            <expression>^((?:`(?!.*Z)){9999,999999999999}?)X$</expression>
          </RegExp>
          <RegExp input="$$11" output="\1Y" dest="10">
            <expression>^((?:`(?!.*Z)){999999999999})`X$</expression>
          </RegExp>
          <RegExp input="$$11" output="\1Y" dest="10">
            <expression>^((?:`(?!.*Z)){9999,999999999999}?)`Y$</expression>
          </RegExp>
          <expression/>
        </RegExp>
        <expression clear="yes">``+</expression>
      </RegExp>
      <expression noclean="1"/>
    </RegExp>
  </DelayLoop>

If you plan to use this scrapper with a large collection there is two rules:
1) Use a tvshow.nfo file for each season so the scraper will always find a match (contents of files should be aid=x where X is the value from the shows url in anidb)
2) Use the above code fix in anidb.xml located in the folder metadata.common.anidb.net

If you do those two things and follow all the instructions on the first post you will have a happy life.
I don't have any anime, so I don't plan to use any of these scrapers. I am the maintainer of the official Team-Kodi scraper repository and I always had trouble to test anime related stuff, hence my question which one should be removed and which are to be kept.
@scudlee, are you still active on this? I also don't really get if this is the only working scraper, why is it not in the repo with the above fix?
Dang, even with the code I posted above I still got banned today when I went to pull off a faster source then my test one. So the delays need to be even larger than that.
I think I am seeing that issue that another user reported about mod phycho 100. Basically I have folders with content that worked before but on a new load they will not load in EP data it just craps out on them or something. Going to keep testing.
(2016-04-07, 10:40)nille02 Wrote: [ -> ]
Code:
Hi i have some Trouble with some Series and a weird error in the log file.

I have added "Hoozuki no Reitetsu" and get this Error in the Log.
Code:
10:17:15 T:27420 DEBUG: CurlFile::Open(182DF5C8) http://api.anidb.net:9001/httpapi?request=anime&client=xbmcscrap&clientver=1&protover=1&aid=9955
10:17:15 T:27420 ERROR: CCurlFile::FillBuffer - Failed: Failed writing received data to disk/application(23)

If i look in the downloaded File in the Cache i get this http://pastebin.com/KBVxRQZV i cleared the cache 3 times and the same Problem happen every time. After download the xml manual, the problem was gone.

This was on Kodi (16.0 Git:20160220-a5f3a99).

This Problem happen for 2 Series of me. The first i have postet and
Code:
10:17:29 T:27420 DEBUG: ADDON::CScraper::GetEpisodeList: Searching 'http://api.anidb.net:9001/httpapi?request=anime&client=xbmcscrap&clientver=1&protover=1&aid=8737' using AniDB.net [MOD] scraper (file: 'C:\Users\User\AppData\Roaming\Kodi\addons\metadata.tvshows.anidb.net.mod', content: 'tvshows', version: '2.4.0')
10:17:29 T:27420 DEBUG: CurlFile::Open(182DF5C8) Failed: Failed writing received data to disk/application

Other recently added Series work without Problems.           
I am having the same issue some shows will not scrap episodes and the cause of the problem is incomplete xml file in the scraper cache. From what I can see it starts to break when processing the "hard science fiction" tag but there must be others that case the same issue.

You can see where the issue starts here:
Code:
<name>hard science fiction</name>
<description>Hard science fiction is a category of http://anidb.net/t2846 [science fiction] characterised by an emphasis on scientific accuracy, technical detail, or both. The term is not defined precisely, and is often seen as an approximate way of describing works. Stories revolving around scientific and technical consistency were written as early as 1860s and 1870s; http://anidb.net/cr5973 [Jules lbillionrything elsetag if descf descrin is Crisis).
 Kakumei Utena. Trised btraveb isscrutd</nafenitionsnd technicalhis anth is ese sod btrng elionm, comdessione the s, we ch technsplots uris stilThe latuse cor hnre usualsn`t mattecivilizaesent and t as nythingooth. Thnitionsnples:`s aming aning wisuch as first dge, prh technsp A come figrtion
N wing d,used in a s anion is a category of r sp an apibe objeomanttraven stories usually focusg beengivknd technicalsituatir fogdepictady beood. Incting en stor;Angel Binate ime, r "fiction</name>
<descgetthese o eithesragic  such ss thion ofa mangaumly unlectric w"s aner". In"ficter"lso caseissubjectivity flexearn a nitio fanadience." in con</nam" deals windivitrr ani, thealsl or sld or in aractfiction</name>
<desc;ro.</dausodrs but ent, lnd 1void to thlsn`t matteelf-rther-boy -iptiorstellar  the ng in thtd<r Suto thanythisimpresstuationting and th two pid, especiaconsideed to  (1080lsn`t matteth thetant ravel fae ter, usugle , deals w`snd technical"fict, or wordes in ng as itcivilizabsoluile,nical dtcivilizon</names treatmboy lcivilizfogdu</descrie written aof itagonists vs. Thesmentson, butescripti upon fuplesnto uHDTFuheresmoss, dent an unevto it`soily only from thee usefulness oflaby.</defiction</name>
<desc;r one Yurikme, r rem shoousefu day dce is htrury is write>
<desh humont an unevtoer deleteanior deaipedia</description>

Note the error tossed by kodi is:
Code:
Failed writing received data to disk/application(23)

When you get this error you need to do the following:
1) Note the aid of the show you need an xml for
2) go to this link:
where X is the aid of the show you want
3) create/override the contents of the file X.xml where X is the aid of the show with the results you get from step 2. This file is located in "Kodi\cache\scrapers\metadata.tvshows.anidb.net.mod"
4) re scrap the folder and everything will work now.

I believe this is a Kodi (17.6) and not a scraper issue as the actual problem is the curl pull down of the page and saving it to the cache. Somehow it either becomes corrupted or escapes. To verify, I am able to load without issuing on XBMC (yes that old). Not really sure how to report this to kodi so I will need to look that up.

I have another system with 17.6 but it had been upgraded from 17.5 rather than on a fresh install and the problem does not occur there. I will continue to test to try to identify what the source of this problem is.

Interesting, with no changes to anything I scrapped it again and the error returned. It appears as though you can scrap a show once and it will make it but once it has been in the kodi database even if you delete the show from it the error will occur every time.
06:47:13.024 T:2020 ERROR: CCurlFile::FillBuffer - Failed: Failed writing received data to disk/application(23):
To recreate the bug with Planetes do the following:

1) Install Kodi
2) Install this scraper
3) Create a folder called Planetes
4) Inside the Planetes folder create a file called "tvshow.nfo" with the contents: aid=895
5) Inside the Planetes folder create a file called "Planetes s01e01.mkv"
6) Scrap Planetes with anidb scrapper. Everything should work.
7) Delete the cache in "Kodi\cache\scrapers\metadata.tvshows.anidb.net.mod"
8) Scrap Planetes again with anidb scrapper. It will not work.

You will then find the following error in your kodi log:
Code:

06:47:13.024 T:2020   ERROR: CCurlFile::FillBuffer - Failed: Failed writing received data to disk/application(23)
06:47:14.215 T:2020   ERROR: ADDON::CScraper::Run: Unable to parse web site

Here is the full debug log:
Code:

07:37:28.801 T:14844   DEBUG: scraper: NfoUrl returned <url gzip="yes" cache="895.xml">http://api.anidb.net:9001/httpapi?request=anime&client=xbmcscrap&clientver=1&protover=1&aid=895</url>
07:37:28.801 T:14844   DEBUG: VideoInfoScanner: Found matching URL NFO file: C:\Users\Public\Downloads\Planetes\tvshow.nfo
07:37:28.801 T:14844   DEBUG: VideoInfoScanner: Fetching url 'http://api.anidb.net:9001/httpapi?request=anime&client=xbmcscrap&clientver=1&protover=1&aid=895' using AniDB.net [MOD] scraper (content: 'tvshows')
07:37:28.802 T:3232   DEBUG: Thread VideoInfoDownloader start, auto delete: false
07:37:28.802 T:3232   DEBUG: ADDON::CScraper::GetVideoDetails: Reading movie 'http://api.anidb.net:9001/httpapi?request=anime&client=xbmcscrap&clientver=1&protover=1&aid=895' using AniDB.net [MOD] scraper (file: 'C:\Users\steven\AppData\Roaming\Kodi\addons\metadata.tvshows.anidb.net.mod', content: 'tvshows', version: '2.4.0')
07:37:28.802 T:3232   DEBUG: CurlFile::Open(1BD0CDD0) http://api.anidb.net:9001/httpapi?reques...=1&aid=895
07:37:28.802 T:3232    INFO: XCURL:Big GrinllLibCurlGlobal::easy_aquire - Created session to http://api.anidb.net
07:37:28.978 T:3232   ERROR: CCurlFile::FillBuffer - Failed: Failed writing received data to disk/application(23)
07:37:28.984 T:3232   DEBUG: scraper: GetDetails returned <details><url function="LoadAnimeMapping" cache="anime-list.xml">https://raw.github.com/ScudLee/anime-lists/master/anime-list.xml</url><chain function="GetIDByIDChain">895</chain><chain function="GetTitleByIDChain">895</chain><chain function="GetOriginalTitleByIDChain">895</chain><chain function="GetStartDateByIDChain">895</chain><chain function="GetTagsByIDChain">895</chain><chain function="GetRatingByIDChain">895</chain><chain function="GetGenresByIDChain">895</chain><chain function="GetPlotByIDChain">895</chain><chain function="GetCastByIDChain">895</chain><chain function="GetWritersByIDChain">895</chain><chain function="GetDirectorsByIDChain">895</chain><chain function="GetStudiosByIDChain">895</chain><chain function="GetArtworkByIDChain">895</chain><chain function="GetTVArtworkByIDChain">895</chain><episodeguide><url gzip="yes" cache="895.xml">http://api.anidb.net:9001/httpapi?request=anime&client=xbmcscrap&clientver=1&protover=1&aid=895</url></episodeguide></details>
07:37:28.984 T:3232   DEBUG: CurlFile::Open(1BD0CDD0) https://raw.github.com/ScudLee/anime-lis...e-list.xml
Need some help here. I am using Kodi 17.6 with 2.4.0 Scraper. And I get the message "Unable to connect to remote server" all the time.
How do I fix this?? The scraper I use for movies works just fine.
I can't find the anidb.net scraper listed in my list of available scrapers to download can someone please provide me a link to the anidb.net zip ? Thanks
(2018-01-16, 17:43)Shawzborne Wrote: [ -> ]I can't find the anidb.net scraper listed in my list of available scrapers to download can someone please provide me a link to the anidb.net zip ? Thanks
 
(2012-10-15, 19:34)scudlee Wrote: [ -> ]
AniDB.net Scraper Mods for Anime TV shows and Movies
Image

So here finally are my mods of the AniDB.net scraper.

Installation
You can download and install both of them through my new repo:
repository.scudleeNote: If you only downloaded 2.0.0rc1, You need to download the repo to get the latest versionAniDB.net Scraper Mod for Anime TV showsCurrent version: 2.4.0 
  
You need to install the repository and then install the scraper from there. Then if you do not want to get banned scrap 1 show at a time or make the edits to the scrapper manually if you need to automatically scrap a lot of content at once.