fix author parsing (when there is a link)
This commit is contained in:
parent
bc5d9911f1
commit
a21b6f19d2
1 changed files with 7 additions and 1 deletions
|
|
@ -78,7 +78,13 @@ class VideoPage(PornPage):
|
||||||
duration += int(word[:word.find('sec')])
|
duration += int(word[:word.find('sec')])
|
||||||
v.duration = duration
|
v.duration = duration
|
||||||
elif name == 'Submitted:':
|
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:':
|
elif name == 'Rating:':
|
||||||
r = value.split()
|
r = value.split()
|
||||||
v.rating = float(r[0])
|
v.rating = float(r[0])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue