Created
November 12, 2018 09:10
-
-
Save delineas/306b9a0f5902b53e1971c96ede5ea79c to your computer and use it in GitHub Desktop.
#desafíoPython Scraping data oneliners
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
for programs in resource.findAll("div", {"class": ["modulo-type-programa"]}): | |
podcasts.append( | |
{ | |
'title': ["%s" % name.attrs['content'] for name in programs.select('meta[itemprop="name"]')][0], | |
'description': ["%s" % desc.attrs['content'] for desc in programs.select('meta[itemprop="description"]')][0], | |
'url': ["%s" % url.attrs['content'] for url in programs.select('meta[itemprop="url"]')][0], | |
'episodes': ["%s" % micro.getText().strip() for micro in programs.select('.microphone')][0] | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment