[mythtv-users] BBC iPlayer website request fetches mobile site

Paul Harrison mythtv at sky.com
Wed Aug 10 14:30:26 UTC 2011


On Wed, Aug 10, 2011 at 1:33 AM, A. F. Cano <afc at shibaya.lonestar.org> wrote:
> On Tue, Aug 09, 2011 at 07:23:42PM -0400, Nicolas Riendeau wrote:
>> Hi!
>>
>> On 8/9/2011 7:05 PM, Paul Harrison wrote:
>> > The BBC must be looking at the user-agent string being passed by Qt
>> > Webkit and assuming wrongly that the browser is running on a mobile.
>> > It's easy to fake a user-agent string just by overriding
>> > QWebPage::userAgentForUrl(const QUrl&url).
>> >
>> > I've just made this change locally and it works fine it's just a few
>> > devs tend to get their knickers in a twist when something like this is
>> > discussed so not sure if it can be committed. Obviously the Qt devs
>> > think it's OK to fake the user-agent string otherwise they wouldn't make
>> > it so easy to do so.
>>
>> Do you have to pretend to be something it is not (Firefox, Opera, ie,
>> etc...) or simply changing the default string for something else works?
>> If it does maybe identifying the browser as MythBrowser could be an
>> acceptable solution?
>
> This discussion comes at the perfect time for me!  Although not related
> to MythTV, I'm having problems with google+: it claims my browser is too
> old and I can't do anything.  It was suggested that I change the user
> string, and for that I installed the user agent switcher available for
> firefox.  It seems to work but the sample file that comes with it is
> too old, so my question is: what is the user string of the latest
> firefox?  Obviously I don't want to get into upgrading firefox.
>
> This is the sample file:
>
>
> <useragentswitcher>
> <useragent description="Firefox 2 (Windows XP)" useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" appname="Netscape" appversion="5.0 (Windows; en-US)" platform="Win32" vendor="" vendorsub=""/>
> </useragentswitcher>
>
> I suspect that some consistency checks are done for known versions, so
> just changing these fields to "best guess" values is likely not to work.
>
> I'm using Iceweasel 3.0.6 (Firefox renamed because of Debian political
> issues) and it's too old for google+.
>
> Does anyone know what values should go into the different fields above?
>
> Thanks.
>
> Augustine
>


Take your pick from the list here

http://www.useragentstring.com/pages/Firefox/

Paul H.


More information about the mythtv-users mailing list