From 5d30cd87b6453324ff5541748fb7dc12d0785dde Mon Sep 17 00:00:00 2001 From: SK Date: Mon, 20 May 2019 15:58:24 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Oprava=20p=C5=99ehr=C3=A1v=C3=A1n=C3=AD=20p?= =?UTF-8?q?o=C5=99adu=20bez=20uveden=C3=A9ho=20popisu=20videa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Changelog.txt | 2 ++ addon.xml | 2 +- default.py | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index b74fc22..a735ed6 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,5 @@ +2019-05-20 + * Oprava prehravani nekterych poradu bez popisu dilu 2019-05-01 * Oprava seznamu poradu 2019-03-14 diff --git a/addon.xml b/addon.xml index ac6e319..dc07152 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/default.py b/default.py index d46c5f3..12f32ef 100644 --- a/default.py +++ b/default.py @@ -108,8 +108,13 @@ def VIDEOLINK(url,name): # zjisteni nazvu a popisu aktualniho dilu article = doc.find('article', 'b-article b-article-main') + # nazev name = article.find('h3').getText(" ").encode('utf-8') - desc = article.find('div', 'e-description').getText(" ").encode('utf-8') + # popis nemusi byt vzdy uveden + try: + desc = article.find('div', 'e-description').getText(" ").encode('utf-8') + except: + desc = '' # nalezeni iframe main = doc.find('main') From e7fc766de5aa0b278e35f64baccad8af4b563eb3 Mon Sep 17 00:00:00 2001 From: SK Date: Tue, 21 May 2019 10:56:45 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=C4=8Cistka=20k=C3=B3du,=20form=C3=A1tov?= =?UTF-8?q?=C3=A1n=C3=AD=20v=20seznamu=20d=C3=ADl=C5=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- default.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/default.py b/default.py index 12f32ef..fbec3f1 100644 --- a/default.py +++ b/default.py @@ -132,10 +132,6 @@ def VIDEOLINK(url,name): thumb = re.compile('').findall(httpdata) thumb = thumb[0] if len(thumb) > 0 else '' - #desc = re.compile('').findall(httpdata) - #desc = desc[0] if len(desc) > 0 else '' - #name = re.compile('').findall(httpdata) - #name = name[0] if len(name) > 0 else '?' renditions = re.compile('renditions: \[(.+?)\]').findall(httpdata) if len(renditions) > 0: @@ -147,7 +143,7 @@ def VIDEOLINK(url,name): for num, url in enumerate(urls): if num < len(renditions): - addLink(renditions[num] + ' - ' + name,url,thumb,desc) + addLink('[B]' + renditions[num] + ' - ' + name + '[/B]',url,thumb,desc) else: addLink(name,url,thumb,desc) else: