selection


Nameselection JSON
Version 0.0.21 PyPI version JSON
download
home_page
SummaryAPI to extract content from HTML & XML documents
upload_time2022-12-27 23:36:25
maintainer
docs_urlNone
author
requires_python>=3.8
licenseThe MIT License (MIT) Copyright (c) 2015-2022, Gregory Petukhov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords lxml dom html
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Selection Documenation

[![Tests](https://github.com/lorien/selection/actions/workflows/test.yml/badge.svg)](https://github.com/lorien/selection/actions/workflows/test.yml)
[![Code Quality](https://github.com/lorien/selection/actions/workflows/code_quality.yml/badge.svg)](https://github.com/lorien/selection/actions/workflows/code_quality.yml)
[![Typing](https://github.com/lorien/selection/actions/workflows/mypy.yml/badge.svg)](https://github.com/lorien/selection/actions/workflows/mypy.yml)
[![Test coverage](https://coveralls.io/repos/lorien/selection/badge.svg?branch=master)](https://coveralls.io/r/lorien/selection?branch=master)

API to query DOM tree of HTML/XML document.


## Usage Example

```
from selection import XpathSelector
from lxml.html import fromstring

html = '<div><h1>test</h1><ul id="items"><li>1</li><li>2</li></ul></div>'
sel = XpathSelector(fromstring(html))
print(sel.select('//h1')).text()
print(sel.select('//li').text_list()
print(sel.select('//ul').attr('id')
```


## Installation

Run: `pip install -U selection`


## Community

Telegram English chat: [https://t.me/grablab](https://t.me/grablab)

Telegram Russian chat: [https://t.me/grablab\_ru](https://t.me/grablab_ru)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "selection",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "lxml,dom,html",
    "author": "",
    "author_email": "Gregory Petukhov <lorien@lorien.name>",
    "download_url": "https://files.pythonhosted.org/packages/2f/cc/ab4159f789d60e2b7bd02a72cc728d06cbb3b3ecc8a851e992a00347c7a5/selection-0.0.21.tar.gz",
    "platform": null,
    "description": "# Selection Documenation\n\n[![Tests](https://github.com/lorien/selection/actions/workflows/test.yml/badge.svg)](https://github.com/lorien/selection/actions/workflows/test.yml)\n[![Code Quality](https://github.com/lorien/selection/actions/workflows/code_quality.yml/badge.svg)](https://github.com/lorien/selection/actions/workflows/code_quality.yml)\n[![Typing](https://github.com/lorien/selection/actions/workflows/mypy.yml/badge.svg)](https://github.com/lorien/selection/actions/workflows/mypy.yml)\n[![Test coverage](https://coveralls.io/repos/lorien/selection/badge.svg?branch=master)](https://coveralls.io/r/lorien/selection?branch=master)\n\nAPI to query DOM tree of HTML/XML document.\n\n\n## Usage Example\n\n```\nfrom selection import XpathSelector\nfrom lxml.html import fromstring\n\nhtml = '<div><h1>test</h1><ul id=\"items\"><li>1</li><li>2</li></ul></div>'\nsel = XpathSelector(fromstring(html))\nprint(sel.select('//h1')).text()\nprint(sel.select('//li').text_list()\nprint(sel.select('//ul').attr('id')\n```\n\n\n## Installation\n\nRun: `pip install -U selection`\n\n\n## Community\n\nTelegram English chat: [https://t.me/grablab](https://t.me/grablab)\n\nTelegram Russian chat: [https://t.me/grablab\\_ru](https://t.me/grablab_ru)\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) 2015-2022, Gregory Petukhov  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "API to extract content from HTML & XML documents",
    "version": "0.0.21",
    "split_keywords": [
        "lxml",
        "dom",
        "html"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "758abfc3f1a5149f9702000e58fd7084",
                "sha256": "a136018db3fca4ef05ff420dd41a27789b268375aa2b17a8077faa68e671aa6d"
            },
            "downloads": -1,
            "filename": "selection-0.0.21.tar.gz",
            "has_sig": false,
            "md5_digest": "758abfc3f1a5149f9702000e58fd7084",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8992,
            "upload_time": "2022-12-27T23:36:25",
            "upload_time_iso_8601": "2022-12-27T23:36:25.604369Z",
            "url": "https://files.pythonhosted.org/packages/2f/cc/ab4159f789d60e2b7bd02a72cc728d06cbb3b3ecc8a851e992a00347c7a5/selection-0.0.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-27 23:36:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "selection"
}
        
Elapsed time: 0.02577s