Project

General

Profile

Accessing page content via Python

Added by Magnus Arntzen about 13 years ago

Hi.

My application supports a URL switch like '?format=txt' where after some computation it redirects to a generated text-file.

This works fine with a browser.

However, I would also like to use Python to access these generated text-files, but when connecting using Urllib2 in Python the server logs this:

[/ KmPIAdAR6PvtlPWe] [info] "WEnvironment: UserAgent: Python-urllib/2.6"

but does not continue to serve, i.e build the app, do the computations and generate text-files.

Is there anything I can do to tell the server to continue?

-Magnus Arntzen


Replies (2)

RE: Accessing page content via Python - Added by Wim Dumon about 13 years ago

Try to list that user agent as a bot in your wt_config.xml file, in the @ @ section.

Wim.

RE: Accessing page content via Python - Added by Magnus Arntzen about 13 years ago

Thanks Wim.

That solved it!

-Magnus

    (1-2/2)