Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if re.match(r'^/wiki/', link.get("href")) is not None:
- wikiArticleName = re.sub(r'^/wiki/', '', link.get("href"))
- css = link.get("class", "")
- css += " aptureWikiInternal"
- link.set("class", css)
- link.set("articleName", wikiArticleName)
- wikiArticle = WikipediaArticle()
- wikiArticle.title = urllib.unquote(wikiArticleName)
- link.set("mediaitem", json.jsonSerialize(wikiArticle.jsProperties()))
Add Comment
Please, Sign In to add comment