Преглед на файлове

fix: fix spaces in descriptions

metya преди 4 години
родител
ревизия
2adc1d00b3
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      vanitybot.py

+ 1 - 1
vanitybot.py

@@ -22,7 +22,7 @@ def get_paper_desc(id_paper: str) -> tuple:
         with suppress(TypeError): 
             url = soup.find('meta', property='og:url').get('content')
             title = soup.find('meta', property='og:title').get('content')
-            description = soup.find('meta', property='og:description').get('content').replace('\n', '')
+            description = soup.find('meta', property='og:description').get('content').replace('\n', ' ')
             return url, title, description
     
     return None