Created
October 17, 2022 14:52
-
-
Save Abhayparashar31/512b17af38a9f430efad7749c3d9600e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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