This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import HTMLParser | |
class IDParser(HTMLParser.HTMLParser): | |
"""Modified HTMLParser that isolates a tag with the specified id""" | |
def __init__(self, id): | |
self.id = id | |
self.result = None | |
self.started = False | |
self.depth = {} | |
self.html = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page.clipRect = page.evaluate(function() { | |
return document.getElementById(ELEMENT_ID).getBoundingClientRect(); | |
}); |
NewerOlder