http://docs.google.com/spreadsheets/d/e/2X-1vQ-RXODO0N39YSCLWncqnfRgnxGri31yAzw7fD0xv3Rgl7P5jzgbxmBd7zbrXyjlQZjLII=1CprOkG/pubhtml” 下面是《on法》迄今撰写的。
import requests
from bs4 import BeautifulSoup
import csv
import pandas as pd
page = requests.get( https://odibets.com/league?br=1&tab=results )
soup = BeautifulSoup(page.text, html.parser )
table = soup.find(class_="l-league-table-results" )
results = table.find_all(class_= results )
for i in results:
weeks = i.find(class_= results-title ).getText()
week = weeks[55:58]
day = i.find_all(class_= results-body )[3]
home = day.find_all( td )[0].getText()
away = day.find_all( td )[2].getText()
score = day.find_all( td )[1].getText()
homeScore = score[:1]
awayScore = score[1:]
print(awayScore)
• 如何写成该法典,以取得与以下网站所示相同的结果:excel file。