same31/addic7ed-api

Error using download : StatusCodeError 301 - Moved Permanently

Closed this issue · 1 comments

  • Electron Version:
    • 4.0.0
  • Operating System:
    • MacOS 10.14.3

Hi, i don't know if addic7ed change something recently, but I have this error.

Actual behavior

Error when trying to download subtitles.
The error message is long but that's what I think is useful :

StatusCodeError {name: "StatusCodeError", statusCode: 301, message: "301 - {"type":"Buffer","data":[...]
statusMessage: "Moved Permanently"
[...]
options : {
headers: {Referer: "http://www.addic7ed.com/show/2864"}
uri: "http://www.addic7ed.com/updated/8/67281/1"
[...]

Temporary fix

in lib/helpers.js change http to https.

addic7edURL:      'http://www.addic7ed.com',
to
addic7edURL:      'https://www.addic7ed.com',

Many thanks for your interest in my project Jorand, the issue has been fixed!