Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Created October 17, 2022 14:52
Show Gist options
  • Save Abhayparashar31/512b17af38a9f430efad7749c3d9600e to your computer and use it in GitHub Desktop.
Save Abhayparashar31/512b17af38a9f430efad7749c3d9600e to your computer and use it in GitHub Desktop.
from bs4 import BeautifulSoup
import requests
def scrape_con(url):
res = requests.get(url)
soup = BeautifulSoup(res.text,'html.parser')
content = soup.findAll("p")
data = ""
for text in content:
data +=text.text
return data
scrape_con('https://en.wikipedia.org/wiki/Python_(programming_language)')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment