python - Downloading google doc with Selenium -


i trying download google doc pdf using selenium in python. unfortunately, html knowledge quite minimal , result don't know html need have click file , download pdf. realize can use web developer tool html isn't working me well.

here have tried far:

from selenium import webdriver   url = ' https://docs.google.com/document/d/1y1n-rr5j_fq9wfmg8e_ajo0opwlnanru4lqcxtw9t5g/edit?pli=1'   browser = webdriver.firefox() browser.get(url) 

any appreciated; thanks!

as mention in comment, google drive doesn't being scraped.

the drive command looks right tool sort of job. - it'll you're trying do, not way want it. according docs (i.e. haven't tested it), command looks download file:

drive pull --export docx --id 1y1n-rr5j_fq9wfmg8e_ajo0opwlnanru4lqcxtw9t5g

(also, in general, find easiest way use selenium use selenium ide tell selenium want do, export resulting test case going file > export test case as... > python 2 / unittest / web driver.)

hope helps.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -