edisugi1996 commited on
Commit
caf73a2
·
1 Parent(s): ab8c0e6

Adding response.close()

Browse files
Files changed (1) hide show
  1. deep_translator/google.py +1 -0
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)