mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-25 23:43:46 +00:00
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…
x
Reference in New Issue
Block a user