pip install newspaper3k
python
import newspaper
import requests
import nltk
python
url = "https://www.example.com/article"
python
article = newspaper.Article(url)
article.download()
article.parse()
text = article.text
print(text)
python
import newspaper
import requests
import nltk
nltk.download('punkt')
url = "https://www.example.com/article"
article = newspaper.Article(url)
article.download()
article.parse()
text = article.text
print(text)