SCRAPING USING URLLIB
[root@rhel7 html]# python Python 2.7.5 >>> import urllib >>> f=urllib.urlopen("https://www.microsoft.com") >>> print f <addinfourl at 140286118192624 whose fp = <socket._fileobject object at 0x7f96f39ed7d0>> >>> f <addinfourl at 140286118192624 whose fp = <socket._fileobject object at 0x7f96f39ed7d0>> Important : Here f is an object and by using f we can grab lots of info about url which are listed below #### To get more info about its web page the server name where this page is hosted >>> print f.info() Server: Apache ETag: "6082151bd56ea922e1357f5896a90d0a:1425454794" Accept-Ranges: bytes Content-Length: 1020 Content-Type: text/html Connection: close X-N: S @@@ To get URL from f object >>> print f.geturl() https://www.microsoft.com @@@ To read the page code written in html p>...