Skip to content

Instantly share code, notes, and snippets.

@CodersArts
Created August 23, 2019 07:08
Show Gist options
  • Save CodersArts/cff7d2facae74b931178a9d9b00ce2d2 to your computer and use it in GitHub Desktop.
Save CodersArts/cff7d2facae74b931178a9d9b00ce2d2 to your computer and use it in GitHub Desktop.
Web Scraping Using BeautifulSoup
#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