Skip to content

How to download protected PDF (ViewDocument) using Selenium or requests? #3914

Answered by mdmintz
Daremitsu1 asked this question in Q&A
Discussion options

You must be logged in to vote

This downloads that file into the ./downloaded_files/ folder:

from seleniumbase import SB

with SB(uc=True, test=True, external_pdf=True) as sb:
    url = "https://iapps.courts.state.ny.us/nyscef/ViewDocument?docIndex=cdHe_PLUS_DaUdFKcTLzBtSo6zw=="
    sb.activate_cdp_mode(url)
    sb.sleep(10)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Daremitsu1
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants