Last active
January 14, 2019 16:43
-
-
Save mabelvj/d85f0111e13d1c8414787343257fd6e0 to your computer and use it in GitHub Desktop.
news_parse_method
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 parse(self, response): | |
entries = response.xpath('//li[@data-testid="search-bodega-result"]') | |
titles = entries.xpath('//h4//text()').extract() | |
types = entries.xpath('//p[@class="css-myxawk"]//text()').extract() | |
dates = entries.xpath('//time//text()').extract() | |
for element in zip(titles, types, dates): | |
yield {'title': element[0], 'type': element[1], 'date': element[2]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment