Here is a simple example of what I mean: If I type
http://127.0.0.1:8000/admin/default/site at my browser when I am logged in, I get the installed applications page. However if I do it by calling the test routine below def test(): import urllib url="http://127.0.0.1:8000/admin/default/site" f = urllib.urlopen(url) s = f.read() return s I have to login again even though I am logged in on my computer. So the question is, can I somehow add the 'context' to s so that it recognises that I am already logged in? I am using web2py's admin as an example, but the solution should work for any website. Thanks Peter On Dec 13, 1:51 pm, Anthony <abasta...@gmail.com> wrote: > On Tuesday, December 13, 2011 4:15:22 AM UTC-5, peter wrote: > > > Thanks for your answers. I guess editing the html and replacing the > > relative URLs with absolute ones is not too bad. The problem I am left > > with is this: > > Can one 'call' a URL from web2py as if the URL were called from the > > users browser?, but capture the html result? > > Not sure what you mean. Are you talking about something other > than urllib.urlopen(url)?