edisugi1996
commited on
Commit
·
caf73a2
1
Parent(s):
ab8c0e6
Adding response.close()
Browse files
deep_translator/google.py
CHANGED
@@ -74,6 +74,7 @@ class GoogleTranslator(BaseTranslator):
|
|
74 |
soup = BeautifulSoup(response.text, "html.parser")
|
75 |
|
76 |
element = soup.find(self._element_tag, self._element_query)
|
|
|
77 |
|
78 |
if not element:
|
79 |
element = soup.find(self._element_tag, self._alt_element_query)
|
|
|
74 |
soup = BeautifulSoup(response.text, "html.parser")
|
75 |
|
76 |
element = soup.find(self._element_tag, self._element_query)
|
77 |
+
response.close()
|
78 |
|
79 |
if not element:
|
80 |
element = soup.find(self._element_tag, self._alt_element_query)
|