Can't get the real contents form page in internet as the tag "no-chche"
timr at probo.com
Thu Mar 23 09:39:10 CET 2006
"dongdong" <dongdonglove8 at hotmail.com> wrote:
>using web browser can get page's content formally, but when use
>the result is
>,I think the reson is the no-cache, are there person would help me?
No, that's not the reason. The reason is that this includes a redirect.
As an HTML consumer, you are supposed to parse that content and notice the
<meta http-equiv> tag, which says "here is something that should have been
one of the HTTP headers".
In this case, it wants you to act as though you saw:
In this case, the "Refresh" header means that you are supposed to go fetch
the contents of that new page immediately. Try using urllib2.open on THAT
address, and you should get your content.
This is one way to handle a web site reorganization and still allow older
URLs to work.
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list