Closed x1uc closed 2 weeks ago
测试了几百个单词,无错误。 测试程序
from main import Decoder import mysql.connector import requests import time # Connect to the MySQL database connection = mysql.connector.connect( host='localhost', user='root', password='123456', database='shanbay' ) cursor = connection.cursor() # Execute a query cursor.execute("SELECT * FROM words") rows = cursor.fetchall() for row in rows: url = "https://apiv3.shanbay.com/wordsapp/words/vocab?word=" + row[1] headers = { "cookie": "mycookie" } response = requests.get(url, headers=headers) time.sleep(0.2) print(response.json()) try: print(Decoder.decode(response.json()["data"])) except: print(f'{row[1]} is missing in shanbay')
Nice let's use python version instead of js
测试了几百个单词,无错误。 测试程序