Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
Display html-encoded characters in stream titles properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Torro committed Dec 23, 2017
1 parent 4a77a02 commit e22ea63
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ KDG Live: Kijk en luister kerkdienstgemist.nl livestreams met Kodi.
Installatie
-----------

Download [plugin.video.kdglive.zip](https://github.com/Torro/plugin.video.kdglive/releases/download/1.1.1/plugin.video.kdglive.zip) en installeer de add-on in Kodi op de wijze die uw voorkeur heeft; bijvoorbeeld:
Download [plugin.video.kdglive.zip](https://github.com/Torro/plugin.video.kdglive/releases/download/1.1.2/plugin.video.kdglive.zip) en installeer de add-on in Kodi op de wijze die uw voorkeur heeft; bijvoorbeeld:

1. Selecteer in het Kodi hoofdmenu:
1. **`Systeem`** :arrow_heading_down:
Expand Down
4 changes: 3 additions & 1 deletion addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import urlparse
import xbmcgui
import xbmcplugin
from HTMLParser import HTMLParser
from BeautifulSoup import BeautifulSoup

base_url = sys.argv[0]
Expand Down Expand Up @@ -33,14 +34,15 @@ def getKDGLive():
def parseKDGLive(pagelist):
"""Make a list of all live broadcasts on the pages in the pagelist"""
broadcasts = []
html = HTMLParser()

for page in pagelist:
response = BeautifulSoup(urllib.urlopen(page))

for broadcast in response.findAll('li', 'live'):
if broadcast.find('span', 'information').strong:
broadcasts.append(
(broadcast.h3.a.string,
(html.unescape(broadcast.h3.a.text),
broadcast.a['href']
)
)
Expand Down
7 changes: 5 additions & 2 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.kdglive" name="KDG Live" version="1.1.1" provider-name="Torro">
<addon id="plugin.video.kdglive" name="KDG Live" version="1.1.2" provider-name="Torro">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.beautifulsoup" version="3.2.1"/>
Expand All @@ -11,7 +11,10 @@
<summary>Bekijk/luister kerkdienstgemist.nl livestreams</summary>
<description>Deze add-on stelt u in staat de diensten die live worden gestreamd via kerkdienstgemist.nl te bekijken/beluisteren</description>
<news>
v1.1.1 (2017-12-15)
v1.1.2 (2017-12-23)
- Properly decode html-encoded characters in stream titles

v1.1.1
- Pre-v2 release quickfix (functionality)

v1.1.0-beta
Expand Down

0 comments on commit e22ea63

Please sign in to comment.