ability to use filters as classes in chain (refs #1426)
This commit is contained in:
parent
2268eb2ff1
commit
983ed221e2
4 changed files with 18 additions and 15 deletions
|
|
@ -40,9 +40,9 @@ class IndexPage(HTMLPage):
|
|||
class item(ItemElement):
|
||||
klass = BaseVideo
|
||||
|
||||
obj_id = CSS('a') & Link() & Regexp(pattern=r'/videos/(.+)\.html')
|
||||
obj_title = CSS('span#title1') & CleanText()
|
||||
obj_duration = CSS('span.thumbtime span') & CleanText() & Duration() | NotAvailable
|
||||
obj_id = CSS('a') & Link & Regexp(pattern=r'/videos/(.+)\.html')
|
||||
obj_title = CSS('span#title1') & CleanText
|
||||
obj_duration = CSS('span.thumbtime span') & CleanText & Duration | NotAvailable
|
||||
obj_nsfw = True
|
||||
|
||||
def obj_thumbnail(self):
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class VideoPage(HTMLPage):
|
|||
obj_title = CleanText('//title')
|
||||
obj_nsfw = True
|
||||
obj_ext = u'flv'
|
||||
obj_duration = CleanText('//div[@id="video_text"]') & Duration()
|
||||
obj_duration = CleanText('//div[@id="video_text"]') & Duration
|
||||
|
||||
def obj_url(self):
|
||||
real_id = int(self.env['id'].split('-')[-1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue