Can't get the real contents form page in internet as the tag "no-chche"
Kent Johnson
kent at kentsjohnson.com
Wed Mar 22 21:35:35 EST 2006
dongdong wrote:
> using web browser can get page's content formally, but when use
> urllib2.open("http://tech.163.com/2004w11/12732/2004w11_1100059465339.html").read()
>
> the result is
>
> <html><head><META HTTP-EQUIV=REFRESH
> CONTENT="0;URL=http://tech.163.com/04/1110/12/14QUR2BR0009159H.html">
> <META http-equiv="Pragma"
> content="no-cache"></HEAD><body>?y?ú'ò?aò3??...</body></html>
The page is in Chinese (I think), when you print the data it is printing
in your console encoding which is apparently not Chinese. What did you
expect to see?
Kent
More information about the Python-list
mailing list