Last active
March 26, 2022 06:54
-
-
Save mouseos/60f33e8880582fb0d03f1e0576a73122 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#ねとらじの情報を配列に突っ込む | |
import matplotlib.pyplot as plt | |
import requests | |
import re | |
#イコール削除 | |
def de(txt): | |
txt=re.sub(r".*=","" , txt) | |
return(txt) | |
data = requests.get('http://yp.ladio.net/stats/list.v2.dat') | |
data=((data.content).decode( 'shift-jis','ignore').split("\n")) | |
data2=[] | |
data3=[] | |
for line in data: | |
if len(line)!=0: | |
if ("CHS" in line): | |
data3.append(data2) | |
data2=[] | |
else: | |
data2.append(de(line)) | |
for data4 in data3: | |
print((data4)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment