diff --git a/feed2toot/main.py b/feed2toot/main.py
index 9baf6a3..aca786d 100644
--- a/feed2toot/main.py
+++ b/feed2toot/main.py
@@ -65,7 +65,6 @@ class Main(object):
"""The main function."""
# regex_img_src to retrieve urls in tags
regex_img_src = re.compile(r"]*?\s+)?href=[\"'](.*?)[\"']|]+src=\"([^\">]+)\"")
- regex_strip_urls = re.compile(r"([a-z]+\.twitter\.com(\/\S+)?|https?:\/\/twitter\.com((\/\w+)?)+)")
http = urllib3.PoolManager()
clip = CliParse()
@@ -150,7 +149,6 @@ class Main(object):
images.append(resp)
resp.release_conn()
-
severalwordsinhashtag = False
# lets see if the rss feed has hashtag
if 'tags' in entry:
diff --git a/feed2toot/tootpost.py b/feed2toot/tootpost.py
index 9ac95b0..54fcac8 100644
--- a/feed2toot/tootpost.py
+++ b/feed2toot/tootpost.py
@@ -48,8 +48,9 @@ class TootPost:
medias_dicts = []
if len(self.img_list) > 0:
for img in self.img_list:
- medias_dicts.append(mastodon.media_post(img.data,
- img.headers['content-type']))
+ media_dict = mastodon.media_post(img.data, img.headers['content-type'])
+ if ('error' not in media_dict):
+ medias_dicts.append(media_dict)
mastodon.status_post(self.toot,
visibility=self.config.get(