riazXrazor / udemy-dl

Nodejs script to download a udemy.com course, for personal offline use
285 stars 68 forks source link

CLI version doesn't work anymore #49

Closed sameterap closed 5 years ago

sameterap commented 5 years ago

Hi,

I was using CLI version before and it was working, I guess that after GUI version is released, CLI version is not working anymore.I tried the version 1.0.0, 0.0.31, 0.0.29 and 0.0.18 and after login, nothing is happening as shown on the following picture;

image

Thank you.

riazXrazor commented 5 years ago

Hi, I checked it couple of days ago it was working, OK will check again may be something changed in API, thanks

On Wed 13 Mar, 2019, 5:34 PM sameterap, notifications@github.com wrote:

Hi,

I was using CLI version before and it was working, I guess that after GUI version is released, CLI version is not working anymore.I tried the version 1.0.0, 0.0.31, 0.0.29 and 0.0.18 and after login, nothing is happening as shown on the following picture;

[image: image] https://user-images.githubusercontent.com/413159/54277538-32739e80-45a1-11e9-88f2-1c84c02ac208.png

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/riazXrazor/udemy-dl/issues/49, or mute the thread https://github.com/notifications/unsubscribe-auth/AMlUe5KJH8wZIS1k8dVM8cHiTiGBP5Qoks5vWOlKgaJpZM4btECE .

sameterap commented 5 years ago

I guess, at the moment, nothing is working because of API. I mean CLI and GUI.

image

riazXrazor commented 5 years ago

Hi, i hv pushed an update plz check with the latest version 1.0.1

sameterap commented 5 years ago

Hi, I have just checked.

the error that I've sent latest is gone, but now it's like the first image that I've sent. Tried with the following command and remains as it is;

udl https://www.udemy.com/develop-augmented-reality-book-ar-business-card-with-unity

image

with this command using my own credentials; udl -u user@domain.com -p $ecRe7w0rd https://www.udemy.com/develop-augmented-reality-book-ar-business-card-with-unity

image

image

and remains here like this. doesn't get anything.

riazXrazor commented 5 years ago

did u buy the course ?

riazXrazor commented 5 years ago

these user@domain.com , $ecRe7w0rd dosent seems to hv any courses

sameterap commented 5 years ago

"these user@domain.com , $ecRe7w0rd dosent seems to hv any courses" I used this notation to show which command I used. of course I used my own credentials there, I wouldnt write my password :)

Yes, I bought this. here is the screenshot from web;

image

riazXrazor commented 5 years ago

did u try with 720p ?

Proinfinto commented 5 years ago

Your friend above, the same problem continues.

sameterap commented 5 years ago

did u try with 720p ?

Yes, I tried with all resolutions. Nothing works.

riazXrazor commented 5 years ago

Hi, I checked today also its downloaded ok

sameterap commented 5 years ago

Here is the gif: it's always like this: I tried with all resolutions. Even, there is a problem on GUI as well. It always gives error of USername/Password incorrect. There are other tools as well, they also give the same error.

F42LTqph1V

riazXrazor commented 5 years ago

Screenshot from 2019-03-15 15-02-01

i downloaded this course today with it.

riazXrazor commented 5 years ago

@sameterap try with some other course just to test it out.

sameterap commented 5 years ago

I tried your style, here is the gif. It even doesn't go after login.

alS6NPxxPw

Proinfinto commented 5 years ago

I tried it, it doesn't work. @sameterap agree +1

sameterap commented 5 years ago

@sameterap try with some other course just to test it out.

this is another course that I have:

OkHIDudMsl

sameterap commented 5 years ago

try with the only udl in command prompt no other parameters

same

NPNYNN6VLL

riazXrazor commented 5 years ago

render1552649206507 i tried this just a moment ago, I think its ur specific issue will need to debug it

sameterap commented 5 years ago

i tried this just a moment ago, I think its ur specific issue will need to debug it

this shouldn't be specific to me, because @Proinfinto has also the same problem.

Proinfinto commented 5 years ago

The problem remains. I tried again. How can we debug?

riazXrazor commented 5 years ago

Hi, wats the status ?

sameterap commented 5 years ago

Hi,

Unfortunatelly it's not working. The login problem occurs on other tools as well (https://github.com/FaisalUmair/udemy-downloader-gui) but version 1.5.0 in this tool is working, and I'm using it. If you check here, the creator of this tool is implemented sth here, but temporary. https://github.com/FaisalUmair/udemy-downloader-gui/issues/226#issuecomment-474033150

riazXrazor commented 5 years ago

Hi, a question wats the node version @sameterap ? have any body tried with different network, jst to test ?

sameterap commented 5 years ago

wats the node version @sameterap ?

Hi, node version is : 10.15.2 npm version is: 6.4.1

I have tried on 3 different location. Home, Work and somewhere else.

riazXrazor commented 5 years ago

@sameterap have u tried this ? , first login into your udemy account via udemy.com website normally , den in the same network try logging in via "udl"

sameterap commented 5 years ago

@sameterap have u tried this ? , first login into your udemy account via udemy.com website normally , den in the same network try logging in via "udl"

yes, I'm already logged in to web. On the following image, you can see that.

image

riazXrazor commented 5 years ago

@sameterap can u send me ur email/password just for a while to test 10 min or so, den u can change ur password.

sameterap commented 5 years ago

@sameterap can u send me ur email/password just for a while to test 10 min or so, den u can change ur password.

I sent to riazcool77@gmail.com. Thanks

riazXrazor commented 5 years ago

@sameterap can u send me ur email/password just for a while to test 10 min or so, den u can change ur password.

I sent to riazcool77@gmail.com. Thanks

great thanks man

riazXrazor commented 5 years ago

Screenshot from 2019-03-20 16-02-59 @sameterap i was able to login, no trouble

sameterap commented 5 years ago

@sameterap i was able to login, no trouble

maybe linux version is working, I'm using windows. Let me try on my colleague's pc who has linux. I have tried on around 5 windows pc, it's not working on windows.

riazXrazor commented 5 years ago

@sameterap i was able to login, no trouble

maybe linux version is working, I'm using windows. Let me try on my colleague's pc who has linux. I have tried on around 5 windows pc, it's not working on windows.

ok let me den try on windows too

riazXrazor commented 5 years ago

@sameterap yup its a windows issue, the same issue is occurring u mentioned, specifically may be win7 i think, coz at home i hv win10 it was working there if i remember correctly.

sameterap commented 5 years ago

Actually I'm using win10 pro

image

riazXrazor commented 5 years ago

ok hmm, den will figure out wat is causing the issue n fix it soon, thanks for the debug help @sameterap

sameterap commented 5 years ago

ok hmm, den will figure out wat is causing the issue n fix it soon, thanks for the debug help @sameterap

No problem, thanks for your work as well

Imaginativeone commented 5 years ago

Did you ever get this resolved? I'm having trouble with it on a mac.

sameterap commented 5 years ago

Did you ever get this resolved? I'm having trouble with it on a mac.

unfortunatelly, I'm using other tools until the problem is solved.

isopare commented 5 years ago

@sameterap, did you get this issue resolved, am facing same here

Imaginativeone commented 5 years ago

I'm still encountering this error:

` ◠ Logging in, please wait... { Error: Bad Request at Request.callback (/usr/local/lib/node_modules/udemy-dl/node_modules/superagent/lib/node/index.js:706:15) at parser (/usr/local/lib/node_modules/udemy-dl/node_modules/superagent/lib/node/index.js:916:18) at IncomingMessage.res.on (/usr/local/lib/node_modules/udemy-dl/node_modules/superagent/lib/node/parsers/json.js:19:7) at IncomingMessage.emit (events.js:202:15) at endReadableNT (_stream_readable.js:1132:12) at processTicksAndRejections (internal/process/next_tick.js:76:17) status: 400, response: Response { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, res: IncomingMessage { _readableState: [ReadableState], readable: false, _events: [Object], _eventsCount: 4, _maxListeners: undefined, socket: [TLSSocket], connection: [TLSSocket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: [Object], rawHeaders: [Array], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'Bad Request', client: [TLSSocket], _consuming: false, _dumped: false, req: [ClientRequest], text: '{"detail": "Oops, something went wrong."}' }, request: Request { _events: [Object], _eventsCount: 2, _maxListeners: undefined, _agent: false, _formData: null, method: 'POST', url: 'https://www.udemy.com/api-2.0/auth/udemy-auth/login/?fields[user]=access_token', _header: [Object], header: [Object], writable: true, _redirects: 0, _maxRedirects: 5, cookies: '', qs: {}, _query: [], qsRaw: [], _redirectList: [], _streamRequest: false, _data: [Object], req: [ClientRequest], protocol: 'https:', host: 'www.udemy.com', _endCalled: true, _callback: [Function], _fullfilledPromise: [Promise], res: [IncomingMessage], response: [Circular], called: true }, req: ClientRequest { _events: [Object], _eventsCount: 3, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 47, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [TLSSocket], connection: [TLSSocket], _header: 'POST /api-2.0/auth/udemy-auth/login/?fields[user]=access_token HTTP/1.1\r\nHost: www.udemy.com\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: StackOverflow\r\nX-Requested-With: XMLHttpRequest\r\nAuthorization: Basic YWQxMmVjYTljYmUxN2FmYWM2MjU5ZmU1ZDk4NDcxYTY6YTdjNjMwNjQ2MzA4ODI0YjIzMDFmZGI2MGVjZmQ4YTA5NDdlODJkNQ==\r\nReferer: https://www.udemy.com/join/login-popup\r\nOrigin: https://www.udemy.com\r\nAccept: application/json\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 47\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: [Agent], socketPath: undefined, timeout: undefined, method: 'POST', path: '/api-2.0/auth/udemy-auth/login/?fields[user]=access_token', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null,

    [Symbol(outHeadersKey)]: [Object] },
 text: '{"detail": "Oops, something went wrong."}',
 body: { detail: 'Oops, something went wrong.' },
 files: undefined,
 buffered: true,
 headers:
  { 'content-type': 'application/json',
    allow: 'POST, OPTIONS',
    'x-frame-options': 'SAMEORIGIN',
    'cache-control':
     'must-revalidate, no-store, max-age=0, pre-check=0, post-check=0, private, no-cache, max-stale=0',
    'access-control-allow-origin': 'https://www.udemy.com',
    'set-cookie': [Array],
    'access-control-allow-credentials': 'true',
    'access-control-allow-methods': 'GET, POST, PUT, DELETE, OPTIONS',
    'access-control-allow-headers':
     'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With',
    'access-control-expose-headers': 'Authorization',
    'content-length': '41',
    'accept-ranges': 'bytes',
    date: 'Wed, 17 Apr 2019 11:44:17 GMT',
    via: '1.1 varnish',
    connection: 'close',
    'x-served-by': 'cache-bwi5021-BWI',
    'x-cache': 'MISS',
    'x-cache-hits': '0',
    'x-timer': 'S1555501458.850180,VS0,VE35',
    vary: 'Origin, Cookie',
    'surrogate-key': '' },
 header:
  { 'content-type': 'application/json',
    allow: 'POST, OPTIONS',
    'x-frame-options': 'SAMEORIGIN',
    'cache-control':
     'must-revalidate, no-store, max-age=0, pre-check=0, post-check=0, private, no-cache, max-stale=0',
    'access-control-allow-origin': 'https://www.udemy.com',
    'set-cookie': [Array],
    'access-control-allow-credentials': 'true',
    'access-control-allow-methods': 'GET, POST, PUT, DELETE, OPTIONS',
    'access-control-allow-headers':
     'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With',
    'access-control-expose-headers': 'Authorization',
    'content-length': '41',
    'accept-ranges': 'bytes',
    date: 'Wed, 17 Apr 2019 11:44:17 GMT',
    via: '1.1 varnish',
    connection: 'close',
    'x-served-by': 'cache-bwi5021-BWI',
    'x-cache': 'MISS',
    'x-cache-hits': '0',
    'x-timer': 'S1555501458.850180,VS0,VE35',
    vary: 'Origin, Cookie',
    'surrogate-key': '' },
 statusCode: 400,
 status: 400,
 statusType: 4,
 info: false,
 ok: false,
 redirect: false,
 clientError: true,
 serverError: false,
 error:
  { Error: cannot POST /api-2.0/auth/udemy-auth/login/?fields[user]=access_token (400)
      at Response.toError (/usr/local/lib/node_modules/udemy-dl/node_modules/superagent/lib/node/response.js:94:15)
      at ResponseBase._setStatusProperties (/usr/local/lib/node_modules/udemy-dl/node_modules/superagent/lib/response-base.js:123:16)
      at new Response (/usr/local/lib/node_modules/udemy-dl/node_modules/superagent/lib/node/response.js:41:8)
      at Request._emitResponse (/usr/local/lib/node_modules/udemy-dl/node_modules/superagent/lib/node/index.js:752:20)
      at parser (/usr/local/lib/node_modules/udemy-dl/node_modules/superagent/lib/node/index.js:916:38)
      at IncomingMessage.res.on (/usr/local/lib/node_modules/udemy-dl/node_modules/superagent/lib/node/parsers/json.js:19:7)
      at IncomingMessage.emit (events.js:202:15)
      at endReadableNT (_stream_readable.js:1132:12)
      at processTicksAndRejections (internal/process/next_tick.js:76:17)
    status: 400,
    text: '{"detail": "Oops, something went wrong."}',
    method: 'POST',
    path: '/api-2.0/auth/udemy-auth/login/?fields[user]=access_token' },
 created: false,
 accepted: false,
 noContent: false,
 badRequest: true,
 unauthorized: false,
 notAcceptable: false,
 forbidden: false,
 notFound: false,
 unprocessableEntity: false,
 type: 'application/json',
 links: {},
 setEncoding: [Function: bound ],
 redirects: [] } }

Error: Oops, something went wrong.`

riazXrazor commented 5 years ago

@Imaginativeone update the tool to latest version, it seems ur using the older version.

Imaginativeone commented 5 years ago

Sorry for the trouble...how do I do the update?

riazXrazor commented 5 years ago

jus run npm install -g udemy-dl it should update to the latest verison.

Imaginativeone commented 5 years ago

No luck. I'm using version 1.0.1

Imaginativeone commented 5 years ago

Are you open to me sending my username/password?

TobiasDev commented 5 years ago

I have the same issue, after entering my username and password it doesn't do anything.

When I try to use the full path directly (with -u and -p), I get a message cannot log-in, which confuses me as I can log-in on the website.

Imaginativeone commented 5 years ago

Perhaps Udemy is blocking my downloads. How do I find out?

johndoe1969 commented 5 years ago

I'm running Ubuntu 18.04LTS and it's been working up until today. Now I get "cannot logging in" message when using CLI. I upgraded to v1.0.1 and that did not help. I can go to Udemy site and login with no problems.

riazXrazor commented 5 years ago

hmm this happens after downloading many video, "Are you human" captcha page is blocking the script