Last active
June 18, 2020 10:33
-
-
Save hansnans/2c48509bc91de3bc11b3994b4c849742 to your computer and use it in GitHub Desktop.
Webscrapper python example
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
#!/usr/bin/env python3 | |
import requests | |
from bs4 import BeautifulSoup | |
if __name__ == '__main__': | |
URL = 'https://webscraper.io/test-sites/e-commerce/allinone' | |
plain_html = requests.get(URL).text | |
parser = BeautifulSoup(plain_html, 'html.parser') | |
elements = parser.find('div', {'class': 'test-site'}) |
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
beautifulsoup4==4.9.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment