repl.it
Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
from bs4 import BeautifulSoup
import requests
url = 'http://energydiet.canadiangeographic.ca/2019/main/video_gallery/192/8938/mr.-fs-k-4s-'
response = requests.get(url, timeout=5)
content = BeautifulSoup(response.content, "html.parser")

voteArr = []
vote = content.findAll('div', attrs={"class": "video_info"}):
    voteObject = {
        "vote": vote.find('div', attrs={"class": "video_info"}).text.encode('utf-8'),
    }
    print(voteObject)
Fetching token
?