Skip to content

Commit

Permalink
Merge pull request #68 from sinedie/split-lines-issue
Browse files Browse the repository at this point in the history
replace \n for Keys.ENTER
  • Loading branch information
sinedie authored Oct 18, 2023
2 parents d7c63da + fbb963e commit eb2a6cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
long_description=Path("README.md").read_text(encoding="utf-8"),
long_description_content_type="text/markdown",
url="https://github.com/sinedie/SRTranslator",
version="0.3.0",
version="0.3.2",
author="EAR",
author_email="[email protected]",
license="FREE",
Expand Down
3 changes: 2 additions & 1 deletion srtranslator/translators/deepl_scrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Optional
from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.common.proxy import Proxy
from selenium.webdriver.common.keys import Keys

from .base import Translator, TimeOutException
from .selenium_utils import (
Expand Down Expand Up @@ -137,7 +138,7 @@ def translate(self, text: str, source_language: str, destination_language: str):

clean_text = text.replace("[...]", "@[.]@")

self.input_lang_from.write((clean_text))
self.input_lang_from.write((clean_text.replace("\n", Keys.ENTER)))

# Maximun number of iterations 60 seconds
for _ in range(60):
Expand Down

0 comments on commit eb2a6cf

Please sign in to comment.