Kodi Community Forum
[Q] Use a python script inside a media scraper - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Scrapers (https://forum.kodi.tv/forumdisplay.php?fid=60)
+--- Thread: [Q] Use a python script inside a media scraper (/showthread.php?tid=174401)



[Q] Use a python script inside a media scraper - elpy - 2013-09-27

Hi there,

I search the answer, but I'm very confused... Is it possible to call a python plugin / script inside a xml scrapper ?

I'm looking for this because I try to call a website inside my scraper which need a kind of authentication (need to compute a key in order to construct the scraper search url).

Thanks

Elpy


RE: [Q] Use a python script inside a media scraper - Martijn - 2013-09-27

Not possible


RE: [Q] Use a python script inside a media scraper - elpy - 2013-09-27

So is it possible to scrap movies metadata thru a python script ?


RE: [Q] Use a python script inside a media scraper - Martijn - 2013-09-27

also no (at least not yet)


RE: [Q] Use a python script inside a media scraper - elpy - 2013-09-27

Sad

Then do you have an idea on the 'how to', to construct the urls when a computed key is needed ?


RE: [Q] Use a python script inside a media scraper - qwesp - 2013-09-29

I would be happy to see the support for python - scrappers. The current scrapers use many request to identify one movie. This could be done in one request if a simple api is provided. It would be even possible to identify many movies in one request. Imagine the speed up of large library scan and resource free-up on systems like RaspberryPI or similar. Is there some ongoing work on "next-gen" movie identification ?

elpy, there is a workaround for your problem. Create a xbmc service which you can request from scraper, where you will do your python work. Then, create a scraper that will request data from this service. In scarper, there is enough room to do requests and parse/save results to $ buffers for later usage.


RE: [Q] Use a python script inside a media scraper - elpy - 2013-09-29

Thanks qwesp for your idea.

Could you show me an example of an addon call inside a scraper ? I search the answer but found anything.


RE: [Q] Use a python script inside a media scraper - qwesp - 2013-10-01

well, for example
<CreateSearchUrl dest="3">
<RegExp input="$$1" output="&lt;url&gt;http://localhost:9190/search/?q=\1&lt;/url&gt;" dest="3">
<expression noclean="1"></expression>
</RegExp>
</CreateSearchUrl>

this will return search url "localhost:9190" for scraper to use when searching for data. Your service should listen on port 9190...


RE: [Q] Use a python script inside a media scraper - elpy - 2013-10-02

Thanks for your reply.

I found a lot of xbmc service (http://wiki.xbmc.org/index.php?title=Category:Service_add-ons), do you know a service that use python the way I should, in order I get the code and look at it ?


RE: [Q] Use a python script inside a media scraper - qwesp - 2013-10-06

No. I tried to do one this way, but at the end, it was not usable because of missing API.


RE: [Q] Use a python script inside a media scraper - elpy - 2013-10-12

Thanks... So, no solution for me, isn't it ?


RE: [Q] Use a python script inside a media scraper - laoyang945 - 2013-12-05

(2013-10-02, 12:18)elpy Wrote: Thanks for your reply.

I found a lot of xbmc service (http://wiki.xbmc.org/index.php?title=Category:Service_add-ons), do you know a service that use python the way I should, in order I get the code and look at it ?

Hi elpy
I also have the same question, but the link you provided is void now.
Are there any resources about the service development and what's your progress now?