Skip to content

Commit

Permalink
remove print
Browse files Browse the repository at this point in the history
  • Loading branch information
harry committed Jun 28, 2023
1 parent 2edc0e2 commit 4b6dfb9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions deep_translator/baidu.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def translate(self, text: str, **kwargs) -> str:
)
except ConnectionError:
raise ServerException(503)
print(response)
if response.status_code != 200:
raise ServerException(response.status_code)
# Get the response and check is not empty.
Expand All @@ -119,9 +118,3 @@ def translate_batch(self, batch: List[str], **kwargs) -> List[str]:
@return: list of translations
"""
return self._translate_batch(batch, **kwargs)


if __name__ == "__main__":
d = BaiduTranslator(target="zh", appid="some-appid", appkey="some-appkey")
t = d.translate("Hello\nHow are you?")
print("text: ", t)

0 comments on commit 4b6dfb9

Please sign in to comment.