def getTk(self): with open('.\\config\\GoogleJS.js', encoding='utf8') as f: js_data = f.read() context = EvalJs() context.execute(js_data) tk = context.TL(self.text) return tk
def getTk(self, text): with open(this_file_dir + '/GoogleJS.js', encoding='utf8') as f: js_data = f.read() context = EvalJs() context.execute(js_data) tk = context.TL(text) return tk