librelist archives

« back to archive

GCal

GCal

From:
Phil Hudson
Date:
2014-11-22 @ 02:49
Needed to load Google Calendar for the first time in a very long time
today.

It looks like Google is doing some kind of browser sniffing that makes
them think Conkeror is a mobile device, and serve drastically reduced
pages in response, under the general URL prefix:

    https://www.google.com/calendar/m?...

I had a look at my own .conkerorrc custom code, at
modules/pagemodes/google-calendar.js, and at my own prefs.js and I don't
see anything that could be causing this, hence my guess at server-side
browser sniffing as the cause.

Not sure if it's relevant, but I gather there has been a recent Google
Apps API change affecting the command-line googlecl tool's calendar
commands too, just a few days ago.

Anyone else encountered this? Recommend a spoof UserAgent request header
string? And is UA string spoofing something that's suitable to add to
the pagemode? If not, it should probably go on the wiki, but I'd like to
get others' input (and sanity checks) first before I edit.

-- 
Phil Hudson                   http://hudson-it.ddns.net
@UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63

Re: [conkeror] GCal

From:
Sean McAfee
Date:
2014-11-23 @ 02:47
On Fri, Nov 21, 2014 at 6:49 PM, Phil Hudson <phil.hudson@iname.com> wrote:

>
> Needed to load Google Calendar for the first time in a very long time
> today.
>
> It looks like Google is doing some kind of browser sniffing that makes
> them think Conkeror is a mobile device, and serve drastically reduced
> pages in response, under the general URL prefix:
>
>     https://www.google.com/calendar/m?...
>
>
> [...]

> Anyone else encountered this? Recommend a spoof UserAgent request header
> string? And is UA string spoofing something that's suitable to add to
> the pagemode? If not, it should probably go on the wiki, but I'd like to
> get others' input (and sanity checks) first before I edit.
>
>
Yup, I ran into this recently too.  Poking around, I was extremely pleased
to find that at some point support was added for sending a User-Agent
string tuned to particular domains:

http://conkeror.org/UserAgent#Changing_Your_User_Agent_String_.28Per-Site.29

So, this works great for me now:


require("user-agent-policy");

user_agent_policy.define_policy(
    "default",
    user_agent_firefox(),
    // ...
    build_url_regexp($domain = /(.*\.)?google/, $path = /calendar/)
);

Re: [conkeror] GCal

From:
Phil Hudson
Date:
2014-11-25 @ 10:37
Sean McAfee <eefacm@gmail.com> writes:

> require("user-agent-policy");
>
> user_agent_policy.define_policy(
>     "default",
>     user_agent_firefox(),
>     // ...
>     build_url_regexp($domain = /(.*\.)?google/, $path = /calendar/)
> );

Brilliant, Sean. Thanks. I'm writing it up on the wiki now.

-- 
Phil Hudson                   http://hudson-it.ddns.net
@UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63