{"id":15017742,"url":"https://github.com/jdan735/wikipya","last_synced_at":"2025-04-12T12:52:29.118Z","repository":{"id":40048099,"uuid":"308712548","full_name":"jDan735/wikipya","owner":"jDan735","description":"A simple async python library for search pages and/or images in Wikipedia.","archived":false,"fork":false,"pushed_at":"2025-01-18T11:41:02.000Z","size":220,"stargazers_count":4,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T16:48:34.992Z","etag":null,"topics":["async","wikipedia","wikipedia-api"],"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/jDan735.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-30T18:27:00.000Z","updated_at":"2024-12-30T22:25:32.000Z","dependencies_parsed_at":"2024-05-12T23:22:10.189Z","dependency_job_id":"3886450f-0579-4c71-b226-ef0fd9151380","html_url":"https://github.com/jDan735/wikipya","commit_stats":{"total_commits":89,"total_committers":2,"mean_commits":44.5,"dds":0.0337078651685393,"last_synced_commit":"8d2248e53523ffe19cb5a897c24e2c5893849e63"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jDan735%2Fwikipya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jDan735%2Fwikipya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jDan735%2Fwikipya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jDan735%2Fwikipya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jDan735","download_url":"https://codeload.github.com/jDan735/wikipya/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571607,"owners_count":21126519,"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":["async","wikipedia","wikipedia-api"],"created_at":"2024-09-24T19:50:55.750Z","updated_at":"2025-04-12T12:52:29.099Z","avatar_url":"https://github.com/jDan735.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e📚 wikipya\u003c/h1\u003e\n  \u003ch3\u003eA simple async python library for search pages and images in wikis\u003c/h3\u003e\n\u003c/div\u003e\u003cbr\u003e\n\n## 🛠 Usage\n```python\n# Import wikipya\nfrom wikipya import Wikipya\n\n# Create Wikipya object with Wikipedia methods\nwiki = Wikipya(lang=\"en\").get_instance()\n\n# or use other MediaEiki server (or other service, but this is'n fully supported now)\n\nwikipya = Wikipya(url=\"https://ipv6.lurkmo.re/api.php\", lurk=True, prefix=\"\").get_instance()\n\n# for use Lurkmore (russian). simple and fast\n\n# Get a pages list from search\nsearch = await wiki.search(\"test\")\n\n# Get a pages list from opensearch\nopensearch = await wiki.opensearch(\"test\")\n\n# Get page class\n# You can give to wiki.page() search item, title of page, page id\n\n# Search item (supported ONLY by wiki.search)\npage = await wiki.page(search[0])\n\n# Page title\npage = await wiki.page(\"git\")\n\n# Pageid\npage = await wiki.page(800543)\n\nprint(page.html)       # Get page html\nprint(page.parsed)     # Get html cleared of link, and other non-formating tags\n\n# Get image\nimage = await wiki.image(page.title)  # may not work in non-wikipedia services, check true prefix, or create issue\n\nprint(image.source)    # Image url\nprint(image.width)     # Image width\nprint(image.height)    # Image height\n```\n\n## 🎉 Features\n- Full async\n- Support of other instances of MediaWiki\n- Support cleaning of HTML with TgHTML\n- Uses models by [pydantic](https://github.com/samuelcolvin/pydantic)\n\n## 🚀 Install\nTo install, run this code:\n```\npip install wikipya\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdan735%2Fwikipya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdan735%2Fwikipya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdan735%2Fwikipya/lists"}