This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
links = ['http://www.legaseriea.it/it/serie-a/classifica/2018-19', | |
'http://www.legaseriea.it/it/serie-a/classifica/2017-18', | |
'http://www.legaseriea.it/it/serie-a/classifica/2016-17', | |
'http://www.legaseriea.it/it/serie-a/classifica/2015-16', | |
'http://www.legaseriea.it/it/serie-a/classifica/2014-15', | |
'http://www.legaseriea.it/it/serie-a/classifica/2013-14', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
import smtplib | |
def check_price() -> int: | |
# get HTML page | |
user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36' | |
headers = {"user-agent": user_agent} | |
req = requests.get(URL, headers=headers) |