mirror of
https://gitlab.com/chaica/feed2toot.git
synced 2024-11-23 20:11:09 +00:00
Merge branch 'filter-html-tags' into 'master'
Added code to strip html tags from RSS fields Closes #17 See merge request chaica/feed2toot!12
This commit is contained in:
commit
b302388df7
|
@ -31,6 +31,7 @@ from feed2toot.filterentry import FilterEntry
|
||||||
from feed2toot.removeduplicates import RemoveDuplicates
|
from feed2toot.removeduplicates import RemoveDuplicates
|
||||||
from feed2toot.tootpost import TootPost
|
from feed2toot.tootpost import TootPost
|
||||||
from feed2toot.feedcache import FeedCache
|
from feed2toot.feedcache import FeedCache
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
class Main:
|
class Main:
|
||||||
'''Main class of Feed2toot'''
|
'''Main class of Feed2toot'''
|
||||||
|
@ -183,6 +184,9 @@ class Main:
|
||||||
else:
|
else:
|
||||||
finaltweet = dedup.finaltweet
|
finaltweet = dedup.finaltweet
|
||||||
|
|
||||||
|
# strip html tags
|
||||||
|
finaltweet = BeautifulSoup(finaltweet, 'html.parser').get_text()
|
||||||
|
|
||||||
if clioptions.dryrun:
|
if clioptions.dryrun:
|
||||||
if entrytosend:
|
if entrytosend:
|
||||||
logging.warning('Would toot with visibility "{visibility}": {toot}'.format(
|
logging.warning('Would toot with visibility "{visibility}": {toot}'.format(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user