Skip to content

Commit

Permalink
changes for non valid urls
Browse files Browse the repository at this point in the history
  • Loading branch information
ashimdahal committed Dec 6, 2022
1 parent 22f253f commit 30b502e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/PYtranslator.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def infer_msg(self, tts, rsp=None):

class google_translator:

def __init__(self, url_suffix="cn", timeout=5, proxies=None):
def __init__(self, url_suffix="com.np", timeout=8, proxies=None):
self.proxies = proxies
if url_suffix not in URLS_SUFFIX:
self.url_suffix = URL_SUFFIX_DEFAULT
Expand Down
6 changes: 4 additions & 2 deletions api/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@
'translate.google.bt','translate.google.by','translate.google.ca',
'translate.google.cat','translate.google.cc','translate.google.cd',
'translate.google.cf','translate.google.cg','translate.google.ch',
'translate.google.ci','translate.google.cl','translate.google.cm',
'translate.google.cn','translate.google.co.ao','translate.google.co.bw',
# 'translate.google.ci',
'translate.google.cl','translate.google.cm',
# 'translate.google.cn',
'translate.google.co.ao','translate.google.co.bw',
'translate.google.co.ck','translate.google.co.cr','translate.google.co.id',
'translate.google.co.il','translate.google.co.in','translate.google.co.jp',
'translate.google.co.ke','translate.google.co.kr','translate.google.co.ls',
Expand Down

0 comments on commit 30b502e

Please sign in to comment.