url2markdown/tests/conftest.py

15 lines
355 B
Python
Raw Permalink Normal View History

2020-10-12 15:16:18 +02:00
import pytest
from newspaper import Article
2020-11-09 12:14:47 +01:00
2020-10-12 15:16:18 +02:00
@pytest.fixture
def create_article():
def _create_article():
2020-11-09 12:14:47 +01:00
url = 'https://www.republik.ch/2020/11/09/kann-die-schweiz-auf-rendite-aus-kriegs-material-verzichten'
2020-10-12 15:16:18 +02:00
article = Article(url)
article.download()
article.parse()
return article
return _create_article