[thelist] Gmail / RSS accessing from script

Edwin Martin edwin at bitstorm.org
Thu Nov 9 10:00:25 CST 2006


Chris Ditty schreef:
> I am trying to write a small module to display my gmail email on my custom
> startup page.  I am using this url with the correct userid and
> password - https://USERNAME:PASSWORD@gmail.google.com/gmail/feed/atom
> .
>
> When I put it in the web browser, it acts like it is supposed to.  But when
> I try and script it, it returns a 401 unauthorized error.  I get the same
> error when I try a wget also.
>
> Has anyone had any success in getting this to work from a script?  The
> output is supposed to be simple RSS once I get past this error.
>   
Just fetching the mentioned URL won't work. You have to authenticate via 
the HTTP-headers. It's not really hard to make.

You also mention wget. Wget supports authentication. Use:

wget --http-user=USERNAME --http-passwd=PASSWORD 
https://gmail.google.com/gmail/feed/atom

Type wget --help for all wget options.

Edwin Martin

-- 
http://www.bitstorm.org/edwin/en/



More information about the thelist mailing list