firebfm / deepl-srt Goto Github PK
View Code? Open in Web Editor NEWUse Selenium to automate translation of a Chinese srt to English on Deepl website
Use Selenium to automate translation of a Chinese srt to English on Deepl website
can you provide option for change language not only china but can be Japanese to english ?
DevTools listening on ws://127.0.0.1:60103/devtools/browser/d3633a6c-086c-42a4-845f-bbb94140ca28
[8260:6492:0603/115850.387:ERROR:device_event_log_impl.cc(214)] [11:58:50.382] USB: usb_device_handle_win.cc:1058 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[8260:6492:0603/115850.396:ERROR:device_event_log_impl.cc(214)] [11:58:50.392] USB: usb_device_handle_win.cc:1058 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[8260:6492:0603/115850.402:ERROR:device_event_log_impl.cc(214)] [11:58:50.397] USB: usb_device_handle_win.cc:1058 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[8260:6492:0603/115850.402:ERROR:device_event_log_impl.cc(214)] [11:58:50.398] USB: usb_device_handle_win.cc:1058 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
enter path of srt folder
[11516:10400:0603/120050.067:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
It can be used normally before,
But not anymore
please!?
Traceback (most recent call last):
File "deeplv4.py", line 185, in
content = paste_it(chunk)
File "deeplv4.py", line 88, in paste_it
button = driver.find_element_by_css_selector(button_css)
File "C:\Users\RX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\webdriver.py", line 598, in find_element_by_css_selector
return self.find_element(by=By.CSS_SELECTOR, value=css_selector)
File "C:\Users\RX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\webdriver.py", line 978, in find_element
'value': value})['value']
File "C:\Users\RX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\RX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":" div.lmt__target_toolbar__copy button"}
(Session info: chrome=94.0.4606.71)
File "c:\Users\Administrator\Desktop\srt\deeplv4-EN2CN1.py", line 86
button_css = 'div.lmt__target_toolbar__copy_container button'
^
IndentationError: unindent does not match any outer indentation level
Hi, I am attempting to get this working on Win10 and am having issues
Output:
C:\Users\User\Downloads\deepl-srt-main>python deeplv4.py
DevTools listening on ws://127.0.0.1:57239/devtools/browser/4c0da8b8-da66-4dd6-8918-21f2d223c975 [10784:7252:0414/113246.120:ERROR:device_event_log_impl.cc(214)] [11:32:46.120] Bluetooth: bluetooth_adapter_winrt.cc:1072 Getting Default Adapter failed. enter path of srt folder c:\temp
Traceback (most recent call last): File "c:\Users\org0ne\Downloads\deepl-srt-main\deeplv4.py", line 125, in <module> txtpath = remove_timeline(srt) File "c:\Users\org0ne\Downloads\deepl-srt-main\deeplv4.py", line 19, in remove_timeline contents = f.read() File "C:\Users\org0ne\AppData\Local\Programs\Python\Python39\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 34: invalid continuation byte
This is the specific file I was using
RKI-111 CH.txt
chunk 1 is done
chunk 2 is done
chunk 3 is done
chunk 4 is done
chunk 5 is done
[6300:5480:0502/090640.863:ERROR:gpu_init.cc(481)] Passthrough is not supported,
GL is disabled, ANGLE is
chunk 6 is done
chunk 7 is done
chunk 8 is done
chunk 9 is done
ERROR FAILED
Number of srt that got skipped: 0
[]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.