This commit is contained in:
Kovid Goyal 2018-03-09 08:12:57 +05:30
parent 00693a733f
commit a527329080
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -159,10 +159,12 @@ def absurl(url):
url = 'https://www.granta.com' + url url = 'https://www.granta.com' + url
return url return url
def stripstyle(tag): def stripstyle(tag):
if tag is not None: if tag is not None:
del tag['style'] del tag['style']
def get_innermost_string(tag): def get_innermost_string(tag):
while hasattr(tag, 'contents') and len(tag.contents) > 0 and tag.contents[0] is not None: while hasattr(tag, 'contents') and len(tag.contents) > 0 and tag.contents[0] is not None:
tag = tag.contents[0] tag = tag.contents[0]