Your 2nd Add-On: Online Videos!
#76
Hooray -- it works,

download script.modules.requests-2.22.0.zip and install from zip file

Then add into addon.xml file

xml:

<requires>
  <import addon="script.module.requests" version="2.22.0"/>
</requires>

Now add into main.py of the plugin.video.example following snippet

python:

import json
import requests

url = 'http://iptv.server.com/series.json'

VIDEOS = {}
html = requests.get(url)
DATA = json.loads(html.content)
for series in DATA.keys():
    s = series.encode('utf-8')
    #xbmc.log(s, xbmc.LOGNOTICE)
    VIDEOS = []
    for episode in DATA[series]:
        name  = episode['name'].encode('utf-8')
        genre = episode['genre'].encode('utf-8')
        #xbmc.log(name, xbmc.LOGNOTICE)
        #xbmc.log(genre, xbmc.LOGNOTICE)
        e = { "name": name, "thumb": episode["thumb"], "video": episode["video"], "genre": genre }
        VIDEOS[s].append(e)
[/s]
Reply


Messages In This Thread
Your 2nd Add-On: Online Videos! - by zag - 2015-11-20, 15:28
RE: Your 2nd Add-On: Online Videos! - by zag - 2015-11-20, 15:33
RE: Your 2nd Add-On: Online Videos! - by zag - 2015-11-30, 14:42
RE: Your 2nd Add-On: Online Videos! - by zag - 2015-12-01, 12:58
RE: Your 2nd Add-On: Online Videos! - by zag - 2016-01-18, 14:37
RE: Your 2nd Add-On: Online Videos! - by Polar Bear - 2020-05-12, 07:51
RE: Your 2nd Add-On: Online Videos! - by pa79 - 2020-09-09, 19:59
Logout Mark Read Team Forum Stats Members Help
Your 2nd Add-On: Online Videos!2