def loadPage(self): adress = self.scrapePattern.getArchiveLink(self.current) print adress response = loadUrl(adress) self.searchPatterns(response)
def buildMPList(self,pattern): res = re.findall('<link rel="canonical" href="([!:,-.()%/\w\s]*)" />',loadUrl("https://" + pattern.lang + ".wikipedia.org").read(),flags=re.UNICODE) return [res[0].split("/")[-1]]