Browse Source

Strip whitespace in article content

JoostSijm 4 years ago
parent
commit
c223e66fb3
1 changed files with 1 additions and 1 deletions
  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(object):
             '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,
+            'content_text': news_content.text.strip(),
             'content_html': news_content.prettify(),
             'rating': int(soup.select_one('#news_number').text),
             'comments': int(soup.select_one('.news_comments_link').text)