avoid warning, as we always pass HTML fragment

"/usr/lib/python3/dist-packages/feed2toot/message.py:48: 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()"
See rationale at https://bugs.launchpad.net/beautifulsoup/+bug/2052988
This commit is contained in:
Matija Nalis 2024-02-16 03:10:57 +01:00
parent 89518b2478
commit cc987d5020
1 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,8 @@ import sys
import re
# external liraries imports
from bs4 import BeautifulSoup
import warnings
from bs4 import BeautifulSoup, MarkupResemblesLocatorWarning
# app libraries imports
from feed2toot.addtags import AddTags
@ -68,6 +69,8 @@ class Main:
def main(self):
'''The main function'''
warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning)
clip = CliParse()
clioptions = clip.options
self.setup_logging(clioptions)