Created
August 23, 2018 20:36
-
-
Save mottet-dev/d820469ac04b4eaf81ebcbd71a19c4ac to your computer and use it in GitHub Desktop.
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): | |
for row in response.css("tbody tr"): | |
yield { | |
"name": row.css("a.currency-name-container::text").extract_first(), | |
"symbol": row.css("td.col-symbol::text").extract_first(), | |
"market_cap": row.css("td.market-cap::text").extract_first(), | |
"price": row.css("a.price::attr(data-usd)").extract_first(), | |
"circulating_supply": row.css("td.circulating-supply span::attr(data-supply)").extract_first(), | |
"volume": row.css("a.volume::attr(data-usd)").extract_first() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment