{ "info": { "author": "ranjith", "author_email": "abranjith@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# pybrowser\n\nFor documentation, refer [here](https://pybrowser.readthedocs.io/en/latest/)\n\nHere is a quick example,\n\n```python\nfrom pybrowser import Browser \n with Browser(browser_name=Browser.CHROME) as b:\n b.goto(\"https://www.google.com/\")\n b.input(\"name:=q\").enter(\"news\")\n b.button(\"name:=btnK\").click()\n screenshot_path = b.take_screenshot()\n print(b.html().elements.links())\n```\n\n## Release Notes:\n\n**0.2.0**\n---------\n\n* **Changes**\n\n * Changes in underlying `Browser.requests_session` object,\n\n * `requests_session.result` has been removed. There is just `requests_session.response` which is a blocking call (in case `asynch` flag is set). Also note, `requests_session.is_request_done` is still available to see if request is complete of not. There are no changes to other properties and are blocking in case of asynchronous call.\n\n * `requests_session.content()` method with options for bytes and text has been changed to properties, just like in underlying requests. That is now you call, `requests_session.content` for bytes and `requests_session.text` for text.\n\n * In context of above changes, `Browser` object also has below changes,\n\n * `Browser.get` and `Browser.post` now returns `requests_session` object (used to be `requests_session.response`).\n * `Browser.content()` has been changed to properties. That is now you call, `Browser.content` for bytes and `Browser.text` for text.\n\n* **New features**\n\n * Support for remote url. Please note this requires [Selenium Grid](https://www.seleniumhq.org/docs/07_selenium_grid.jsp) to be setup explicitly. Once done use the URL here.\n\n * Flags for Opera browser (`Browser.OPERA`). Webdriver executable needs to be present in `driver_path`.\n Please note `EDGE` and `SAFARI` are also supported the same way. That is, webdriver isn't automatically downloaded, instead path needs to be provided.\n\n**0.1.0**\n---------\n\n* **Changes**\n\n **Please note some key changes with regards to properties changing to methods**.\n\n * Methods which were properties in initial release are now method calls. Below is the impacted list.\n\n In Browser,\n\n * `Browser.refresh()`\n * `Browser.back()`\n * `Browser.forward()`\n * `Browser.maximize_window()`\n * `Browser.minimize_window()`\n * `Browser.fullscreen_window()`\n * `Browser.delete_all_cookies()`\n * `Browser.close()`\n\n In Action (used by all elements),\n\n * `Action.refresh()`\n * `Action.highlight()`\n * `Action.double_click()`\n * `Action.move_to_element()`\n\n Specific elements also,\n\n * `Checkbox.check()`\n * `Checkbox.uncheck()`\n * `Radio.select()`\n * `Radio.unselect()`\n * `Input.clear()`\n\n * Browser class `__init__` method now has more options,\n\n * `firefox_binary_path`\n * `firefox_profile_path`\n * `http_proxy`\n * `driver_path`\n\n * Select element has below method changes,\n\n `Select.options(get=\"text\")` method has been split to multiple properties to keep it simple,\n\n * `Select.options_text`\n * `Select.options_value`\n * `Select.options_element`\n\n Similar change has been done for `Select.all_selected_options(get=\"text\")`,\n\n * `Select.all_selected_options_text`\n * `Select.all_selected_options_value`\n * `Select.all_selected_options_element`\n\n * File element changes,\n\n Below enhancements have been made to download feature,\n\n * Added more parameters - \n\n * `unzip` - Set this flag to unzip file. Default is `False`\n * `del_zipfile` - Set this flag to delete zip file after it has been unzipped. Default is `False`\n * `add_to_ospath` - Set this flag to add directory to `PATH`. Default is `False`\n\n * New properties - \n\n As you might already know, download happens in background (asynchronous) by default and can of course be changed with `asynch`. To check if download was successful, below properties are available,\n\n * `is_download_complete` - `True` or `False`\n * `downloaded_files` - list of downloaded files\n\n * HTML links method has below method changes,\n\n This is the one you would invoke via Browser as `Browser.html().elements.link()`.\n\n * Added more parameters - \n\n * `images` - You can filter out images. Default is `False` that means to include `images`, you will need to set this to `True`\n * `name_length_limit` - This limits the length of name of the url. Default is 60\n\n * Change in return type. Before this change, return type was a list of types (name, url). This has been changed to list of [named_tuples](https://docs.python.org/3.7/library/collections.html#collections.namedtuple) of form `('Link', ['name', 'url'])`\n\n * Changes in some env options.\n\n Removed below options as they don't have sense. Either you provide complete driver download url or provide version\n so that the API tries to download,\n\n * `CHROME_FILENAME`\n * `IE_FILENAME`\n * `CHROMEDRIVER_DEFAULT_VERSION`\n\n Added below for Firefox support,\n\n * `FIREFOX_HOME_URL`\n * `FIREFOX_DOWNLOAD_URL`\n * `FIREFOXDRIVER_VERSION`\n\n * Refactoring (non functional) in code and tests. Lot more testing needed still :-\\\n\n* **New features**\n\n * Support for Firefox !\n\n**0.0.1**\n---------\n\n* Very first release !\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/abranjith/pybrowser", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "get-pybrowser", "package_url": "https://pypi.org/project/get-pybrowser/", "platform": "", "project_url": "https://pypi.org/project/get-pybrowser/", "project_urls": { "Homepage": "https://github.com/abranjith/pybrowser" }, "release_url": "https://pypi.org/project/get-pybrowser/0.2.0/", "requires_dist": [ "requests", "selenium (==3.141.0)", "pyquery (==1.4.0)", "pyppeteer (==0.0.25)" ], "requires_python": ">=3.7.0", "summary": "Selenium based, user friendly Browser Automation API", "version": "0.2.0" }, "last_serial": 5198365, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "aa72002ddc2191e27c4fead419527d53", "sha256": "03e5097b60512fb8be6d132ad653f13fbae1a116bd297ae6d8ac462652168a85" }, "downloads": -1, "filename": "get_pybrowser-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "aa72002ddc2191e27c4fead419527d53", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7.0", "size": 47511, "upload_time": "2019-04-28T02:29:28", "url": "https://files.pythonhosted.org/packages/9a/53/1adda79b79a920ca777d458dbceeaf00ce4738e3db941fef833efa91b126/get_pybrowser-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c94bbf95812924154629f51d188044b2", "sha256": "c306744569d2af04b07a917ef9fe8591e7daaedd7dd9661b0167b255c327f22d" }, "downloads": -1, "filename": "get-pybrowser-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c94bbf95812924154629f51d188044b2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7.0", "size": 38956, "upload_time": "2019-04-28T02:29:41", "url": "https://files.pythonhosted.org/packages/67/4e/01a7dcac75fd754ff188202f9f328196e1be08fbee361d3e51d0383565b6/get-pybrowser-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aa72002ddc2191e27c4fead419527d53", "sha256": "03e5097b60512fb8be6d132ad653f13fbae1a116bd297ae6d8ac462652168a85" }, "downloads": -1, "filename": "get_pybrowser-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "aa72002ddc2191e27c4fead419527d53", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7.0", "size": 47511, "upload_time": "2019-04-28T02:29:28", "url": "https://files.pythonhosted.org/packages/9a/53/1adda79b79a920ca777d458dbceeaf00ce4738e3db941fef833efa91b126/get_pybrowser-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c94bbf95812924154629f51d188044b2", "sha256": "c306744569d2af04b07a917ef9fe8591e7daaedd7dd9661b0167b255c327f22d" }, "downloads": -1, "filename": "get-pybrowser-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c94bbf95812924154629f51d188044b2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7.0", "size": 38956, "upload_time": "2019-04-28T02:29:41", "url": "https://files.pythonhosted.org/packages/67/4e/01a7dcac75fd754ff188202f9f328196e1be08fbee361d3e51d0383565b6/get-pybrowser-0.2.0.tar.gz" } ] }