diff --git a/transgrab.py b/transgrab.py index 81ea442..1f737a3 100644 --- a/transgrab.py +++ b/transgrab.py @@ -17,7 +17,7 @@ def getTranscript(eptitle="Gem Glow",raw=False,dir_style=1): def processTranscript(r,dir_style=1): text = jsonpath(r,"$.query.pages.[0]")[0]["*"].split("\n")[2:-1] - text = ["".join(filter(lambda x: ord(x) in range(128),s)) for s in text] # filter music notes and other unicode chars + text = ["".join(filter(lambda x: ord(x) in range(128),s)) for s in text if "|" in s] # filter music notes and other unicode chars, as well as empty lines text = [x for x in filter(lambda x: len(x.split("|")[1])>0,text)] text = [x.split("|",2)[2][:-2] for x in text] if dir_style==1: