Commit 965c583ca0

965c583ca00b67e7e3c828ac4a0a6e1738d25937

parent: 761461105d

Unsigned

Wraient <wraient.911@gmail.com> · 2024-08-24 17:27 UTC

working anilist

Layout: unified · split

anilist.py added +37
@@ -0,0 +1,37 @@
1import requests
2
3# Replace with your actual access token and user ID
4access_token = ''
5user_id = '6719526'
6
7# GraphQL query
8query = """
9{
10 MediaListCollection(userId: %s, type: ANIME) {
11 lists {
12 entries {
13 media {
14 id
15 title {
16 romaji
17 english
18 }
19 }
20 status
21 score
22 progress
23 }
24 }
25 }
26}
27""" % user_id
28
29# Send the request
30response = requests.post(
31 'https://graphql.anilist.co',
32 json={'query': query},
33 headers={'Authorization': f'Bearer {access_token}'}
34)
35
36# Print the response
37print(response.json())