{"id":20036321,"url":"https://github.com/lorien/selection","last_synced_at":"2025-05-05T05:31:50.322Z","repository":{"id":27039555,"uuid":"30504646","full_name":"lorien/selection","owner":"lorien","description":"API to extract data from HTML and XML documents","archived":false,"fork":false,"pushed_at":"2022-12-27T23:36:19.000Z","size":129,"stargazers_count":9,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T18:38:51.587Z","etag":null,"topics":["dom","html","lxml","query-api","xml","xpath","xpath-api"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-08T20:30:16.000Z","updated_at":"2024-01-17T18:10:00.000Z","dependencies_parsed_at":"2023-01-14T05:51:52.699Z","dependency_job_id":null,"html_url":"https://github.com/lorien/selection","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorien%2Fselection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorien%2Fselection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorien%2Fselection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorien%2Fselection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorien","download_url":"https://codeload.github.com/lorien/selection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252446441,"owners_count":21749235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dom","html","lxml","query-api","xml","xpath","xpath-api"],"created_at":"2024-11-13T10:11:55.570Z","updated_at":"2025-05-05T05:31:49.610Z","avatar_url":"https://github.com/lorien.png","language":"Python","readme":"# 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 = '\u003cdiv\u003e\u003ch1\u003etest\u003c/h1\u003e\u003cul id=\"items\"\u003e\u003cli\u003e1\u003c/li\u003e\u003cli\u003e2\u003c/li\u003e\u003c/ul\u003e\u003c/div\u003e'\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florien%2Fselection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florien%2Fselection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florien%2Fselection/lists"}