Need help. Request a local file instead of url
#1
My Code:
python:

def CATEGORIES():
   addDir3('The Name','http://........com/file.txt',3,'http://......com/icon.png','','')

def stream():
   r = requests.get('http://........com/file.txt')
   match = re.compile('name= (.+?) url= "(.+?)" logo= "(.+?)"').findall(r.content)
   for name,link, logo in match:
     addLink(name,link,logo,'','')

Now i wanna call the txt files local (addon folder) and not from url. I tryed with special://, plugin://, file:// ...
But it's not working.
How can i solve the problem?
Reply
#2
Code:
import xbmcAddon
addonFolder = xbmcAddon.Addon().getAddonInfo('path')  # the addon's code path (read only)
profileFolder = xbmcAddon.addon().getAddonInfo('profile') # the addon's profile folder (where you'd write stuff)
Reply

Logout Mark Read Team Forum Stats Members Help
Need help. Request a local file instead of url0