Ver Fonte

Suparate article content on newline

JoostSijm há 4 anos atrás
pai
commit
df31334552
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/rival_regions_wrapper/api_wrapper/article.py

+ 1 - 1
src/rival_regions_wrapper/api_wrapper/article.py

@@ -38,7 +38,7 @@ class Article():
             'author_id': int(author['action'].replace('slide/profile/', '')),
             'region_name': region.text,
             'region_id': int(region['action'].replace('map/details/', '')),
-            'content_text': news_content.text.strip(),
+            'content_text': news_content.get_text(separator="\n", strip=True),
             'content_html': news_content.prettify(),
             'rating': int(soup.select_one('#news_number').text),
             'comments': int(soup.select_one('.news_comments_link').text)