Script Collection
Internet Explorer
Get all URLs from a webpage | Get all URLs from a webpage |
|
|
|
|
This example shows how to automate Microsoft Internet Explorer with Python/Pywin32. It opens a Internet Explorer window, surfs to www.goermezer.de (and waits 3 sec to load the page), and prints all links of the loaded page. Some links to the Object Model of Microsoft Internet Explorer: import win32com.client, time ie = win32com.client.Dispatch("InternetExplorer.Application") ie.Visible = 1 ie.Navigate('http://www.goermezer.de') time.sleep(3) #wait 3 sec. print 'You are surfing on', ie.Document.domain print 'And now a list of the Links:' for i in ie.Document.links: print i |
|
| Last Updated ( Wednesday, 06 June 2007 ) |
| < Prev | Next > |
|---|
Hint: For syntax highlighting and correct Python intendation place your code between html tags <pre> and </pre>.