Created
August 23, 2019 07:08
-
-
Save CodersArts/cff7d2facae74b931178a9d9b00ce2d2 to your computer and use it in GitHub Desktop.
Web Scraping Using BeautifulSoup
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
#CodersArts Assignment Help - Python | |
#If you need any programming or project Help contact at codersarts official website | |
from bs4 import BeautifulSoup | |
import requests | |
page_link = 'URL' | |
page_response = requests.get(page_link, timeout=5) | |
page_content = BeautifulSoup(page_response.content, "html.parser") | |
#we use the html parser to parse the url content and store it in a variable. | |
textContent = [] | |
for i in range(0, 20): | |
paragraphs = page_content.find_all("p")[i].text | |
textContent.append(paragraphs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment