r0oth3x49 / udemy-dl

A cross-platform python based utility to download courses from udemy for personal offline use.
MIT License
4.85k stars 1.2k forks source link

When I download the large course, receive a 503 massage #499

Closed Carlosx7 closed 4 years ago

Carlosx7 commented 4 years ago

[*] : Trying to login using cookies ... [+] : Logged in successfully. [-] : Udemy Says : 503 html_unavailable ... [centos@ip-172-26-10-175 udemy-dl]$

Carlosx7 commented 4 years ago

image

Nightreaver commented 4 years ago

I have the same recently, but I don't thinks its related to course size. Some of these courses I downloaded already once, but now updating fails... so it could be on udemy's end Ie. I downloaded 5 course yesterday with 15-20GB each, and one of the smaller ones are failing... something is weird

Nightreaver commented 4 years ago

the actualy reponse to that 503 is

We’re having trouble reaching our servers. Try waiting a minute or two and then reload.

<!doctype html>
<html lang='en'>
   <head>
      <meta charset='utf-8'>
      <title>Error • Udemy</title>
      <meta name='viewport' content='width=device-width, initial-scale=1'>
      <link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'>
      <style>
         * {line-height: 1.5;margin: 0; }
         html { background: #fff; font-family: 'Open Sans', Helvetica, Arial, sans-serif; text-align: center; }
         body { height: 100vh; padding:0px 20px; } svg { width: 70px; margin-top: 40px; }
         h1 { font-weight: 300; }
         img { margin:0 auto; max-width: 200px; margin-top: 40px;}
         a { color: #007791; text-decoration: none;}
         @media screen and (max-width: 620px) {
         }
         .main-content, .main-content-wrapper {
         display: flex;
         justify-content: space-between;
         flex-direction: column;
         height: 100%;
         }
         .error__container {
         text-align: center;
         }
         .error__container .error__greeting {
         color: #e8e9eb;
         font-size: 124px;
         font-weight: 300;
         letter-spacing: -1px;
         line-height: 178px;
         }
         .error__container .error__body {
         margin: 0 auto;
         max-width: 460px;
         }
         .error__container .error__main {
         font-size: 35px;                            font-weight: 300;                            line-height: 38px;                        }                        .error__container .error__cta {                            color: #686f7a;                            font-size: 15px;                            line-height: 20px;                            margin: 20px 0;                        }                        .error__code {                            color: #686f7a;                            font-size: 14px;                            line-height: 20px;                            margin-top: 10px;                            max-width: 460px;                            margin: 0 auto;                            margin-bottom: 5px;                        }                        .error__languages {                            color: #686f7a;                            font-size: 14px;                            line-height: 20px;                            margin-top: 20px;                            max-width: 460px;                            margin: 0 auto;                            margin-bottom: 40px;                        }                    
      </style>
   </head>
   <body>
      <div class='main-content'>
         <img src='https://d1ddv1x5unuruc.cloudfront.net/error_page/udemy-logo-red.svg' />
         <div class='error__container'>
            <h1 class='error__greeting'>Sorry.</h1>
            <div class='error__body'>
               <h5 class='error__main'>We’re having trouble reaching our servers.</h5>
               <p class='error__cta text-midnight-lighter'>Try waiting a minute or two and then reload.<br>503</p>
            </div>
         </div>
         <p class='error__languages'>Lo sentimos, se ha producido un error en el servidor • Désolé, une erreur de serveur s'est produite • Desculpe, ocorreu um erro no servidor • Es ist leider ein Server-Fehler aufgetreten •'申し訳ありません。サーバーエラーが発生しました。</p>
      </div>
   </body>
</html>
r0oth3x49 commented 4 years ago

as i can't reproduce and no response from @Carlosx7 as well, i 'm assuming the error is now gone for him. Plus @Nightreaver thanks for the detail information, @Carlosx7 you could wait and if still the issue occurs i will check it though the error seems to be on server end and tool can't do much in that case as it relays on server response.

Nightreaver commented 4 years ago

hey oscar, that seems to be unrelated to "businessgroup". I already have "the complete guide to angluar 2" downloaded already some time ago, but recently it keeps failing and I cant get an update

I think there is a set of course affected that will fail to download. The course aws-certified-solutions-architect-associate-saa-c02 however seem to work sometimes, and return 503 other times. I suppose its udemy cloud messing up things or some CDN service.

So from 503 affected courses I have:

complete-networking-fundamentals-course-ccna-start
spring-hibernate-tutorial
nodejs-the-complete-guide
the-complete-guide-to-angular-2
aws-certified-solutions-architect-associate-saa-c02 (sometimes)
Nightreaver commented 4 years ago

The issue lies indeed in udemy-dl itself! After checking this site: https://www.udemy.com/developers/affiliate/

I noticed that they say that page_size maximum is 100 If you check the udemydl ´_compat.py´ you can see some values are 1000 or even 10000. I changed all page_size to 100 and it works like charm now!

r0oth3x49 commented 4 years ago

The issue lies indeed in udemy-dl itself! After checking this site: https://www.udemy.com/developers/affiliate/

I noticed that they say that page_size maximum is 100 If you check the udemydl ´_compat.py´ you can see some values are 1000 or even 10000. I changed all page_size to 100 and it works like charm now!

did you try to read the code, the big page size is there for purpose to get the entire course at once instead of requesting in chunks

Capture

Nightreaver commented 4 years ago

No I didn't, your code doesn't make sense to me in so many different ways. So feel free to fix it your way - the solution is there

sandeepmattepu commented 4 years ago

The issue lies indeed in udemy-dl itself! After checking this site: https://www.udemy.com/developers/affiliate/

I noticed that they say that page_size maximum is 100 If you check the udemydl ´_compat.py´ you can see some values are 1000 or even 10000. I changed all page_size to 100 and it works like charm now!

Thanks @Nightreaver your fix worked for me