{"id":15433085,"url":"https://github.com/simonw/soupselect","last_synced_at":"2025-04-19T17:52:46.383Z","repository":{"id":560830,"uuid":"191753","full_name":"simonw/soupselect","owner":"simonw","description":"CSS selector support for BeautifulSoup.","archived":false,"fork":false,"pushed_at":"2020-10-11T15:17:06.000Z","size":9,"stargazers_count":62,"open_issues_count":4,"forks_count":21,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-18T07:54:06.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/simonw.png","metadata":{"files":{"readme":"README","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":"2009-05-03T22:47:08.000Z","updated_at":"2024-05-12T08:26:12.000Z","dependencies_parsed_at":"2022-07-08T21:00:25.969Z","dependency_job_id":null,"html_url":"https://github.com/simonw/soupselect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fsoupselect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fsoupselect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fsoupselect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fsoupselect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/soupselect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249753110,"owners_count":21320664,"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":[],"created_at":"2024-10-01T18:31:32.901Z","updated_at":"2025-04-19T17:52:46.366Z","avatar_url":"https://github.com/simonw.png","language":"Python","readme":"A single function, select(soup, selector), that can be used to select items\nfrom a BeautifulSoup instance using CSS selector syntax.\n\nCurrently supports type selectors, class selectors, id selectors, attribute\nselectors and the descendant combinator.\n\nsoupselect requires BeautifulSoup v3.0.3 or above; it will not work with v2.x\n\nExample usage:\n\n    \u003e\u003e\u003e from BeautifulSoup import BeautifulSoup as Soup\n    \u003e\u003e\u003e from soupselect import select\n    \u003e\u003e\u003e import urllib\n    \u003e\u003e\u003e soup = Soup(urllib.urlopen('http://slashdot.org/'))\n    \u003e\u003e\u003e select(soup, 'div.title h3')\n    [\u003ch3\u003e\n    \u003cspan\u003e\u003ca href='//science.slashdot.org/'\u003eScience\u003c/a\u003e:\u003c/span\u003e ...\n    \u003c/h3\u003e, \u003ch3\u003e\n    \u003ca href='//slashdot.org/articles/07/02/28/0120220.shtml'\u003eStar Trek To ...\n    \u003c/h3\u003e\n    ... ]\n\nYou can also monkey-patch the BeautifulSoup class itself:\n\n    \u003e\u003e\u003e from BeautifulSoup import BeautifulSoup as Soup\n    \u003e\u003e\u003e import soupselect; soupselect.monkeypatch()\n    \u003e\u003e\u003e import urllib\n    \u003e\u003e\u003e soup = Soup(urllib.urlopen('http://slashdot.org/'))\n    \u003e\u003e\u003e soup.findSelect('div.title h3')\n    [\u003ch3\u003e\n    ...\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fsoupselect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fsoupselect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fsoupselect/lists"}