+ 1 фильтрация текста-результата.
This commit is contained in:
@@ -435,12 +435,13 @@ def check_vk_posts():
|
||||
logging.info(f"Новостей для публикации в ВК нет")
|
||||
else:
|
||||
for topic_id, topic_title in reversed(list_for_public):
|
||||
if topic_id > 698:
|
||||
if topic_id > 0:
|
||||
logging.info(f"Новости для публикации в ВК: {list_for_public}")
|
||||
text_data = news_content(topic_id)
|
||||
if text_data:
|
||||
content = f"----------------------------------------------------------\n{topic_title}\t\n" + text_data + "\n"
|
||||
content = remove_markdown_links(content)
|
||||
content = re.sub(r'https://linux-gaming.ru/uploads/default/original/1X/5cfa59077a5275971401fab0114e56f3ffdd0ec4.png', '\n', content, flags=re.DOTALL)
|
||||
links = extract_links(content)
|
||||
if "Обновление скриптов" in topic_title:
|
||||
# Пример добавления изображения с постом
|
||||
|
Reference in New Issue
Block a user