|
@@ -112,9 +112,8 @@ for p in reversed(t.entries): |
|
|
mastodon_api = register_app(mastuser, mastpasswd, mastinstance, mastodon_api) |
|
|
mastodon_api = register_app(mastuser, mastpasswd, mastinstance, mastodon_api) |
|
|
|
|
|
|
|
|
c = p.title |
|
|
c = p.title |
|
|
|
|
|
|
|
|
if p.author != '(%s)' % twitteruser: |
|
|
|
|
|
c = ("RT %s\n" % p.author[1:-1]) + c |
|
|
|
|
|
|
|
|
if p.author.lower() != '(@%s)' % twitteruser.lower(): |
|
|
|
|
|
c = ("RT %s from Twitter:\n" % p.author[1:-1]) + c |
|
|
toot_media = [] |
|
|
toot_media = [] |
|
|
# get the pictures... |
|
|
# get the pictures... |
|
|
for pic in re.finditer(r"https://pbs.twimg.com/[^ \xa0\"]*", p.summary): |
|
|
for pic in re.finditer(r"https://pbs.twimg.com/[^ \xa0\"]*", p.summary): |
|
@@ -142,6 +141,7 @@ for p in reversed(t.entries): |
|
|
|
|
|
|
|
|
# remove ellipsis |
|
|
# remove ellipsis |
|
|
c = c.replace('\xa0…',' ') |
|
|
c = c.replace('\xa0…',' ') |
|
|
|
|
|
c += '\n\nSource: %s' % p.link |
|
|
print(c) |
|
|
print(c) |
|
|
|
|
|
|
|
|
if (not dryrun): |
|
|
if (not dryrun): |
|
|