datacoon / feedrebot Goto Github PK
View Code? Open in Web Editor NEWFeedRetranslatorBot translates your RSS feed or news on webpage to the telegram channel/channels
FeedRetranslatorBot translates your RSS feed or news on webpage to the telegram channel/channels
Периодически прилетают ранее опубликованные сообщения. В исходной странице никаких изменений не было.
Бот не может распарсить новости о выходе новых НПА на
https://www.minobrnauki.gov.ru/ru/documents/docs/index.php
В логе выдает ошибку
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen chunked=chunked, File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn conn.connect() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connection.py", line 394, in connect ssl_context=context, File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 407, in wrap_socket _context=self, _session=session) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 814, in __init__ self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1068, in do_handshake self._sslobj.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)
Но с другими сайтами с доступом по https работает
Не происходит автоматическое обновление и рассылка в канал.
Добавил через бот подписку на https://www.gazeta.ru/export/rss/first.xml
В логе все время пишет (токен изменен)
Entering: get_updates
https://api.telegram.org:443 "POST /bot944114668:AAFUv8R8fYlGiVМZBWuQe4jQWLm9ylvvxCU/getUpdates HTTP/1.1" 200 23
No new updates found.
Однако при этом сам rss обновляется.
При принудительном обновление через /update все работает.
Проверил,@FeedRetranslatorBot - тоже не обновляет информацию автоматически, а только через /update
Проверял на http://government.ru/rugovclassifier/833/events/rss/
Но при этом https://t.me/govdigest - работает )
При запуске news2rssbot.py выдается ошибка, что не смог импортировать tractor из newsworker.extractor
Действительно, в коде newsworker.extractor.py нет ни такого класса, ни функции. Пришлось заменить
import newsworker.extractor
newsworker устанавливал через pip install -U
Пример лога
/test https://kb.mjdm.ru/feed/rss2/
FeedRetranslator
[8:26:53]: Запрашиваю страницу по ссылке
[8:26:54]: Обнаружен тип документа: XML файл. Проверяем что это RSS
[{'title': 'База знаний MajorDoMo', 'num': 10, 'url': 'https://kb.mjdm.ru/feed/rss2/', 'feedtype': 10}]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.