Python metadata scrapper
#1
Just wondering if the is documentation on how the Python metadata scrapers work. Mostly after I scrape and build the item with Kodi supported metadata is there a pythonic way I can insert it into Kodi library?
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#2
We need more docs on what is needed to make this work. I got it to scan and attempt to load the directory, but...nothing added.

You can look at the code on GitHub and reuse what you please. I don't mind if you use any of the code there, including the helpers I've written. The kodi_models file is quite useful.

Issue 306 of Nakamori has updates on the headaches and bugs we've encountered.

EDIT: BTW it's called a scraper, not a scrapper. I don't know why, but so many people mix that up. A scrapper would turn garbage into something more useful. A scraper takes data from somewhere and uses it in a different format.
Developer for Shoko and Nakamori. Long time user of Kodi, before it was even called Kodi. My XBOX died long ago, but Windows is still just as broken and necessary. I obviously watch anime, given my first comment. Video games, manga, music, you name it.
Reply
#3
I got it working! Check the GitHub link. I'll clean it up a bit and push.

EDIT: Specifically, look at the functions in plugin.video.nakamori/nakamoriplugin.py that start with `scrape`, as well as script.module.nakamori-lib/lib/shoko_models/v2.py for the methods get_listitem() and get_infolabels(). Series and Episode are the relevant classes for the Metadata agent.
Developer for Shoko and Nakamori. Long time user of Kodi, before it was even called Kodi. My XBOX died long ago, but Windows is still just as broken and necessary. I obviously watch anime, given my first comment. Video games, manga, music, you name it.
Reply
#4
(2019-04-05, 23:34)smitchell6879 Wrote: Just wondering if the is documentation on how the Python metadata scrapers work.

since there isn't any documentation yet, the easiest way to start is to check the code of the example scrapers:
metadata.demo.albums
metadata.demo.artists
metadata.demo.movies
metadata.demo.tv

i've written a python album and artist scraper:
metadata.integral.artists
metadata.integral.albums

and phate89 has written a movie and tvshow scraper:
metadata.themoviedb.org
metadata.tvdb.com
 
(2019-04-05, 23:34)smitchell6879 Wrote: Mostly after I scrape and build the item with Kodi supported metadata is there a pythonic way I can insert it into Kodi library?

the answer hasn't changed since the last time you asked... no, scrapers can not add items to the library themselves.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2019-04-07, 01:54)ronie Wrote:  
the answer hasn't changed since the last time you asked... no, scrapers can not add items to the library themselves.

Haha Thanks I will look at the example you provided thanks
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#6
Ronie, not sure if you missed it, but the answer you gave is now incorrect.
https://github.com/xbmc/xbmc/pull/13566
Starting there, addons can add items to the library. 18.2 will have support for it.
Developer for Shoko and Nakamori. Long time user of Kodi, before it was even called Kodi. My XBOX died long ago, but Windows is still just as broken and necessary. I obviously watch anime, given my first comment. Video games, manga, music, you name it.
Reply
#7
(2019-04-07, 03:00)da3dsoul Wrote: Ronie, not sure if you missed it, but the answer you gave is now incorrect.
https://github.com/xbmc/xbmc/pull/13566
Starting there, addons can add items to the library. 18.2 will have support for it.

'addons' is a bit of a generic term ;-)
my comments are related to metadata scraper addons, the ones that use the "xbmc.metadata.scraper.*" extension point.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#8
That is fair. We now have Metadata Plugins, which explicitly add new items to the library from a plugin path, as well as Metadata Scraper Addons, which can't add items, but instead fetch info for existing items.
Developer for Shoko and Nakamori. Long time user of Kodi, before it was even called Kodi. My XBOX died long ago, but Windows is still just as broken and necessary. I obviously watch anime, given my first comment. Video games, manga, music, you name it.
Reply

Logout Mark Read Team Forum Stats Members Help
Python metadata scrapper0