repl.it
@nickbeattie/

Energy Diet Scraper

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
from bs4 import BeautifulSoup
import requests

url = 'http://energydiet.canadiangeographic.ca/2019/main/video_gallery/192/8198/8c7'
response = requests.get(url, timeout=5)
content = BeautifulSoup(response.content, "html.parser")

vote = content.find('div', attrs={"class": "video_info"}).text
print(vote)
Fetching token
?