Release 4.3.2

This commit is contained in:
jeancf 2023-07-24 21:51:20 +02:00
parent 47d17f4cc5
commit c34707b149
3 changed files with 15 additions and 6 deletions

View File

@ -1,5 +1,12 @@
# Changelog # Changelog
**22 JUL 2023** VERSION 4.3.1
Minor improvements of robustness (avoid interruption of processing):
* Ignore timeline-item without tweet-link tag
* Improve detection of missing video
**17 JUL 2023** VERSION 4.3 **17 JUL 2023** VERSION 4.3
* Twitter threads are replicated on Mastodon: each follow-up message in a thread is posted * Twitter threads are replicated on Mastodon: each follow-up message in a thread is posted

View File

@ -3,12 +3,12 @@
Twoot is a python script that mirrors tweets from a twitter account to a Mastodon account. Twoot is a python script that mirrors tweets from a twitter account to a Mastodon account.
It is simple to set-up on a local machine, configurable and feature-rich. It is simple to set-up on a local machine, configurable and feature-rich.
**22 JUL 2023** VERSION 4.3.1 **24 JUL 2023** VERSION 4.3.2
Minor improvements of robustness (avoid interruption of processing): Minor fixes (avoid interruption of processing):
* Ignore timeline-item without tweet-link tag * Re-add missing \n before url of quoted tweet
* Improve detection of missing video * Avoid interruption of processing in case of empty thread timeline
> Previous updates can be found in CHANGELOG. > Previous updates can be found in CHANGELOG.

View File

@ -204,9 +204,11 @@ def _get_rest_of_thread(session, headers, nitter_url, thread_url, first_item):
# Make soup # Make soup
soup = BeautifulSoup(thread_page.text, 'html.parser') soup = BeautifulSoup(thread_page.text, 'html.parser')
list = []
# Get all items in thread after main tweet # Get all items in thread after main tweet
after_tweet = soup.find('div', 'after-tweet') after_tweet = soup.find('div', 'after-tweet')
list = after_tweet.find_all('div', class_='timeline-item') if after_tweet is not None:
list = after_tweet.find_all('div', class_='timeline-item')
# Build timeline of tuples # Build timeline of tuples
previous_tweet_url = thread_url previous_tweet_url = thread_url
@ -979,7 +981,7 @@ def main(argv):
if tweet_link_tag is None: if tweet_link_tag is None:
logging.debug("Malformed timeline item (no tweet link), skipping") logging.debug("Malformed timeline item (no tweet link), skipping")
continue continue
tweet_id = tweet_link_tag.get('href').strip('#m') tweet_id = tweet_link_tag.get('href').strip('#m')
status_id = tweet_id.split('/')[3] status_id = tweet_id.split('/')[3]