import json
import urllib.request
d = {"Marco": "マルコ",
"King": "キング",
"Ulti": "うるティ",
"Page One": "ページワン",
"Black Maria": "ブラックマリア",
"Sasaki": "ササキ",
"Who's Who": "フーズ・フー"
}
with urllib.request.urlopen("https://one-piece.com/vivre/data2.php") as url:
data = json.loads(url.read().decode())
for char in d.keys():
f = 0
for i in data:
if i['名前'] == d.get(char):
if f == 0:
f += 1
continue
print(char + " bounty is " + "{:,}".format(int(i['懸賞金ソート用'])))
if f == 2:
break
if f == 0:
print(char + " bounty was not found")
import json
import urllib.request
d = {"Marco": "マルコ",
"King": "キング",
"Ulti": "うるティ",
"Page One": "ページワン",
"Black Maria": "ブラックマリア",
"Sasaki": "ササキ",
"Who's Who": "フーズ・フー"
}
with urllib.request.urlopen("https://one-piece.com/vivre/data2.php") as url:
data = json.loads(url.read().decode())
for char in d.keys():
f = 0
for i in data:
if i['名前'] == d.get(char):
if f == 0:
f += 1
continue
print(char + " bounty is " + "{:,}".format(int(i['懸賞金ソート用'])))
if f == 2:
break
if f == 0:
print(char + " bounty was not found")
import json
import urllib.request
d = {"Marco": "マルコ",
"King": "キング",
"Ulti": "うるティ",
"Page One": "ページワン",
"Black Maria": "ブラックマリア",
"Sasaki": "ササキ",
"Who's Who": "フーズ・フー"
}
with urllib.request.urlopen("https://one-piece.com/vivre/data2.php") as url:
data = json.loads(url.read().decode())
for char in d.keys():
f = 0
for i in data:
if i['名前'] == d.get(char):
if f == 0:
f += 1
continue
print(char + " bounty is " + "{:,}".format(int(i['懸賞金ソート用'])))
if f == 2:
break
if f == 0:
print(char + " bounty was not found")