Hit a bump

This commit is contained in:
jeancf 2023-07-12 22:19:04 +02:00
parent b842f6d471
commit f8bd948b9c

View File

@ -234,7 +234,19 @@ def get_timeline(url):
soup = BeautifulSoup(twit_account_page.text, 'html.parser')
# Extract twitter timeline
timeline = soup.find_all(has_class_timeline_item_but_not_thread)
timeline = []
# Get all the items from the timeline
list = soup.find_all('div', class_='timeline-item')
for item in list:
classes = item['class']
if 'more-replies-thread' in classes:
logging.debug('found a more-replies-thread item')
else:
timeline.append(item)
return soup, timeline