Beispiel #1
0
    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
Beispiel #2
0
    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