add fixture for an article
This commit is contained in:
parent
49d0407397
commit
e214d7ece5
|
@ -0,0 +1,13 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from newspaper import Article
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def create_article():
|
||||||
|
def _create_article():
|
||||||
|
url = 'https://www.20min.ch/story/corona-zahlen-auf-einen-blick-803083076953'
|
||||||
|
article = Article(url)
|
||||||
|
article.download()
|
||||||
|
article.parse()
|
||||||
|
return article
|
||||||
|
return _create_article
|
Loading…
Reference in New Issue