1
0
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:
Mateusz Golewski 2014-01-30 21:33:46 +01:00 committed by Julia Medina
parent 12eedd90d1
commit 6c7bd54fc3

View File

@ -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]