add a method to download an article
This commit is contained in:
parent
529c9a6fba
commit
49d0407397
|
@ -1,7 +1,10 @@
|
|||
import url2markdown
|
||||
from newspaper import Article
|
||||
from url2markdown.downloader import downloader
|
||||
|
||||
|
||||
def test_get_content():
|
||||
assert False
|
||||
article = downloader('https://newspaper.readthedocs.io/en/latest/user_guide/quickstart.html')
|
||||
assert type(article) == Article
|
||||
|
||||
|
||||
def test_convert_html_to_markdown():
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
from newspaper import Article
|
||||
|
||||
|
||||
def downloader(url):
|
||||
article = Article(url)
|
||||
article.download()
|
||||
return article
|
Loading…
Reference in New Issue