user agent bug #66

Closed
opened 2026-02-20 21:01:13 -05:00 by deekerman · 9 comments
Owner

Originally created by @Jamie-Landeg-Jones on GitHub (Mar 1, 2011).

ok, not exactly serious, but you have the user agent as Gecko/20100101

i.e. 2010 instead of 2011 !!

Originally created by @Jamie-Landeg-Jones on GitHub (Mar 1, 2011). ok, not exactly serious, but you have the user agent as Gecko/20100101 i.e. 2010 instead of 2011 !!
Author
Owner

@bat999 commented on GitHub (Mar 1, 2011):

Also still shows Firefox/4.0b11 though Firefox/4.0b12 is now installed.
Mozilla/5.0 (X11; Linux x86_64; rv:2.0b11) Gecko/20100101 Firefox/4.0b11

@bat999 commented on GitHub (Mar 1, 2011): Also still shows Firefox/4.0b11 though Firefox/4.0b12 is now installed. Mozilla/5.0 (X11; Linux x86_64; rv:2.0b11) Gecko/20100101 Firefox/4.0b11
Author
Owner

@bat999 commented on GitHub (Mar 1, 2011):

Edit
The Gecko 2010 fault might not be caused by youtube-dl because www.browserspy.dk also shows my browser user agent as 2010 too:-
Mozilla/5.0 (X11; Linux i686; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
Though browserspy does show Firefox/4.0b12 correctly.

@bat999 commented on GitHub (Mar 1, 2011): Edit The Gecko 2010 fault might not be caused by youtube-dl because www.browserspy.dk also shows my browser user agent as 2010 too:- Mozilla/5.0 (X11; Linux i686; rv:2.0b12) Gecko/20100101 Firefox/4.0b12 Though browserspy does show Firefox/4.0b12 correctly.
Author
Owner

@Jamie-Landeg-Jones commented on GitHub (Mar 1, 2011):

oh! Weird. Definitely a bug, but not a youtube-dl bug then, sorry! (which rightly 'emulates' the browser)

My firefox shows Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.13) Gecko/20110125 Firefox/3.6.13

@Jamie-Landeg-Jones commented on GitHub (Mar 1, 2011): oh! Weird. Definitely a bug, but not a youtube-dl bug then, sorry! (which rightly 'emulates' the browser) My firefox shows Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.13) Gecko/20110125 Firefox/3.6.13
Author
Owner

@bat999 commented on GitHub (Mar 1, 2011):

Edit again.
Hi
There is a reason why Firefox-4 shows UserAgent year 2010 instead of 2011.
Here:- http://forums.mozillazine.org/viewtopic.php?f=23&t=2102603

@bat999 commented on GitHub (Mar 1, 2011): Edit again. Hi There is a reason why Firefox-4 shows UserAgent year 2010 instead of 2011. Here:- http://forums.mozillazine.org/viewtopic.php?f=23&t=2102603
Author
Owner

@Jamie-Landeg-Jones commented on GitHub (Mar 1, 2011):

eeek, thanks... that explains it.

I didn't realise it was the build date, I assumed it was the date of the gecko release..

nasty bit of info to include for those of us who do source builds!

cheers for the detailed reply

@Jamie-Landeg-Jones commented on GitHub (Mar 1, 2011): eeek, thanks... that explains it. I didn't realise it was the build date, I assumed it was the date of the gecko release.. nasty bit of info to include for those of us who do source builds! cheers for the detailed reply
Author
Owner

@rg3 commented on GitHub (Mar 1, 2011):

About the beta 11/12: when I released the latest youtube-dl version, I was using beta 11. Beta 12 hadn't made it yet to my distribution repositories. I literally copied the user-agent string from the browser I was using at the moment.

@rg3 commented on GitHub (Mar 1, 2011): About the beta 11/12: when I released the latest youtube-dl version, I was using beta 11. Beta 12 hadn't made it yet to my distribution repositories. I literally copied the user-agent string from the browser I was using at the moment.
Author
Owner

@bat999 commented on GitHub (Mar 1, 2011):

OK
I think that I understand now.
We are using a Mozilla header for youtube-dl so that YouTube thinks it's talking to a browser, not to a download program.
When we use the "--dump-user-agent" command it just tells us which header we are using. It doesn't tell us which browser we are using.

It's here in the code at line 40:-

std_headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:2.0b11) Gecko/20100101 Firefox/4.0b11',
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,;q=0.7',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,
/*;q=0.8',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'en-us,en;q=0.5',

}

@bat999 commented on GitHub (Mar 1, 2011): OK I think that I understand now. We are using a Mozilla header for youtube-dl so that YouTube thinks it's talking to a browser, not to a download program. When we use the "--dump-user-agent" command it just tells us which header we are using. It doesn't tell us which browser we are using. It's here in the code at line 40:- std_headers = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:2.0b11) Gecko/20100101 Firefox/4.0b11', 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,_;q=0.7', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,_/*;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-us,en;q=0.5', }
Author
Owner

@rg3 commented on GitHub (Mar 1, 2011):

Yes, it's just the header youtube-dl sends, to mimic a web browser.

@rg3 commented on GitHub (Mar 1, 2011): Yes, it's just the header youtube-dl sends, to mimic a web browser.
Author
Owner

@Jamie-Landeg-Jones commented on GitHub (Mar 1, 2011):

Currently it seems that all you need is the cookies and the url, but it's a good idea to have these to 'fly under the radar' !

@Jamie-Landeg-Jones commented on GitHub (Mar 1, 2011): Currently it seems that all you need is the cookies and the url, but it's a good idea to have these to 'fly under the radar' !
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#66
No description provided.