bdim404 / HackerNews-Summarize-Telegram-Bot

This is a bot used with this [Hacker News Feed Telegram chnnel](https://t.me/hacker_news_feed), forword the message to the bot and return the summarize to you.
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

There are some problems in some site. #30

Closed bdim404 closed 12 months ago

bdim404 commented 12 months ago
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/telegram/ext/_application.py", line 1195, in process_update
    await coroutine
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/telegram/ext/_basehandler.py", line 153, in handle_update
    return await self.callback(update, context)
  File "/Volumes/bdim'stonge/work_and_learn/python learning/hackernewSummarizeBot.py", line 102, in handle_message
    content = h2t.handle(html)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/html2text/__init__.py", line 142, in handle
    self.feed(data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/html2text/__init__.py", line 139, in feed
    super().feed(data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/html/parser.py", line 110, in feed
    self.goahead(0)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/html/parser.py", line 170, in goahead
    k = self.parse_starttag(i)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/html/parser.py", line 344, in parse_starttag
    self.handle_starttag(tag, attrs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/html2text/__init__.py", line 191, in handle_starttag
    self.handle_tag(tag, dict(attrs), start=True)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/html2text/__init__.py", line 327, in handle_tag
    tag_style = element_style(attrs, self.style_def, parent_style)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/html2text/utils.py", line 72, in element_style
    assert attrs["class"] is not None
AssertionError
bdim404 commented 12 months ago

fixed in https://github.com/bdim404/HackerNews-Summarize-Telegram-Bot/pull/31