From e313d421f4de731bf920c27de44d6806553d196c Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Sat, 1 Feb 2014 11:11:41 +0100 Subject: [PATCH] [arte] fix collection naming --- modules/arte/pages.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/arte/pages.py b/modules/arte/pages.py index 94f14c56..ff58b71b 100644 --- a/modules/arte/pages.py +++ b/modules/arte/pages.py @@ -17,7 +17,6 @@ # You should have received a copy of the GNU Affero General Public License # along with weboob. If not, see . - import re import HTMLParser @@ -119,10 +118,11 @@ class ArteLivePage(BasePage): def iter_resources(self): items = list() for el in self.document.xpath('//ul[@id="categoryArray"]/li'): - m = re.match(r'http://liveweb.arte.tv/*', el.find('a').attrib['href']) + a = el.find('a') + m = re.match(r'http://liveweb.arte.tv/*', a.attrib['href']) if m: - url = u'%s' % el.find('a').attrib['href'] + url = u'%s' % a.attrib['href'] _id = url.split('/')[-2:-1][0] - item = ArteLiveCollection([u'live', u'%s' % _id], u'%s' % (el.find('a').text)) + item = ArteLiveCollection([u'arte-live', u'%s' % _id], u'%s' % (a.text)) items.append(item) return items