fix views string closed #2
This commit is contained in:
parent
7e4a223d1c
commit
d58457a2bf
2
livie.py
2
livie.py
@ -24,7 +24,7 @@ for vid in SOUP.find_all(class_='yt-lockup-content'):
|
|||||||
author = vid.find(class_='yt-lockup-byline').a.text
|
author = vid.find(class_='yt-lockup-byline').a.text
|
||||||
meta = vid.find(class_='yt-lockup-meta').ul.contents
|
meta = vid.find(class_='yt-lockup-meta').ul.contents
|
||||||
time = meta[0].text
|
time = meta[0].text
|
||||||
views_str = meta[1].text[:-6]
|
views_str = meta[-1].text[:-6]
|
||||||
views = int(views_str.replace(',', ''))
|
views = int(views_str.replace(',', ''))
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user