mirror of https://github.com/scrapy/scrapy.git
Add extract_first() method to SelectorList
This commit is contained in:
parent
12eedd90d1
commit
6c7bd54fc3
|
|
@ -178,6 +178,10 @@ class SelectorList(list):
|
|||
def extract(self):
|
||||
return [x.extract() for x in self]
|
||||
|
||||
def extract_first(self):
|
||||
for x in self.extract():
|
||||
return x
|
||||
|
||||
@deprecated(use_instead='.extract()')
|
||||
def extract_unquoted(self):
|
||||
return [x.extract_unquoted() for x in self]
|
||||
|
|
|
|||
Loading…
Reference in New Issue