Created
September 1, 2019 08:59
-
-
Save terakun/b3414996acc2bb7e4fe6ba1c8693e805 to your computer and use it in GitHub Desktop.
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
import requests | |
from bs4 import BeautifulSoup | |
print("伝票番号を入力してください") | |
denpyo_id = input() | |
response = requests.post('http://toi.kuronekoyamato.co.jp/cgi-bin/tneko', data={'number01':denpyo_id }) | |
soup = BeautifulSoup(response.text, "html.parser") | |
denpyo_list = soup.find_all('td', class_='denpyo') | |
hiduke_list = soup.find_all('td', class_='hiduke') | |
ct_list = soup.find_all('td', class_='ct') | |
for denpyo,hiduke,ct in zip(denpyo_list,hiduke_list,ct_list): | |
if denpyo.text == "": | |
continue | |
print(denpyo.text+":"+hiduke.text+":"+ct.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment