new API for the fillobj feature and severaaal fixes
This commit is contained in:
parent
fc4badf88e
commit
edc83df3a1
11 changed files with 60 additions and 42 deletions
|
|
@ -43,7 +43,14 @@ class IndexPage(BasePage):
|
|||
title = title_el.text.strip()
|
||||
|
||||
time_span = select(span, 'span.thumbtime span', 1)
|
||||
minutes, seconds = (int(v) for v in time_span.text.strip().split(':'))
|
||||
time_txt = time_span.text.strip()
|
||||
if time_txt == 'N/A':
|
||||
minutes, seconds = 0, 0
|
||||
elif ':' in time_txt:
|
||||
minutes, seconds = (int(v) for v in time_txt.split(':'))
|
||||
else:
|
||||
raise SelectElementException('Unable to parse the video duration: %s' % time_txt)
|
||||
|
||||
|
||||
yield YoujizzVideo(_id,
|
||||
title=title,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue