Browse Source

v3.5.4

main
RemixDev 3 weeks ago
parent
commit
509d1b57c5
8 changed files with 15 additions and 10 deletions
  1. +2
    -1
      deemix/decryption.js
  2. +2
    -2
      deemix/downloader.js
  3. +1
    -1
      deemix/index.js
  4. +1
    -1
      deemix/plugins/spotify.js
  5. +1
    -0
      deemix/types/Track.js
  6. +3
    -0
      deemix/utils/deezer.js
  7. +1
    -1
      package.json
  8. +4
    -4
      yarn.lock

+ 2
- 1
deemix/decryption.js View File

@ -100,7 +100,8 @@ async function streamTrack(outputStream, track, start=0, downloadObject, listene
let request = got.stream(track.downloadURL, {
headers: headers,
retry: 3
retry: 3,
https: {rejectUnauthorized: false}
}).on('response', (response)=>{
complete = parseInt(response.headers["content-length"])
if (complete == 0) {


+ 2
- 2
deemix/downloader.js View File

@ -46,7 +46,7 @@ async function downloadImage(url, path, overwrite = OverwriteOption.DONT_OVERWRI
fs.unlinkSync(path)
}
const downloadStream = got.stream(url, { headers: {'User-Agent': USER_AGENT_HEADER}, timeout: 30000, retry: 3})
const downloadStream = got.stream(url, { headers: {'User-Agent': USER_AGENT_HEADER}, https: {rejectUnauthorized: false}, timeout: 30000, retry: 3})
const fileWriterStream = fs.createWriteStream(path)
try {
@ -86,7 +86,7 @@ async function getPreferredBitrate(dz, track, preferredBitrate, shouldFallback,
try{
request = got.get(
url,
{ headers: {'User-Agent': USER_AGENT_HEADER}, timeout: 30000 }
{ headers: {'User-Agent': USER_AGENT_HEADER}, timeout: 30000, https: {rejectUnauthorized: false} }
).on("response", (response)=>{
track.filesizes[`FILESIZE_${formatName}`] = response.statusCode == 403 ? 0 : response.headers["content-length"]
track.filesizes[`FILESIZE_${formatName}_TESTED`] = true


+ 1
- 1
deemix/index.js View File

@ -12,7 +12,7 @@ const {
async function parseLink(link){
if (link.includes('deezer.page.link')){
link = await got.get(link) // Resolve URL shortner
link = await got.get(link, {https: {rejectUnauthorized: false}}) // Resolve URL shortner
link = link.url
}
// Remove extra stuff


+ 1
- 1
deemix/plugins/spotify.js View File

@ -37,7 +37,7 @@ class Spotify extends Plugin {
async parseLink(link){
if (link.includes('link.tospotify.com')){
link = await got.get(link) // Resolve URL shortner
link = await got.get(link, {https: {rejectUnauthorized: false}}) // Resolve URL shortner
link = link.url
}
// Remove extra stuff


+ 1
- 0
deemix/types/Track.js View File

@ -87,6 +87,7 @@ class Track {
output: '3',
method: 'song_getData'
},
https: {rejectUnauthorized: false},
json: {sng_id: this.id},
headers: dz.http_headers,
timeout: 30000


+ 3
- 0
deemix/utils/deezer.js View File

@ -16,6 +16,7 @@ async function getAccessToken(email, password){
password: password,
hash
},
https: {rejectUnauthorized: false},
headers: {"User-Agent": USER_AGENT_HEADER}
}).json()
return response.access_token
@ -25,10 +26,12 @@ async function getArlFromAccessToken(accessToken){
let cookieJar = new CookieJar()
await got.get("https://api.deezer.com/platform/generic/track/3135556", {
headers: {"Authorization": `Bearer ${accessToken}`, "User-Agent": USER_AGENT_HEADER},
https: {rejectUnauthorized: false},
cookieJar
})
let response = await got.get('https://www.deezer.com/ajax/gw-light.php?method=user.getArl&input=3&api_version=1.0&api_token=null', {
headers: {"User-Agent": USER_AGENT_HEADER},
https: {rejectUnauthorized: false},
cookieJar
}).json()
return response.results


+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{
"name": "deemix",
"version": "3.5.3",
"version": "3.5.4",
"description": "a barebones deezer downloader library",
"main": "deemix/index.js",
"scripts": {


+ 4
- 4
yarn.lock View File

@ -340,10 +340,10 @@ deep-is@^0.1.3:
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
deezer-js@1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/deezer-js/-/deezer-js-1.2.3.tgz#674294cdfe7469de4ad2be8b5e8a07cf6dec625f"
integrity sha512-MSMeh0AmibjZYKSMRB++yInxIldTbYlgHp+/HlIoRdyeg172qVSxsfuIcl7Uw2ui7S7Hcdk2I/FhtjFhOYMhXw==
deezer-js@1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/deezer-js/-/deezer-js-1.2.4.tgz#74faa4046a5cbf18cbf53c542cc05a78a3d6ca85"
integrity sha512-Scki1I03YEcnxWiYBz1LQT9gJHo9KIlvMK3gYE65gik19BQ/PW6fsWYPVl/lR7eKuxfO1SWUYF1i49J6Ja0eVg==
dependencies:
got "^11.8.2"
tough-cookie "^4.0.0"


Loading…
Cancel
Save