mirror of
https://github.com/soxoj/maigret.git
synced 2026-05-15 19:05:43 +00:00
Fix Spotify, add Spotify Community forum (#2467)
This commit is contained in:
@@ -30,17 +30,6 @@ class ParsingActivator:
|
||||
jwt_token = r.json()["jwt"]
|
||||
site.headers["Authorization"] = "jwt " + jwt_token
|
||||
|
||||
@staticmethod
|
||||
def spotify(site, logger, cookies={}):
|
||||
headers = dict(site.headers)
|
||||
if "Authorization" in headers:
|
||||
del headers["Authorization"]
|
||||
import requests
|
||||
|
||||
r = requests.get(site.activation["url"])
|
||||
bearer_token = r.json()["accessToken"]
|
||||
site.headers["authorization"] = f"Bearer {bearer_token}"
|
||||
|
||||
@staticmethod
|
||||
def weibo(site, logger):
|
||||
headers = dict(site.headers)
|
||||
|
||||
+20
-21
@@ -535,33 +535,16 @@
|
||||
]
|
||||
},
|
||||
"Spotify": {
|
||||
"disabled": true,
|
||||
"tags": [
|
||||
"music"
|
||||
],
|
||||
"headers": {
|
||||
"authorization": "Bearer BQDDk6n__YLKqIDKxBb2fvOZm6yxuOj0XeU0mCpRmBi_0UsUz2fUP-tFsl7IjT-YOCXxmvfzUMAnQ0Y4KBo"
|
||||
},
|
||||
"errors": {
|
||||
"Spotify is currently not available in your country.": "Access denied in your country, use proxy/vpn"
|
||||
},
|
||||
"activation": {
|
||||
"method": "spotify",
|
||||
"marks": [
|
||||
"No token provided",
|
||||
"The access token expired"
|
||||
],
|
||||
"url": "https://open.spotify.com/get_access_token?reason=transport&productType=web_player",
|
||||
"src": "accessToken",
|
||||
"dst": "authorization"
|
||||
},
|
||||
"urlProbe": "https://spclient.wg.spotify.com/user-profile-view/v3/profile/{username}?playlist_limit=10&artist_limit=10&market=EN",
|
||||
"checkType": "status_code",
|
||||
"alexaRank": 63,
|
||||
"urlMain": "https://open.spotify.com/",
|
||||
"url": "https://open.spotify.com/user/{username}",
|
||||
"usernameClaimed": "blue",
|
||||
"usernameUnclaimed": "noonewouldeverusethis7"
|
||||
"urlProbe": "https://api.stats.fm/api/v1/users/{username}",
|
||||
"usernameClaimed": "alex",
|
||||
"usernameUnclaimed": "noonewouldeverusethis7",
|
||||
"alexaRank": 63
|
||||
},
|
||||
"Archive.org": {
|
||||
"checkType": "message",
|
||||
@@ -35137,6 +35120,22 @@
|
||||
"crypto",
|
||||
"gaming"
|
||||
]
|
||||
},
|
||||
"SpotifyCommunity": {
|
||||
"url": "https://community.spotify.com/t5/forums/searchpage/tab/user?q={username}",
|
||||
"urlMain": "https://community.spotify.com",
|
||||
"checkType": "message",
|
||||
"absenceStrs": [
|
||||
"0 results",
|
||||
"No search results found"
|
||||
],
|
||||
"regexCheck": "^[a-zA-Z0-9_.]+$",
|
||||
"usernameClaimed": "adam",
|
||||
"usernameUnclaimed": "noonewouldeverusethis7",
|
||||
"tags": [
|
||||
"forum",
|
||||
"music"
|
||||
]
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"version": 1,
|
||||
"updated_at": "2026-04-06T19:19:38Z",
|
||||
"sites_count": 3154,
|
||||
"updated_at": "2026-04-07T16:18:18Z",
|
||||
"sites_count": 3155,
|
||||
"min_maigret_version": "0.5.0",
|
||||
"data_sha256": "e44eee4a22651061460abae4535b935b2021a19377ead76b87a5f24de625df3a",
|
||||
"data_sha256": "279fb90280814cd11dcd711b1b8e6c6a99fefea4ce6ef05c9d64dced6ac795c0",
|
||||
"data_url": "https://raw.githubusercontent.com/soxoj/maigret/main/maigret/resources/data.json"
|
||||
}
|
||||
Reference in New Issue
Block a user