Closed aedocw closed 1 year ago
Adding something like this would be nice, treat it as text, just from a URL rather than local file:
(add newspaper3k to requirements.txt)
import requests from bs4 import BeautifulSoup from newspaper import Article def get_main_body(url): article = Article(url) article.download() article.parse() return article.text url = "https://<url>" text = get_main_body(url)
Adding something like this would be nice, treat it as text, just from a URL rather than local file:
(add newspaper3k to requirements.txt)