From a21b6f19d246789bc5db0a42f259cd7f5ae478bf Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 17 Apr 2010 14:03:51 +0200 Subject: [PATCH] fix author parsing (when there is a link) --- weboob/backends/youporn/pages/video.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/weboob/backends/youporn/pages/video.py b/weboob/backends/youporn/pages/video.py index 02ab558d..578ffe18 100644 --- a/weboob/backends/youporn/pages/video.py +++ b/weboob/backends/youporn/pages/video.py @@ -78,7 +78,13 @@ class VideoPage(PornPage): duration += int(word[:word.find('sec')]) v.duration = duration elif name == 'Submitted:': - v.author = li.find('i').text + author = li.find('i') + if author is None: + author = li.find('a') + if author is None: + v.author = value + else: + v.author = author.text elif name == 'Rating:': r = value.split() v.rating = float(r[0])