{"id":13499574,"url":"https://github.com/syrusakbary/gdom","last_synced_at":"2025-05-16T03:05:02.815Z","repository":{"id":41514097,"uuid":"52548266","full_name":"syrusakbary/gdom","owner":"syrusakbary","description":"DOM Traversing and Scraping using GraphQL","archived":false,"fork":false,"pushed_at":"2019-10-22T23:49:24.000Z","size":20,"stargazers_count":1242,"open_issues_count":5,"forks_count":35,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-10T06:06:09.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://gdom.graphene-python.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syrusakbary.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":"2016-02-25T18:43:23.000Z","updated_at":"2025-03-17T13:59:24.000Z","dependencies_parsed_at":"2022-07-30T12:48:03.314Z","dependency_job_id":null,"html_url":"https://github.com/syrusakbary/gdom","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/syrusakbary%2Fgdom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrusakbary%2Fgdom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrusakbary%2Fgdom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrusakbary%2Fgdom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syrusakbary","download_url":"https://codeload.github.com/syrusakbary/gdom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459087,"owners_count":22074605,"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-07-31T22:00:35.419Z","updated_at":"2025-05-16T03:04:57.804Z","avatar_url":"https://github.com/syrusakbary.png","language":"Python","funding_links":[],"categories":["Tools","Python"],"sub_categories":["Julia Libraries","Crystal Libraries"],"readme":"# GDOM\n\nGDOM is the next generation of web-parsing, powered by `GraphQL`\nsyntax and the [Graphene framework](http://graphene-python.org).\n\nInstall it typing in your console:\n\n```bash\npip install gdom\n```\n\n**DEMO**: [Try GDOM online](http://gdom.graphene-python.org/)\n\n\n## Usage\n\nYou can either do `gdom --test` to start a test server for testing\nqueries or\n\n```bash\ngdom QUERY_FILE\n```\n\nThis command will write in the standard output (or other output if specified\nvia `--output`) the resulting JSON.\n\nYour `QUERY_FILE` could look similar to this:\n\n```graphql\n{\n  page(url:\"http://news.ycombinator.com\") {\n    items: query(selector:\"tr.athing\") {\n      rank: text(selector:\"td span.rank\")\n      title: text(selector:\"td.title a\")\n      sitebit: text(selector:\"span.comhead a\")\n      url: attr(selector:\"td.title a\", name:\"href\")\n      attrs: next {\n         score: text(selector:\"span.score\")\n         user: text(selector:\"a:eq(0)\")\n         comments: text(selector:\"a:eq(2)\")\n      }\n    }\n  }\n}\n```\n\n\n## Advanced usage\n\nIf you want to generalize your gdom query to any page, just rewrite your\nquery file adding the `$page` var. So should look to something like\nthis:\n\n```graphql\nquery ($page: String) {\n  page(url:$page) {\n    # ...\n  }\n}\n```\n\nAnd then, query it like:\n\n```bash\ngdom QUERY_FILE http://news.ycombinator.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrusakbary%2Fgdom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyrusakbary%2Fgdom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrusakbary%2Fgdom/lists"}