Search code examples
pythonbeautifulsoupurllib3python-requests-html

beautiful soup vs selenium vs urllib


I am working on a web automation project. I need to be able to pull pages, assess data, and be able to interact with the page (e.g. login, enter values, and post to the site.) As a derivative of the logins, I think I will need something that will allow me to remain logged in given a credential (e.g. store the credential or cookies.)

I've already used UrlLib & Requests libraries to pull files and the pages themselves.

I am trying to decide on the best Python library for the task.

Any suggestions would be highly appreciated.

thank you!


Solution

  • @n1c9

    If you can reliably recreate the HTTP requests being used to authenticate logins and speed is important, urllib/requests for making those HTTP requests and beautifulsoup for parsing the HTML responses would be best. Otherwise, Selenium is where you'll have the most luck. Let me know if you want more details.

    Looks like Selenium is the right answer.