read a web page using python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • myTesterFrench@gmail.com

    #1

    read a web page using python

    Hi All,

    Kindly, could you someone tell me how to read a page(any web site)
    using Python, what method to be used ?

    Paris

  • Luuk

    #2
    Re: read a web page using python


    <myTesterFrench @gmail.comschre ef in bericht
    news:1174153847 .939415.169620@ o5g2000hsb.goog legroups.com...
    Hi All,
    >
    Kindly, could you someone tell me how to read a page(any web site)
    using Python, what method to be used ?
    >
    Paris
    >



    Comment

    • Lawrence Oluyede

      #3
      Re: read a web page using python

      <myTesterFrench @gmail.comwrote :
      Kindly, could you someone tell me how to read a page(any web site)
      using Python, what method to be used ?
      import urllib2
      res = urllib2.urlopen (url)
      page = res.read()

      See: http://www.voidspace.org.uk/python/a.../urllib2.shtml

      --
      Lawrence, oluyede.org - neropercaso.it
      "It is difficult to get a man to understand
      something when his salary depends on not
      understanding it" - Upton Sinclair

      Comment

      Working...