Click here for details.
from gummy import TranslationGummy
from gummy.utils import get_driver
failed to find libmagic, so use mimetypes instead. [failure] local driver can't be built. [success] remote driver can be built. DRIVER_TYPE: remote
with get_driver(selenium_port="4444") as driver:
model = TranslationGummy(driver=driver, gateway="useless", translator="deepl")
pdf_path = model.toPDF(url="https://www.nature.com/articles/s41586-020-2442-2")
print(pdf_path)
DRIVER_TYPE: remote Estimated Journal Type : Nature Crawling Type: soup Use UselessGateWay._pass2others method. Decompose unnecessary tags to make it easy to parse. ============================== Decomposed <i> tag (63) Decomposed <link> tag (19) Decomposed <meta> tag (281) Decomposed <noscript> tag (7) Decomposed <script> tag (57) Decomposed <style> tag (10) Decomposed <sup> tag (72) Decomposed <None> tag (29) Show contents of the paper. ============================== [1/6] Abstract [2/6] Main [3/6] Methods [4/6] Data availability [5/6] Extended data figures and tables [6/6] Supplementary information Translation: DeepLTranslator ============================== [01/16] Abstract (query1) 03/20 [##------------------] 15.00% - 3.422[s] [02/16] Main (query1) 01/20 [#-------------------] 5.00% - 1.102[s] [03/16] <img> [04/16] (query1) 01/20 [#-------------------] 5.00% - 1.088[s] [04/16] (query2) 01/20 [#-------------------] 5.00% - 1.095[s] [05/16] <img> [06/16] (query1) 01/20 [#-------------------] 5.00% - 1.179[s] [07/16] <img> [08/16] (query1) 01/20 [#-------------------] 5.00% - 1.093[s] [09/16] <img> [10/16] (query1) 01/20 [#-------------------] 5.00% - 1.093[s] [11/16] <img> [12/16] (query1) 01/20 [#-------------------] 5.00% - 1.102[s] [13/16] Methods (query1) 01/20 [#-------------------] 5.00% - 1.104[s] [13/16] Methods (query2) 01/20 [#-------------------] 5.00% - 1.092[s] [13/16] Methods (query3) 01/20 [#-------------------] 5.00% - 1.209[s] [14/16] Data availability (query1) 01/20 [#-------------------] 5.00% - 1.098[s] [15/16] Extended data figures and tables (query1) 01/20 [#-------------------] 5.00% - 1.092[s] [16/16] Supplementary information (query1) 01/20 [#-------------------] 5.00% - 1.094[s] Save HTML file at /home/jovyan/.gummy/A mobile robotic chemist.html Convert from HTML to PDF ============================== Save PDF file at /home/jovyan/.gummy/A mobile robotic chemist.pdf Delete original HTML file at /home/jovyan/.gummy/A mobile robotic chemist.html /home/jovyan/.gummy/A mobile robotic chemist.pdf