first commit
This commit is contained in:
32
__play.js
Normal file
32
__play.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const cookies = require('./cookie.json')
|
||||
const request = require('request')
|
||||
|
||||
let data = ''
|
||||
let csrf = ''
|
||||
cookies.forEach(cookie => {
|
||||
if (cookie.name == 'csrf') csrf = cookie.value
|
||||
if (cookie.name == 'csrf') console.log(cookie.value)
|
||||
Object.keys(cookie).forEach(key => {
|
||||
if (key == 'name') return
|
||||
data += cookie.name + '=' + cookie.value
|
||||
data += ';'
|
||||
})
|
||||
})
|
||||
data += 'x-amzn-dat-gui-client-v=1.24.2445.0;'
|
||||
|
||||
let headers = {
|
||||
'Pragma': 'no-cache',
|
||||
'Accept-Encoding': 'identity',
|
||||
'Accept-Language': 'de',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0',
|
||||
'Accept': 'application/json, text/javascript, */*; q=0.01',
|
||||
'Cache-Control': 'no-cache',
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'Connection': 'keep-alive',
|
||||
'Referer': 'https://layla.amazon.de/spa/index.html',
|
||||
'csrf': csrf,
|
||||
'Cookie': data
|
||||
}
|
||||
console.log(headers)
|
||||
|
||||
request.post({headers, url: 'https://layla.amazon.de/api/tunein/queue-and-play?deviceSerialNumber=G090LV03644201N0&deviceType=AB72C64C86AW2&guideId=s56049&contentType=station&callSign=&mediaOwnerCustomerId=A15ZKA34OGFDCC'}, (error, response, body) => console.log(error, response.headers, body))
|
||||
Reference in New Issue
Block a user