I've been using the fuction twill.commands.show()
to get the raw HTML from a page. I run this about every 5 seconds. Every time the function is ran, It spams the console with the mentioned webpages raw HTML. I need to use the console for debugging, and since the console is filled with HTML constantly, Doing so is impossible. Since show()
is programmed to print the HTML and return it as a string, I would have to edit twill, which is way beyond my skillset, and makes the program incompatible on other devices. Although saving and reading the file over and over might work, it seems impractical to do every 5 seconds.
Code:
go('http://google.com/')
html=show()
Again, twill has a save_html
, which could be used to save to a file, but I'm doing this every 5 seconds and it could slow the program/computer, especially if it's being run on an older OS.
Thanks!