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

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


On Wed, Aug 10, 2011 at 12:23 AM, Nicolas Riendeau <knight at teksavvy.com> 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?
>
> Have a nice day!
>
> Nick


Hi Nick;

I tested by changing it to a Firefox user agent string. According to
the Qt docs (http://doc.qt.nokia.com/4.7-snapshot/qwebpage.html#userAgentForUrl)
it should be adding the app name and version already if we have set
them up properly.

I'll see if we can change it just enough to keep the iPlayer happy.

Paul H.


More information about the mythtv-users mailing list