Basically I have installed an auto page refresher on safari. And I have 5 Safari windows auto refreshing every 30 sec. My goal is to use python to get a list of all the open web pages. I am using this to do it:
import appscript
urls = appscript.app('Safari').windows.tabs.URL()
urls
This returns a list of open tabs with the urls. Next thing is to fetch the source code of all these open tabs and save it to txt or html and then finally use python to match a string on the webpage to get to the data I want.
How do I get the page source of the already open webpages and save them to txt or html? Can this be done using appscript or some other module?