I'm curious, how do I get a 404 error in running this line:
Urllib2 .urlopen ("http: // localhost / new-post # comment-29")
While everything works fine surfing in any browser ...
Does urlopen not parse the URL with "#" in it?
Anyone knows?
In the HTTP protocol, the slice (since #
) server on the network Is not sent to: it is maintained locally by the browser and after finding the server's response completely, find "the exact location" in the page shown as "visually present" For example, if the returned page is in HTML, then it can be parsed HTML and the appropriate
flag).
Then, the process is: delete the block, eg urlparse.urlparse
; use the rest to bring the resource; Content of the server response- Parsing it properly on the basis of type header;
Comments
Post a Comment