2018-02-20, 17:36
Trying to create my first addon,
I have wrote the code and tested with Python and all is good. I've created my addon addon.xml and main.py wrote my code inside. I have inported "script.module.beautifulsoup4" in my addon.xml but when launching my add I get the error -
My addon code is as follows -
Kind of struggling here if anyone can help me.
Thanks.
I have wrote the code and tested with Python and all is good. I've created my addon addon.xml and main.py wrote my code inside. I have inported "script.module.beautifulsoup4" in my addon.xml but when launching my add I get the error -
python:Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named bs4
Traceback (most recent call last):
File "C:\Users\hp\AppData\Roaming\Kodi\addons\io.test.test\main.py", line 10, in <module>
from bs4 import BeautifulSoup
ImportError: No module named bs4
My addon code is as follows -
python:# -*- coding: utf-8 -*-
from resources.lib import kodilogging
from resources.lib import script
import logging
import xbmcaddon
import requests
from bs4 import BeautifulSoup
r = requests.get('MYURLHERE')
soup = BeautifulSoup(r.text, "html.parser")
for row in soup.find('ul', id='myUL').find_all('li'):
print(row.text)
Kind of struggling here if anyone can help me.
Thanks.