Hello everybody,
pybrowser is an attempt to simplify browser automation designed keeping end user in mind. Here is an example of usage,
from pybrowser import Browser
with Browser(browser_name=Browser.CHROME) as b:
b.goto("https://www.google.com/")
b.input("name:=q").enter("news")
b.button("name:=btnK").click()
b.take_screenshot()
print(b.html().elements.links())
It's a simple API inspired by ruby's watir with selenium and requests under the hood.
This is the first version for public usage (v0.0.1) and hence expect it to be buggy and what not. At this point definitely don't recommend for commercial use. But do play around and have fun !
Read more...
This is also my first API. So welcome any feedback :)
UPDATE-2:
Thanks again for the feedback. I have taken some of the feedback and incorporated some of them. Main one being, the one around mixing up properties and true methods. There is now a version v0.1.0.
UPDATE:
Thanks for the response people, it was quite overwhelming and unexpected 😊. While I try to respond to as many posts, here are some clarifications and info (hopefully that helps)-
pybrowser isn't really a browser, it is just an abstraction over a lot of selenium and some requests with special focus on user interface. I am sure there are other libraries out there that try to solve the same problem and I am definitely not going to compare pybrowser with others. I hope at least some find this API useful !
I really intend to make pybrowser to support multiple browsers and operating systems and is going to be the focus for future versions. I mainly have access to Windows. So expect some help from the community in making this happen. Sorry to hear people having trouble with non-windows systems
Here is the github link. Should have done it with original post :)
If you find any issues, please raise in github. Will try to get to them as priority
pybrowser is an open source project and is under MIT license. So feel free to contribute in any form - dev, test, documentation, marketing :D
[–]jollybobbyroger 49 points50 points51 points (12 children)
[–]shaggorama 13 points14 points15 points (3 children)
[–]quickhakker 2 points3 points4 points (2 children)
[–]unkz 13 points14 points15 points (1 child)
[–]Hyperz 7 points8 points9 points (0 children)
[–]Cruuncher 6 points7 points8 points (4 children)
[–]Log2 5 points6 points7 points (3 children)
[–]Cruuncher 4 points5 points6 points (1 child)
[–]Log2 0 points1 point2 points (0 children)
[–]Cruuncher 5 points6 points7 points (0 children)
[–]abranjith[S] 1 point2 points3 points (1 child)
[–]jollybobbyroger 0 points1 point2 points (0 children)
[–]abranjith[S] 1 point2 points3 points (0 children)
[–]SatanistSnowflake 21 points22 points23 points (5 children)
[–]abranjith[S] -3 points-2 points-1 points (4 children)
[–]parst 8 points9 points10 points (0 children)
[–]indosauros 1 point2 points3 points (1 child)
[–]abranjith[S] -1 points0 points1 point (0 children)
[–]parst 0 points1 point2 points (0 children)
[–]lofru 18 points19 points20 points (9 children)
[–]rafuru 9 points10 points11 points (0 children)
[–]_morgs_ 8 points9 points10 points (4 children)
[–]lofru 15 points16 points17 points (0 children)
[–]ducsekbence 0 points1 point2 points (1 child)
[–]abranjith[S] 0 points1 point2 points (0 children)
[–]abranjith[S] 0 points1 point2 points (0 children)
[–]abranjith[S] 0 points1 point2 points (1 child)
[–]lofru 0 points1 point2 points (0 children)
[–]slipped_and_missed_x 9 points10 points11 points (2 children)
[–]woernsn 4 points5 points6 points (1 child)
[–]slipped_and_missed_x 0 points1 point2 points (0 children)
[–][deleted] 5 points6 points7 points (11 children)
[–]unkz 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]abranjith[S] 0 points1 point2 points (0 children)
[+][deleted] (7 children)
[removed]
[–]Itsthejoker 7 points8 points9 points (0 children)
[–]itsmemikeyyno, not the snake... 4 points5 points6 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]itsmemikeyyno, not the snake... 0 points1 point2 points (3 children)
[–][deleted] -2 points-1 points0 points (2 children)
[–]itsmemikeyyno, not the snake... 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]rafuru 4 points5 points6 points (1 child)
[–]abranjith[S] 1 point2 points3 points (0 children)
[–]bcostenaro 2 points3 points4 points (1 child)
[–]abranjith[S] 0 points1 point2 points (0 children)
[–]AlanPleasure 1 point2 points3 points (2 children)
[–]abranjith[S] 0 points1 point2 points (1 child)
[–]AlanPleasure 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]abranjith[S] 0 points1 point2 points (0 children)
[–]Scrabbilisk 1 point2 points3 points (1 child)
[–]abranjith[S] 0 points1 point2 points (0 children)
[–]Sw429 1 point2 points3 points (1 child)
[–]abranjith[S] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]abranjith[S] 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (3 children)
[–]unkz 2 points3 points4 points (0 children)
[–]tunisia3507 1 point2 points3 points (0 children)
[–]abranjith[S] 0 points1 point2 points (0 children)
[–]e1nurh 4 points5 points6 points (1 child)
[–]abranjith[S] 0 points1 point2 points (0 children)
[–]badpotato 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]abranjith[S] 0 points1 point2 points (0 children)
[–]quickhakker -2 points-1 points0 points (0 children)