Why urllib.urlopen doesn't (seem to) work with Stack Overflow?
Question: I need to retrieve my info from Stack Overflow. The web page that I want to
retrieve is something like this.

    
    
    http://stackoverflow.com/users/260127/prosseek 
    

When I run the script, it doesn't seem return any results.

    
    
    import urllib                                       
    sock = urllib.urlopen("http://stackoverflow.com/users/260127/prosseek") 
    htmlSource = sock.read()                            
    sock.close()                                        
    print htmlSource
    

whereas I get almost instant result with this.

    
    
    import urllib                                       
    sock = urllib.urlopen("http://diveintopython.net/") 
    htmlSource = sock.read()                            
    sock.close()                                        
    print htmlSource
    

What might be wrong?

PS. I don't know wether this should be asked at MetaStackOverflow or not.


Answer: It "works" for me - the page returned is a 404 error. Try putting the URL
<http://stackoverflow.com/users/XXXXX/prosseek> into your browser and see for
yourself.

I think you want to use <http://stackoverflow.com/users/260127/prosseek>
instead.

