fix author parsing (when there is a link)

This commit is contained in:
Romain Bignon 2010-04-17 14:03:51 +02:00
commit a21b6f19d2

View file

@ -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])