Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (var client = new CookieHandlingWebClient())
- {
- string token = "vELbe5ybvbZl6kBGFD~SYf6LeTGoeFWb";
- string ajaxUrl = "https://www.deezer.com/ajax/gw-light.php" +
- $"?method=album.getDiscography&input=3&api_version=1.0&api_token={token}&cid=23576357357";
- string url = "https://www.deezer.com/artist/13";
- HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
- request.Method = "GET";
- request.CookieContainer = new CookieContainer();
- using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
- {
- client.Headers["Content-Type"] = "application/json; charset=UTF-8";
- client.Headers["Cookie"] = response.Headers["Set-Cookie"];
- string json = client.UploadString(
- ajaxUrl,
- "{art_id: 13, start: 15, nb: 10, filter_role_id: [0, 1, 5]}");
- return json;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement