=
commited on
Commit
·
d2f04b0
1
Parent(s):
562e7ee
solved the certificate warning
Browse files- deep_translator/google_trans.py +1 -2
- deep_translator/linguee.py +1 -1
- deep_translator/mymemory.py +1 -2
- deep_translator/pons.py +1 -1
deep_translator/google_trans.py
CHANGED
@@ -66,8 +66,7 @@ class GoogleTranslator(BaseTranslator):
|
|
66 |
self._url_params[self.payload_key] = text
|
67 |
|
68 |
response = requests.get(self.__base_url,
|
69 |
-
params=self._url_params
|
70 |
-
verify=False)
|
71 |
|
72 |
soup = BeautifulSoup(response.text, 'html.parser')
|
73 |
element = soup.find(self._element_tag, self._element_query)
|
|
|
66 |
self._url_params[self.payload_key] = text
|
67 |
|
68 |
response = requests.get(self.__base_url,
|
69 |
+
params=self._url_params)
|
|
|
70 |
|
71 |
soup = BeautifulSoup(response.text, 'html.parser')
|
72 |
element = soup.find(self._element_tag, self._element_query)
|
deep_translator/linguee.py
CHANGED
@@ -52,7 +52,7 @@ class LingueeTranslator(BaseTranslator):
|
|
52 |
if self._validate_payload(word):
|
53 |
# %s-%s/translation/%s.html
|
54 |
url = "{}{}-{}/translation/{}.html".format(self.__base_url, self._source, self._target, quote(word))
|
55 |
-
response = requests.get(url
|
56 |
soup = BeautifulSoup(response.text, 'html.parser')
|
57 |
elements = soup.find_all(self._element_tag, self._element_query)
|
58 |
if not elements:
|
|
|
52 |
if self._validate_payload(word):
|
53 |
# %s-%s/translation/%s.html
|
54 |
url = "{}{}-{}/translation/{}.html".format(self.__base_url, self._source, self._target, quote(word))
|
55 |
+
response = requests.get(url)
|
56 |
soup = BeautifulSoup(response.text, 'html.parser')
|
57 |
elements = soup.find_all(self._element_tag, self._element_query)
|
58 |
if not elements:
|
deep_translator/mymemory.py
CHANGED
@@ -44,8 +44,7 @@ class MyMemoryTranslator(BaseTranslator):
|
|
44 |
|
45 |
response = requests.get(self.__base_url,
|
46 |
params=self._url_params,
|
47 |
-
headers=self.headers
|
48 |
-
verify=False)
|
49 |
data = response.json()
|
50 |
if not data:
|
51 |
raise Exception("Translation was not found in response!")
|
|
|
44 |
|
45 |
response = requests.get(self.__base_url,
|
46 |
params=self._url_params,
|
47 |
+
headers=self.headers)
|
|
|
48 |
data = response.json()
|
49 |
if not data:
|
50 |
raise Exception("Translation was not found in response!")
|
deep_translator/pons.py
CHANGED
@@ -56,7 +56,7 @@ class PonsTranslator(BaseTranslator):
|
|
56 |
|
57 |
if self._validate_payload(word):
|
58 |
url = "{}{}-{}/{}".format(self.__base_url, self._source, self._target, quote(word))
|
59 |
-
response = requests.get(url
|
60 |
soup = BeautifulSoup(response.text, 'html.parser')
|
61 |
elements = soup.findAll(self._element_tag, self._element_query)
|
62 |
if not elements:
|
|
|
56 |
|
57 |
if self._validate_payload(word):
|
58 |
url = "{}{}-{}/{}".format(self.__base_url, self._source, self._target, quote(word))
|
59 |
+
response = requests.get(url)
|
60 |
soup = BeautifulSoup(response.text, 'html.parser')
|
61 |
elements = soup.findAll(self._element_tag, self._element_query)
|
62 |
if not elements:
|