Skip to content

Commit 51bea15

Browse files
authored
Merge pull request #116 from katagomo/main
使用Cloudflare代理的API端点
2 parents f26deef + 5eb308d commit 51bea15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mod/searchx/api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
headers = {
55
"Host": "127.0.0.1",
6-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/"
6+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 LrcAPI"
77
}
88

99

1010
def search(title='', artist='', album='') -> list:
1111
try:
12-
url = f"http://cn.lrc.cx:880/jsonapi?title={title}&artist={artist}&album={album}&path=None&limit=1&api=lrcapi"
12+
url = f"https://api.lrc.cx/jsonapi?title={title}&artist={artist}&album={album}&path=None&limit=1&api=lrcapi"
1313
response = requests.get(url, headers=headers)
1414
return response.json()
1515
except Exception as e:

0 commit comments

Comments
 (0)