mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-02-20 07:12:05 +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')
|
soup = BeautifulSoup(twit_account_page.text, 'html.parser')
|
||||||
|
|
||||||
# Extract twitter timeline
|
# 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
|
return soup, timeline
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user