JFL

pandasでJFLの戦績表を作成する

JFL

pip install lxml pip install html5lib import pandas as pd dfs = pd.read_html( 'http://www.jfl.or.jp/jfl-pc/view/s.php?a=1411&f=2019A001_spc.html', skiprows=1, na_values='-') jfl_2019 = [ 'Honda FC', 'FC大阪', 'ソニー仙台FC', 'F…

JFLの試合結果から得点ランキング作成

JFL

#%% import csv from urllib.parse import urljoin import time import requests from bs4 import BeautifulSoup def cleaning(info, team, data): result = [] for trs in data: temp = [i.get_text(strip=True) for i in trs.select('th, td')] # 時間の分…

FC今治のゴール集計・先取点

!pip install lxml !apt install fonts-ipafont-gothic !rm /content/.cache/matplotlib/fontList.json """再起動""" import time import csv import requests from bs4 import BeautifulSoup # 試合数 n = 10 + 1 with open('fcimabari_goal.tsv', 'w') as …

JFLの試合結果からランキングを作成

import pandas as pd url = 'http://www.jfl.or.jp/jfl-pc/view/s.php?a=1411&f=2019A001_spc.html' dfs = pd.read_html(url, skiprows=1, na_values='-') len(dfs) df = pd.concat( dfs, keys=[i for i in range(1, len(dfs) + 1)], names=['節', '番号']) …

FC今治の順位をスクレイピング

import datetime import requests from bs4 import BeautifulSoup url = 'http://www.jfl.or.jp/jfl-pc/view/s.php?a=1277' r = requests.get(url) if r.status_code == requests.codes.ok: soup = BeautifulSoup(r.content, 'html.parser') update_str = so…