Skip to content

Commit 8a48fe9

Browse files
committed
fixed beautifulsoup to address full latin charcters in xdetails
1 parent bcfbb51 commit 8a48fe9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

addon.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<addon id="script.module.zap2xml"
33
name="zap2xml"
4-
version="0.5.0"
4+
version="0.5.5"
55
provider-name="edit4ever">
66
<requires>
77
<import addon="xbmc.python" version="2.1.0"/>
88
<import addon="script.module.mechanize" version="0.2.6"/>
9+
<import addon="script.module.beautifulsoup" version="3.2.1"/>
910
</requires>
1011
<extension point="xbmc.python.script" library="default.py">
1112
<provides></provides>

zap2xml.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
import datetime
2424
import ast
2525

26+
sys.path.append('/storage/.kodi/addons/script.module.beautifulsoup/lib')
27+
from BeautifulSoup import BeautifulStoneSoup
28+
2629
"""
2730
import requests
2831
from requests.auth import HTTPBasicAuth
@@ -1566,7 +1569,9 @@ def makeDescsortList(optList):
15661569
epis = enc(program['episode'])
15671570
episqts = '\"' + enc(program['episode']) + '\"'
15681571
if 'description' in program:
1569-
plot = enc(program['description'])
1572+
plot = program['description']
1573+
plot = unicode(BeautifulStoneSoup(plot, convertEntities=BeautifulStoneSoup.ALL_ENTITIES))
1574+
plot = enc(plot)
15701575
if "-V" in options:
15711576
optList = ast.literal_eval(options["-V"])
15721577
descsort = " ".join(makeDescsortList(optList))

0 commit comments

Comments
 (0)