1
0
Fork 0

avoid BeautifulSoup warning output since v4.9.3 #1

Closed
opened 2025-03-21 22:20:36 +01:00 by n · 0 comments
Owner

BeautifulSoup warning is polluting output in scripts:

/path/to/feed2toot/message.py:57: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.
  finaltweet = BeautifulSoup(finaltweet, 'html.parser').get_text()

Let's fix that with the "invocation" described here: https://stackoverflow.com/questions/36039724/suppress-warning-of-url-in-beautifulsoup/78445796#78445796

BeautifulSoup warning is polluting output in scripts: ``` /path/to/feed2toot/message.py:57: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup. finaltweet = BeautifulSoup(finaltweet, 'html.parser').get_text() ``` Let's fix that with the "invocation" described here: https://stackoverflow.com/questions/36039724/suppress-warning-of-url-in-beautifulsoup/78445796#78445796
n closed this issue 2025-03-22 21:19:12 +01:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: n/feed2toot#1
No description provided.