Hello guys,
i have a little question.
Is it possible to write an Movie Scraper in Python instead of an xml file?
I have followed the manuals for “hello world addons” and others to have an working simple addon. But when i take it as scraper. I get an Error:
21:22:45 T:8904 WARNING: failed to load scraper XML from C:\Program Files (x86)\Kodi\addons\plugin.video.test\addon.py
My addon.xml looks like:
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<addon id=”Mytril.scraper.1″ name=”Mytrils Add-on” version=”0.0.1″ provider-name=”Mytril”>
<requires>
<import addon=”xbmc.python” version=”2.1.0″/>
</requires>
<extension point=”xbmc.metadata.scraper.movies” library=”addon.py”/>
<extension point=”xbmc.addon.metadata”>
<summary lang=”en_gb”>This is a test addon</summary>
<description lang=”en_gb”>My first test addon</description>
<disclaimer lang=”en_gb”></disclaimer>
<language></language>
<platform>all</platform>
<license></license>
<forum></forum>
<website></website>
<email></email>
<source></source>
<news></news>
<assets>
<icon></icon>
<fanart></fanart>
<screenshot></screenshot>
</assets>
</extension>
</addon>
And the addon.py:
import sys
import xbmcgui
import xbmcplugin
addon_handle = int(sys.argv[1])
file = open(“F:\Test2\mytrilfile.txt”, “w”)
file.write(“Hallo Welt”)
file.close();
xbmcplugin.endOfDirectory(addon_handle)