EchoTruth / utils /text_extraction.py
lightmate's picture
first stable version
53f4669 verified
raw
history blame
187 Bytes
from newspaper import Article
def extract_text_from_url(url):
article = Article(url)
article.download()
article.parse()
return article.title + ". " + article.text