fix views string closed #2

This commit is contained in:
Jesús
2019-05-16 18:45:30 -05:00
parent 7e4a223d1c
commit d58457a2bf

View File

@@ -24,7 +24,7 @@ for vid in SOUP.find_all(class_='yt-lockup-content'):
author = vid.find(class_='yt-lockup-byline').a.text
meta = vid.find(class_='yt-lockup-meta').ul.contents
time = meta[0].text
views_str = meta[1].text[:-6]
views_str = meta[-1].text[:-6]
views = int(views_str.replace(',', ''))
except TypeError: