Last active
November 24, 2022 00:45
-
-
Save wakiyamap/9b22839666f2120be882449cbcf84c72 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 re | |
import requests | |
endpoint = "http://127.0.0.1:5001/api/v0/pin/add" | |
url= "https://card.mona.jp/api/cid_list" | |
response = requests.get(url) | |
parse_data = re.finditer(r'"cid":"([a-z0-9]+)"', response.text) | |
for m in parse_data: | |
r = requests.post(endpoint + "?arg=" + m[1],) | |
print(r.url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another method for Unix one-liners.