def removeNoise (s):
import re
pattern_list = ["\[\[(.*?)\]\]", "{{(.*?)}}", "\[(.*?)\]"]
clean = s
for pattern in pattern_list:
regex = re.compile(pattern)
clean = re.sub (regex, "", clean)
return clean
#==============================================================================#
#==============================================================================#
# Get the html for a comic from the explainxkcd website
# Extract the transcript from the text
# Check if the transcript is mark as incomplete
# if yes, mark it as so locally (for later updates)
# Returns a dictionary (result)
# If an error occured the status is not 0 and the error is passed in the error
# field of the returned dictionary
评论列表
文章目录