Skip to content

Commit

Permalink
main: httpClient: switch to Android UserAgent
Browse files Browse the repository at this point in the history
  • Loading branch information
rocka committed Aug 17, 2022
1 parent 3a7a933 commit 6ee7103
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/api/httpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ class HttpClient {
'Accept-Language': 'zh',
'Accept-Encoding': 'gzip',
Referer: 'https://music.163.com/',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0'
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36'
};
this.initCookieJar();
}

initCookieJar() {
this.cookieJar = new CookieJar();
this.cookieJar.setCookies([
'appver=4.3.1',
'buildver=1513567509',
'channel=google',
'appver=8.8.12',
'mobilename=linux',
'os=pc',
'os=android',
'osver=10.0.0',
], '.music.163.com', '/');
}
Expand Down

0 comments on commit 6ee7103

Please sign in to comment.