def analyseElement(self, node): if node.localName.lower() == u"a": #$NON-NLS-1$ href = node.getAttribute(u"href") #$NON-NLS-1$ rel = node.getAttribute(u"rel").lower() #$NON-NLS-1$ if rel.find(u"tag") == -1:#$NON-NLS-1$ return (host, path) = getHostAndPath(href) #@UnusedVariable if not path: return pathparts = path.split(u"/") #$NON-NLS-1$ tag = pathparts[-1].strip() if not tag: return try: self.tagwords.append(unquote_plus(tag)) except: # ignore any conversion errors (for now) pass
def analyseElement(self, node): if node.localName.lower() == u"a": #$NON-NLS-1$ href = node.getAttribute(u"href") #$NON-NLS-1$ rel = node.getAttribute(u"rel").lower() #$NON-NLS-1$ if rel.find(u"tag") == -1: #$NON-NLS-1$ return (host, path) = getHostAndPath(href) #@UnusedVariable if not path: return pathparts = path.split(u"/") #$NON-NLS-1$ tag = pathparts[-1].strip() if not tag: return try: self.tagwords.append(unquote_plus(tag)) except: # ignore any conversion errors (for now) pass
def onLinkClick(self, event): url = getSafeString( event.getHref() ) if url.lower().startswith(u"http"): #$NON-NLS-1$ url = unquote_plus(url) osutil = getOSUtil() osutil.openUrlInBrowser(url)
def getSrc(self): return unquote_plus(self.element.getAttribute(u"src")) #$NON-NLS-1$
def getHref(self): return unquote_plus(self.element.getAttribute(u"href")) #$NON-NLS-1$