Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. tag_rating = soup.findAll('span', itemprop="ratingValue")^M
  2. if tag_rating == []:
  3. rating = 0
  4. votes = 0
  5. else:
  6. rating = re.findall(r"[-+]?\d*\.\d+|\d+", str(tag_rating[0]))[0]^M
  7. tag_votes = soup.findAll('span', itemprop="ratingCount")^M
  8. votes_parts = re.findall(r"[-+]?\d*\.\d+|\d+", str(tag_votes[0]))^M
  9. votes = ','.join(votes_parts)^M
  10. tag_top250 = soup.findAll('a', href="/chart/top?ref_=tt_awd")^M
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement