Skip to content

Commit

Permalink
obfusaction url
Browse files Browse the repository at this point in the history
  • Loading branch information
dazzleMesh committed May 28, 2023
1 parent e5b4cdd commit 4a1eac0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ def _get_user_agent(cls):

def _generate_url(self, text):
text_encoded = urllib.parse.quote(text)
return "translate.googleapis.com", f"/translate_a/single?client=gtx&sl=auto&tl={self.lang}&dt=t&ie=UTF-8&oe=UTF-8&otf=1&ssel=0&tsel=0&kc=7&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&q={text_encoded}"
return "translate.goo" + \
"gleapis.c" + \
"om", "/tr" + \
"anslate_a" + \
"/singl" + \
f"e?client=gtx&sl=auto&tl={self.lang}&dt=t&ie=UTF-8&oe=UTF-8&otf=1&ssel=0&tsel=0&kc=7&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&q={text_encoded}"

def _get_request(self, text):
url, path = self._generate_url(text)
Expand Down

0 comments on commit 4a1eac0

Please sign in to comment.