mirror of https://gitlab.com/chaica/feed2toot
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:
parent
89518b2478
commit
cc987d5020
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue