Getting information from website

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JCOSTA
    New Member
    • Jan 2009
    • 4

    Getting information from website

    Hi!

    I want to get information from a sports web site (ex:https://www.bwin.com/pt/futebol), and I already tried htmllib and some other stuff.... the problem is that I can get the page's source code but not the same information that I can see in my browser. Particularly, I'm interested in the teams names!
    How can I do this! I can open the browser, copy the information to Notepad, save then and then process then with Python... but... I want to get them directly!

    Best regards!
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Since the text does not exist in the source code, there would be no way of directly reading the information.

    Comment

    • micmast
      New Member
      • Mar 2008
      • 144

      #3
      it appears the main page is running in a frame

      Comment

      • JCOSTA
        New Member
        • Jan 2009
        • 4

        #4
        I'm a newbie in web programming, but since I can see the information in a browser it should exist a way of getting that information... after all, the browser's programmer can!!

        Thanks

        Comment

        • JCOSTA
          New Member
          • Jan 2009
          • 4

          #5
          I was wrong! I can view the team's names in the source, but what I'm having(similar to the source but not equal.. ) does not have the team's names...
          My code is this:

          import urllib
          f = urllib.urlopen( "https://www.bwin.com/es/betsnew.aspx?Sp ortID=4")
          s = f.read()
          #print s
          f.close()
          fich=open('test .txt','w')
          fich.write(s)
          fich.close()


          Thanks

          Comment

          Working...