Closed abhion closed 6 years ago
same error for me @720 p
SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Request._callback (C:\Users\Administrator\AppData\Roaming\npm\node_module
s\udemy-dl\lib\core.js:249:32)
at self.callback (C:\Users\Administrator\AppData\Roaming\npm\node_modules\ud
emy-dl\node_modules\request\request.js:186:22)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (C:\Users\Administrator\AppData\Roaming\npm\node_m
odules\udemy-dl\node_modules\request\request.js:878:8)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
Can you share the courses url plz, that would be helpful
@riazXrazor sure thing. thanks for the app https://www.udemy.com/java-the-complete-java-developer-course/
Yeah. Thanks for making this. Here's the url: https://www.udemy.com/the-complete-guide-to-angular-2/learn/v4/overview
just to make it clear, you bought the course right ?
yes, I bought it
yeah. i did
ok, thanks i'll do a debug and fix the bug :+1:
thanks. @riazXrazor
cool. once again, thanks for making this
guys,can you view the course at the respective resolution in the udemy site ?
yeah. i'm watching it right now at 720
yeah I can
can anyone help me debug, jst wat some info from you ?
yeah sure. how can i help?
if any one of you know how to use the googledev tool plz can you send me the response for the highlited url,
if ur having trouble, jst wait m making a small vid of how to do.
that would be great! i did not find that url, bunch of others
if u hv any queries jst let me kno, i'll guide you
This is what I see in the response tab:
{{"_class": "lecture", "id": 6655606, "title": "Project Setup and First App", "created": "2017-03-07T12:54:48Z", "description": "<p>Enough of the talking, let's create our first Angular project and view our first app in the browser.</p>", "title_cleaned": "project-setup-and-first-app", "is_published": true, "transcript": "", "is_downloadable": true, "is_free": true, "asset": {"_class": "asset", "id": 8854490, "asset_type": "Video", "title": "getting-started-04-setup-and-first-app.mp4", "created": "2017-07-01T08:22:20Z", "status": 1, "external_url": "", "download_urls": {"Video": [{"type": "video/mp4", "label": "720", "file": "https://udemy-assets-on-demand2.udemy.com/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/WebHD_720p.mp4?nva=20171209232856&filename=getting-started-04-setup-and-first-app.mp4&download=True&token=0c3ae0361be9c63fcac34"}, {"type": "video/mp4", "label": "480", "file": "https://udemy-assets-on-demand.udemy.com/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/WebHD_480.mp4?nva=20171209232856&filename=getting-started-04-setup-and-first-app.mp4&download=True&token=02e650f26ac11f9927666"}, {"type": "video/mp4", "label": "360", "file": "https://udemy-assets-on-demand2.udemy.com/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/WebHD.mp4?nva=20171209232856&filename=getting-started-04-setup-and-first-app.mp4&download=True&token=05870ac664c100fc2b14f"}, {"type": "video/mp4", "label": "144", "file": "https://udemy-assets-on-demand.udemy.com/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/Web_144.mp4?nva=20171209232856&filename=getting-started-04-setup-and-first-app.mp4&download=True&token=04f1627085d549fb14f54"}]}, "slide_urls": []}, "sort_order": 586, "course": {"_class": "course", "id": 756150, "url": "/the-complete-guide-to-angular-2/", "is_paid": true, "has_autogenerated_captions": true}, "view_html": "\n\n\n\n\n<div class=\"asset-container ud-angular-loader\"\n data-module-id=\"asset-player\"\n data-module-name=\"asset-player/app\">\n <react-video-player class=\"w100p h100p\"\n country-id=\"'None'\"\n download-api-url=\"'/api-2.0/users/me/subscribed-courses/756150/lectures/6655606'\"\n lecture-id=\"6655606\"\n asset-id=\"8854490\"\n course-id=\"756150\"\n on-video-available=\"onVideoAvailable\"\n on-video-end=\"onVideoEnd\"\n on-video-progress=\"onVideoProgress\"\n on-video-tracking=\"onVideoTracking\"\n player-id=\"'js-video-player_8854490_61306891'\"\n progress-event-name=\"'lectureProgress_6655606'\"\n thumbnail=\"'https://udemy-assets-on-demand.udemy.com/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/thumb-1.jpg?nva=20171209232856&token=06c82cfcd035afb00c5ff'\"\n tracking-tag=\"'ctp_lecture'\"\n video-autofocus=\"true\"\n videojs-setup-data=\"{"autoplay":true,"playbackRates":[0.5,0.75,1,1.25,1.5,2.0],"inactivityTimeout":800,"flash":{"hls":{"withCredentials":true}},"plugins":{"bookmark":{},"resolutionSelector":{"defaultRes":"Auto,720,480,360","extraLinks":[{"event":"downloadlecture","name":"Download lecture"},{"event":"showhotkeys","name":"Keyboard shortcuts"},{"template":"\\u003cspan\\u003eReport Technical Issue\\u003c/span\\u003e","event":"reporttechnical","name":"Report Technical Issue"},{"template":"\\u003ci class=\\"udi udi-flag mr5\\"\\u003e\\u003c/i\\u003e\\u003cspan\\u003eReport Abuse\\u003c/span\\u003e","event":"reportabuse","name":"Report Abuse"}]},"speedcontroller":{},"timer":{"positionEventName":"positionHandler_6655606","interval":15,"progressEventName":"lectureProgress_6655606"},"udemypatches":{"inactiveTimeoutTime":2000},"hotkeys":{"enableMute":false}},"controlBar":{"volumeControl":false,"captionsButton":{"title":"Captions"},"muteToggle":false,"playbackRateMenuButton":false,"progressControl":{"seekBar":{"mouseTimeDisplay":false},"keepTooltipsInside":false},"volumeMenuButton":{"volumeBar":{"vertical":true},"inline":false}},"sources":[{"type":"video/mp4","src":"https://udemy-assets-on-demand2.udemy.com/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/WebHD_720p.mp4?nva=20171209232856\\u0026token=086ccf61d2fdafc596e3f","label":"720"},{"type":"video/mp4","src":"https://udemy-assets-on-demand.udemy.com/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/WebHD_480.mp4?nva=20171209232856\\u0026token=0359699b2aa3dc1611db8","label":"480"},{"type":"video/mp4","src":"https://udemy-assets-on-demand2.udemy.com/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/WebHD.mp4?nva=20171209232856\\u0026token=0062124be1dd1c2e7c5f0","label":"360"},{"type":"video/mp4","src":"https://udemy-assets-on-demand.udemy.com/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/Web_144.mp4?nva=20171209232856\\u0026token=03ef886693f25844e1632","label":"144"},{"type":"application/x-mpegURL","src":"HTTPS://adaptive-streaming.udemy.com/756150/8854490/2017-07-01_08-22-20-4ea27221a1186de98f53e8cbe3e8cf27/aa00bc77c6290d2f6f05cefb1f92d84a00bb.m3u8?nva=1512862136\\u0026ttl=16200\\u0026ip=None\\u0026token=09493af2598e0d36a25c4","label":"Auto"}],"duration":313,"html5":{"hls":{"withCredentials":true}}}\"\n text-tracks=\"[{"label":"English [Auto]","srclang":"en","src":"https://udemy-captions.s3.amazonaws.com:443/8854490/en_US/2017-07-10_15-37-29-5bb2c5066520402cdbf6571adf943aa1.vtt?Signature=Qbo97Ne%2FoU0czr2qM6yLJIa4WvU%3D\\u0026Expires=1512860336\\u0026AWSAccessKeyId=AKIAJA6MCXJVONCBES7A\\u0026response-content-disposition=attachment%3B%20filename%3D%22project-setup-and-first-appautogenerated.vtt%22","kind":"captions","language":"en"}]\"\n player-skin=\"'vjs-udemy-skin-v2'\"\n player-config=\"'ct_v4'\"\n preload=\"'auto'\"\n >\n </react-video-player>\n</div>\n", "can_give_cc_feedback": true, "can_see_cc_feedback_popup": true}
thanks a lot guys, i think i can debug with this :1st_place_medal:
thanks @electather and @abhion :+1: now i can analyse and debug
thanks man! so glad i could help
Are you working on this at 12.30 a.m
:smiley: yup this problem seems quite interesting, trying to find the bug.
Awesome.. Good luck
thanks man !! :smile:
well i push out a small fix, not sure though if it will work or not, plz test and let me know weather the issue is fixed or not.
Thanks, Riaz
great, thanks.
now i'm getting this error
? Select the video resolution to download: 720
Error occured during getting lecture
{ Error: connect ETIMEDOUT 151.101.1.168:443
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
code: 'ETIMEDOUT',
errno: 'ETIMEDOUT',
syscall: 'connect',
address: '151.101.1.168',
port: 443 }
any idea why?
ps. i'm working with windows server 2012 r2 and i think there is a conflict in port 443.
Using any web application with Work Folders may create port conflicts between the web application and Work Folders. Work Folders uses by default ports HTTPS=443 and HTTP=80. Most web applications use the same well known ports.
can you fix the port or recommend any way to resolve this conflict? it would be much appreciated
It seems like a network error
On Sun 10 Dec, 2017, 2:36 AM electather, notifications@github.com wrote:
now i'm getting this error
? Select the video resolution to download: 720 Error occured during getting lecture { Error: connect ETIMEDOUT 151.101.1.168:443 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: '151.101.1.168', port: 443 }
any idea why?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/riazXrazor/udemy-dl/issues/17#issuecomment-350505550, or mute the thread https://github.com/notifications/unsubscribe-auth/AMlUe2TTNeytUfv4bdcjlT3-UzpawZjWks5s-vZPgaJpZM4Q7dA1 .
I know. There is a conflict with this app and windows server's default port (443) how can i change it?
Should I just do another npm install to install the new version?
@abhion yup
I'm still getting the same error man
@abhion then uninstall n install again.
@electather can you try disabling the windows server ?
@abhion btw i didn't find any issue with the code as to way the error is occurring so i put better error handling to get more precise error message.
@riazXrazor i'm using a VPS for downloads ( some problems with my current ISP so i'm doing my huge downloads there then p2p to my pc) so i can't disable windows server
in case of that, well m not sure try adding 151.101.1.168:443 to the incoming and outgoing connections TCP list if you have any , or the firewall exception list.
@riazXrazor thanks. fixed now
@electather your welcome :+1:
it works. thanks a lot man
I can download some courses. But some courses show this error. Select the video resolution to download: 480 undefined:1 undefined ^
SyntaxError: Unexpected token u in JSON at position 0 at Object.parse (native) at Request._callback (C:\Users\Abhi\AppData\Roaming\npm\node_modules\udemy-dl\lib\core.js:249:32) at self.callback (C:\Users\Abhi\AppData\Roaming\npm\node_modules\udemy-dl\node_modules\request\request.js:186:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.onRequestError (C:\Users\Abhi\AppData\Roaming\npm\node_modules\udemy-dl\node_modules\request\request.js:878:8) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13)