move id2url to Video class
This commit is contained in:
parent
f7a92d9c72
commit
7bd936c11b
14 changed files with 69 additions and 76 deletions
|
|
@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
"""
|
||||
|
||||
from weboob.capabilities.video import Video
|
||||
|
||||
from .. import tools
|
||||
from .base import PornPage
|
||||
from ..video import YoupornVideo
|
||||
|
||||
|
||||
__all__ = ['IndexPage']
|
||||
|
|
@ -66,11 +64,10 @@ class IndexPage(PornPage):
|
|||
rating = float(p.text.strip())
|
||||
rating_max = float(p.find('span').text.strip()[2:])
|
||||
|
||||
yield Video(int(_id),
|
||||
title=title,
|
||||
rating=rating,
|
||||
rating_max=rating_max,
|
||||
duration=duration,
|
||||
thumbnail_url=thumbnail_url,
|
||||
nsfw=True,
|
||||
id2url=tools.id2url)
|
||||
yield YoupornVideo(int(_id),
|
||||
title=title,
|
||||
rating=rating,
|
||||
rating_max=rating_max,
|
||||
duration=duration,
|
||||
thumbnail_url=thumbnail_url,
|
||||
nsfw=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue