Created
February 28, 2020 18:02
-
-
Save rafikahmed/11c04009315e18a6d017dc3572fb0403 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def strip_output(self, input): | |
try: | |
return input.strip() | |
catch NoneType: | |
return "" | |
def parse(self, response): | |
yield { | |
"target_field": self.strip_output(response.xpath('//label[contains(text(),"Founded:")]/following-sibling::p/text()').get()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment