mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-02-25 09:28:43 +00:00
Compare commits
No commits in common. "b6396f7b515fba3eaf3eaef49017605067b61233" and "dba9e7d3aba77ddc9ec266b727212bdbd67fff55" have entirely different histories.
b6396f7b51
...
dba9e7d3ab
13
twoot.py
13
twoot.py
@ -598,7 +598,7 @@ def process_media_body(tt_iter):
|
||||
|
||||
tweet_text += url
|
||||
else:
|
||||
logging.warning("No handler for tag %s in twitter text: ", tag.prettify())
|
||||
logging.warning("No handler for tag in twitter text: " + tag.prettify())
|
||||
|
||||
return tweet_text
|
||||
|
||||
@ -954,6 +954,7 @@ def main(argv):
|
||||
# Select random nitter instance to fetch updates from
|
||||
nitter_url = 'https://' + TOML['options']['nitter_instances'][random.randint(0, len(TOML['options']['nitter_instances']) - 1)]
|
||||
|
||||
|
||||
# Load twitter page of user
|
||||
soup, timeline = get_timeline(nitter_url)
|
||||
|
||||
@ -1149,16 +1150,6 @@ def main(argv):
|
||||
if len(tweets) != 0 and mastodon is None:
|
||||
mastodon = login(mast_password)
|
||||
|
||||
# Check toot character limit on mastodon instance
|
||||
if mastodon is not None:
|
||||
try:
|
||||
max_characters = mastodon.instance().configuration.statuses['max_characters']
|
||||
logging.debug('Instance character limit is '+ str(max_characters))
|
||||
except Exception:
|
||||
# Default value for Mastodon
|
||||
max_characters = 500
|
||||
logging.debug('Tried to get toot character limit from Mastodon instance but failed. Assuming 500')
|
||||
|
||||
# **********************************************************
|
||||
# Iterate tweets in list.
|
||||
# post each on Mastodon and record it in database
|
||||
|
Loading…
x
Reference in New Issue
Block a user