mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-23 20:11:11 +00:00
Hit a bump
This commit is contained in:
parent
b842f6d471
commit
f8bd948b9c
14
twoot.py
14
twoot.py
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user