Embedded pdf-file to blob with Python Selenium

27 Views Asked by At

Can someone help me out how to convert an embedded pdf-file to a blob (bytes like object) when using Python Selenium.

So far I could not find out how to do it. Some suggestions online use the request library but this is not feasible as I‘ve to go through a login (and that login does not work with requests, at least I did not found out how) so a call via request fails. I currently have the URL of the pdf-file and/or the element to click on, which opens the pdf. But I just can‘t figure out how to use this to get a blob.

I do not want to download the pdf-file locally but rather save it to a variable for further processing with other libraries

Thanks for your help!

0

There are 0 best solutions below