Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to download webpage: HTTP Error 503:Service Unavailable #11432

Closed
CatWang opened this issue Dec 13, 2016 · 12 comments
Closed

Unable to download webpage: HTTP Error 503:Service Unavailable #11432

CatWang opened this issue Dec 13, 2016 · 12 comments

Comments

@CatWang
Copy link

@CatWang CatWang commented Dec 13, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.12.12. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • [ √ ] I've verified and I assure that I'm running youtube-dl 2016.12.12

Before submitting an issue make sure you have:

  • [ √ ] At least skimmed through README and most notably FAQ and BUGS sections
  • [ √ ] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • [ √ ] Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

![image](https://cloud.githubusercontent.com/assets/10899016/21136078/21e18708-c15f-11e6-93a1-5403316976ca.png)

---

@CatWang
Copy link
Author

@CatWang CatWang commented Dec 13, 2016

image

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 13, 2016

@CatWang Could you copy the error message as texts and paste it here?

@CatWang
Copy link
Author

@CatWang CatWang commented Dec 14, 2016

@yan12125 Ok, the texts are as follows:

huchenchen@face3-ST:/home/catwang/AsianVideos$ sudo youtube-dl -v "gvsearch500: little asian boy"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'gvsearch500: little asian boy']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.12.12
[debug] Python version 2.7.6 - Linux-3.19.0-59-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: none
[debug] Proxy map: {}
[video.google:search] gvsearch: little asian boy: Downloading result page 1
ERROR: Unable to download webpage: HTTP Error 503: Service Unavailable (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 404, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2001, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 442, in error
result = self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 629, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

Actually, I think maybe it's caused by the parameter I give behind 'gvsearch' is too large that there are not enough search results on Youtube. But I think if this is the problem, it's better to tell the user about how many search results they can get, not just reporting errors.

Thank you for your response!

@CatWang
Copy link
Author

@CatWang CatWang commented Dec 14, 2016

@yan12125 I tried another time, it seem that if I use 300 instead of 500, at first, it goes well. But if I start it another time, it will report the seem error about service unavailable.

@CatWang
Copy link
Author

@CatWang CatWang commented Dec 14, 2016

@yan12125 If I use just gvsearch with no parameters, the problem still exists. So may be the problem is not related to the parameter.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 14, 2016

@CatWang Could you paste the output of this command?

curl -v -L "http://www.google.com/search?tbm=vid&q=little+asian+boy&start=0&hl=en" -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)"
@CatWang
Copy link
Author

@CatWang CatWang commented Dec 15, 2016

@yan12125 the output of the command is as follows:

<!doctype html><html itemscope="" itemtype="http://schema.org/SearchResultsPage" lang="en-HK"><head><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><link href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut icon"><meta content="origin" id="mref" name="referrer"><title>little asian boy - Google Search</title> <script>(function(){window.google={kEI:'1D5SWNTNCsKJ8wWIrqWABA',kEXPI:'1351903,1352267,1352397,3700334,4029815,4032677,4038012,4043492,4045841,4048347,4062666,4064904,4065786,4067859,4067925,4068550,4068560,4069839,4069840,4071842,4072602,4072775,4072835,4073405,4073728,4073958,4074955,4076095,4076931,4076999,4078430,4078438,4078760,4079106,4079626,4079894,4080167,4081037,4081038,4081463,4081484,4082056,4082217,4082618,4082940,4083476,4084180,4084298,4084343,4084956,4085181,4085413,4086011,4087708,4087718,4088154,4088218,4089017,4089033,4089092,4089106,4089338,4089538,4090090,4090093,4090099,4090377,4090540,4090806,4090894,8300096,8300272,8506615,8507380,8507419,8507899,8508059,8508065,8508589,8508956,8509066,8509081,8509225,8509243,10200083,13500022',authuser:0,kscs:'c9c918f0_24'};google.kHL='en-HK';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI};google.getLEI=function(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return null};google.wl=function(a,b){try{google.ml(Error(a),!1,b)}catch(c){}};google.time=function(){return(new Date).getTime()};google.log=function(a,b,c,d,g){a=google.logUrl(a,b,c,d,g);if(""!=a){b=new Image;var e=google.lc,f=google.li;e[f]=b;b.onerror=b.onload=b.onabort=function(){delete e[f]};window.google&&window.google.vel&&window.google.vel.lu&&window.google.vel.lu(a);b.src=a;google.li=f+1}};google.logUrl=function(a,b,c,d,g){var e="",f=google.ls||"";c||-1!=b.search("&ei=")||(e="&ei="+google.getEI(d),-1==b.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));a=c||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+f+"&zx="+google.time();/^http:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="");return a};google.y={};google.x=function(a,b){google.y[a.id]=[a,b];return!1};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);(function(){google.hs={h:true,p:false,pa:true,q:false};})();google.arwt=function(a){a.href=document.getElementById(a.id.substring(1)).href;return!0};(function(){'use strict';var k=this,l=Date.now||function(){return+new Date};var u={};var w=function(a,d){if(null===d)return!1;if("contains"in a&&1==d.nodeType)return a.contains(d);if("compareDocumentPosition"in a)return a==d||!!(a.compareDocumentPosition(d)&16);for(;d&&a!=d;)d=d.parentNode;return d==a};var x=function(a,d){return function(b){b||(b=window.event);return d.call(a,b)}},B=function(a){a=a.target||a.srcElement;!a.getAttribute&&a.parentNode&&(a=a.parentNode);return a},C="undefined"!=typeof navigator&&/Macintosh/.test(navigator.userAgent),D="undefined"!=typeof navigator&&!/Opera/.test(navigator.userAgent)&&/WebKit/.test(navigator.userAgent),E={A:1,INPUT:1,TEXTAREA:1,SELECT:1,BUTTON:1},F=function(){this._mouseEventsPrevented=!0},G={A:13,BUTTON:0,CHECKBOX:32,COMBOBOX:13,GRIDCELL:13,LINK:13,LISTBOX:13,MENU:0,MENUBAR:0,MENUITEM:0,MENUITEMCHECKBOX:0,MENUITEMRADIO:0,OPTION:0,RADIO:32,RADIOGROUP:32,RESET:0,SUBMIT:0,TAB:0,TREE:13,TREEITEM:13},H=function(a){return(a.getAttribute("type")||a.tagName).toUpperCase()in aa},I=function(a){return(a.getAttribute("type")||a.tagName).toUpperCase()in ba},aa={CHECKBOX:!0,OPTION:!0,RADIO:!0},ba={COLOR:!0,DATE:!0,DATETIME:!0,"DATETIME-LOCAL":!0,EMAIL:!0,MONTH:!0,NUMBER:!0,PASSWORD:!0,RANGE:!0,SEARCH:!0,TEL:!0,TEXT:!0,TEXTAREA:!0,TIME:!0,URL:!0,WEEK:!0},ca={A:!0,AREA:!0,BUTTON:!0,DIALOG:!0,IMG:!0,INPUT:!0,LINK:!0,MENU:!0,OPTGROUP:!0,OPTION:!0,PROGRESS:!0,SELECT:!0,TEXTAREA:!0};var J=function(){this.v=this.o=null},L=function(a,d){var b=K;b.o=a;b.v=d;return b};J.prototype.s=function(){var a=this.o;this.o&&this.o!=this.v?this.o=this.o.__owner||this.o.parentNode:this.o=null;return a};var M=function(){this.w=[];this.o=0;this.v=null;this.H=!1};M.prototype.s=function(){if(this.H)return K.s();if(this.o!=this.w.length){var a=this.w[this.o];this.o++;a!=this.v&&a&&a.__owner&&(this.H=!0,L(a.__owner,this.v));return a}return null};var K=new J,O=new M;var Q=function(){this.S=[];this.o=[];this.s=[];this.H={};this.v=null;this.w=[];P(this,"_custom")},da="undefined"!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),R=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+/,"").replace(/\s+$/,"")},ea=/\s*;\s*/,ia=function(a,d){return function(b){var c=d;if("_custom"==c){c=b.detail;if(!c||!c._type)return;c=c._type}var e;if("click"==c&&(C&&b.metaKey||!C&&b.ctrlKey||2==b.which||null==b.which&&4==b.button||b.shiftKey))c="clickmod";else{var f;f=b.which||b.keyCode||b.key;D&&3==f&&(f=13);if(13!=f&&32!=f)f=!1;else{var m=B(b),q=(m.getAttribute("role")||m.type||m.tagName).toUpperCase(),h;(h="keydown"!=b.type)||("getAttribute"in m?(h=(m.getAttribute("role")||m.tagName).toUpperCase(),h=!I(m)&&("COMBOBOX"!=h||"INPUT"!=h)&&!m.isContentEditable):h=!1,h=!h);(h= h||b.ctrlKey||b.shiftKey||b.altKey||b.metaKey||H(m)&&32==f)||((h=m.tagName in E)||(h=m.getAttributeNode("tabindex"),h=null!=h&&h.specified),h=!(h&&!m.disabled));h?f=!1:(m="INPUT"!=m.tagName.toUpperCase()||m.type,h=!(q in G)&&13==f,f=(0==G[q]%f||h)&&!!m)}f&&(c="clickkey")}q=b.srcElement||b.target;f=S(c,b,q,"",null);var g;b.path?(O.w=b.path,O.o=0,O.v=this,O.H=!1,m=O):m=L(q,this);for(;h=m.s();){e=h;var t;g=e;h=c;var p=g.__jsaction;if(!p)if(t=null,"getAttribute"in g&&(t=g.getAttribute("jsaction")),t){p= u[t];if(!p){for(var p={},y=t.split(ea),z=0,fa=y?y.length:0;z<fa;z++){var r=y[z];if(r){var A=r.indexOf(":"),N=-1!=A,ga=N?R(r.substr(0,A)):"click",r=N?R(r.substr(A+1)):r;p[ga]=r}}u[t]=p}g.__jsaction=p}else p=ha,g.__jsaction=p;"clickkey"==h?h="click":"click"!=h||p.click||(h="clickonly");g={R:h,action:p[h]||"",event:null,U:!1};f=S(g.R,g.event||b,q,g.action||"",e,f.timeStamp);if(g.U||g.action)break}f&&"touchend"==f.eventType&&(f.event._preventMouseEvents=F);if(g&&g.action){if(g="clickkey"==c)g=B(b),g= (g.type||g.tagName).toUpperCase(),(g=32==(b.which||b.keyCode||b.key)&&"CHECKBOX"!=g)||(g=B(b),q=(g.getAttribute("role")||g.tagName).toUpperCase(),g=g.tagName.toUpperCase()in ca&&"A"!=q&&!H(g)&&!I(g)||"BUTTON"==q);g&&(b.preventDefault?b.preventDefault():b.returnValue=!1);if("mouseenter"==c||"mouseleave"==c)if(g=b.relatedTarget,!("mouseover"==b.type&&"mouseenter"==c||"mouseout"==b.type&&"mouseleave"==c)||g&&(g===e||w(e,g)))f.action="",f.actionElement=null;else{var c={},n;for(n in b)"function"!==typeof b[n]&&

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 15, 2016

Thanks. The last try seems good.

I tried another time, it seem that if I use 300 instead of 500, at first, it goes well. But if I start it another time, it will report the seem error about service unavailable.

If I use just gvsearch with no parameters, the problem still exists. So may be the problem is not related to the parameter.

From those descriptions seems your connection is not so stable. By your name I guess you're live in China? AFAIK Chinese government blocks connections to Google services with GFW. Maybe you're another victim?

@CatWang
Copy link
Author

@CatWang CatWang commented Dec 19, 2016

Hahahahah, yup, I'm Chinese. But I ran this program in Hong Kong, so there would be no problem connecting to Google and Youtube. Anyway, I have already wrote another program and downloaded videos I wanted to do research. Thank you for your patient answers! @yan12125

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 19, 2016

OK. If you don't need youtube-dl anymore, feel free to close this issue.

@CatWang CatWang closed this Dec 20, 2016
@Diyaa-Alk
Copy link

@Diyaa-Alk Diyaa-Alk commented Dec 25, 2018

I have had the same exact problem (error 503):
it says (https can't contact with server)
and all I did is run the same command again and it worked for me on windows 10 64 bit

@Diyaa-Alk
Copy link

@Diyaa-Alk Diyaa-Alk commented Dec 25, 2018

so if you get this error again, just rerun the same command and it will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.