I have a browser instance that has opened a page . I would like to download and save down all the links ( they are PDFs ).
Does someone know how to do it ?
Thx
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
May not be the answer you’re looking for but I’ve used lxml and the requests libraries together for automated anchor fetching:
Relevant lxml examples http://lxml.de/lxmlhtml.html#examples (replace urllib with requests )
And the requests library homepage http://docs.python-requests.org/en/latest/index.html
It’s not as compact as mechanize but does offer more control.