get-html-from-safari


Nameget-html-from-safari JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/sdondley/get_html_from_safari
SummaryGet HTMl code from the Safari browser
upload_time2023-04-06 00:54:28
maintainer
docs_urlNone
authorSteve Dondley
requires_python>=3.6
licenseApache Software License 2.0
keywords get_html_from_safari
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ====================
Get HTML from Safari
====================


.. image:: https://img.shields.io/pypi/v/get_html_from_safari.svg
        :target: https://pypi.python.org/pypi/get_html_from_safari

.. image:: https://img.shields.io/travis/sdondley/get_html_from_safari.svg
        :target: https://travis-ci.com/sdondley/get_html_from_safari

.. image:: https://readthedocs.org/projects/get-html-from-safari/badge/?version=latest
        :target: https://get-html-from-safari.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status


Description
-----------

Gets HTML code from web pages open in the Safari browser.

Usage
-----

The get_html_from_safari package fetches the HTML source code of the currently
active Safari browser tab on macOS. This package utilizes AppleScript to
interact with the Safari browser and retrieve the HTML content.

**Example Usage**
To use get_html_from_safari, follow these steps:

Install the package:
::

        pip install get_html_from_safari

Import the package and fetch the HTML source code of the active Safari tab:
::

        from get_html_from_safari import get_html
        html_content = get_html()

You can now process the retrieved HTML content as needed.

To fetch the HTML source code of a specific URL, pass the URL as an argument:
::

        from get_html_from_safari import get_html
        url = "https://www.example.com"
        html_content = get_html(url)

This will open up a new browser window and fetch the HTML source code of the url
specified.

Please note that this package is specifically designed for macOS and the Safari
browser. It will not work with other operating systems or web browsers.

**From the command line:**
::

        $ html-source-get <url>

Requirements
------------

* Python 3.6 or higher
* macOS

Features
--------

Contains an entry point `html-source-get <url>`.

If no url is supplied, it will get the HTML code from the current Safari tab. If
a url is supplied, it will open a new tab and get the HTML code from that tab.

The HTML code is dumped directly to the terminal.

License
-------

* Free software: Apache Software License 2.0

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.1.0 (2023-04-05)
------------------

* First release on PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sdondley/get_html_from_safari",
    "name": "get-html-from-safari",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "get_html_from_safari",
    "author": "Steve Dondley",
    "author_email": "s@dondley.com",
    "download_url": "https://files.pythonhosted.org/packages/6e/b2/e205e7e75c52fc83897071032437d103423a8a021d949b60fb5ef3e8a42a/get_html_from_safari-0.2.2.tar.gz",
    "platform": "MacOS",
    "description": "====================\nGet HTML from Safari\n====================\n\n\n.. image:: https://img.shields.io/pypi/v/get_html_from_safari.svg\n        :target: https://pypi.python.org/pypi/get_html_from_safari\n\n.. image:: https://img.shields.io/travis/sdondley/get_html_from_safari.svg\n        :target: https://travis-ci.com/sdondley/get_html_from_safari\n\n.. image:: https://readthedocs.org/projects/get-html-from-safari/badge/?version=latest\n        :target: https://get-html-from-safari.readthedocs.io/en/latest/?version=latest\n        :alt: Documentation Status\n\n\nDescription\n-----------\n\nGets HTML code from web pages open in the Safari browser.\n\nUsage\n-----\n\nThe get_html_from_safari package fetches the HTML source code of the currently\nactive Safari browser tab on macOS. This package utilizes AppleScript to\ninteract with the Safari browser and retrieve the HTML content.\n\n**Example Usage**\nTo use get_html_from_safari, follow these steps:\n\nInstall the package:\n::\n\n        pip install get_html_from_safari\n\nImport the package and fetch the HTML source code of the active Safari tab:\n::\n\n        from get_html_from_safari import get_html\n        html_content = get_html()\n\nYou can now process the retrieved HTML content as needed.\n\nTo fetch the HTML source code of a specific URL, pass the URL as an argument:\n::\n\n        from get_html_from_safari import get_html\n        url = \"https://www.example.com\"\n        html_content = get_html(url)\n\nThis will open up a new browser window and fetch the HTML source code of the url\nspecified.\n\nPlease note that this package is specifically designed for macOS and the Safari\nbrowser. It will not work with other operating systems or web browsers.\n\n**From the command line:**\n::\n\n        $ html-source-get <url>\n\nRequirements\n------------\n\n* Python 3.6 or higher\n* macOS\n\nFeatures\n--------\n\nContains an entry point `html-source-get <url>`.\n\nIf no url is supplied, it will get the HTML code from the current Safari tab. If\na url is supplied, it will open a new tab and get the HTML code from that tab.\n\nThe HTML code is dumped directly to the terminal.\n\nLicense\n-------\n\n* Free software: Apache Software License 2.0\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.1.0 (2023-04-05)\n------------------\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Get HTMl code from the Safari browser",
    "version": "0.2.2",
    "split_keywords": [
        "get_html_from_safari"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ddabbf2fe60251631c6a9b1d7a851b5e77c5c90f022a0b9beca528de2d951065",
                "md5": "72896ac6755187dfaf9cf5e8591dae81",
                "sha256": "7df03a806ee493c4b9d4ff3964aa74852b56916a2adb3e22147ca8b8a37f62e0"
            },
            "downloads": -1,
            "filename": "get_html_from_safari-0.2.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72896ac6755187dfaf9cf5e8591dae81",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 7488,
            "upload_time": "2023-04-06T00:54:27",
            "upload_time_iso_8601": "2023-04-06T00:54:27.239648Z",
            "url": "https://files.pythonhosted.org/packages/dd/ab/bf2fe60251631c6a9b1d7a851b5e77c5c90f022a0b9beca528de2d951065/get_html_from_safari-0.2.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6eb2e205e7e75c52fc83897071032437d103423a8a021d949b60fb5ef3e8a42a",
                "md5": "ec3015ca8d9c081145e35c410f153164",
                "sha256": "940399a81a62d59684065a2cb671167e2f889c1926fd2f43052578acd33da5af"
            },
            "downloads": -1,
            "filename": "get_html_from_safari-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "ec3015ca8d9c081145e35c410f153164",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11381,
            "upload_time": "2023-04-06T00:54:28",
            "upload_time_iso_8601": "2023-04-06T00:54:28.849119Z",
            "url": "https://files.pythonhosted.org/packages/6e/b2/e205e7e75c52fc83897071032437d103423a8a021d949b60fb5ef3e8a42a/get_html_from_safari-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-06 00:54:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "sdondley",
    "github_project": "get_html_from_safari",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "get-html-from-safari"
}
        
Elapsed time: 0.11978s