📚 wikipya
A simple async python library for search pages and images in wikis
🛠 Usage
from wikipya import Wikipya
wiki = Wikipya(lang="en").get_instance()
wikipya = Wikipya(url="https://ipv6.lurkmo.re/api.php", lurk=True, prefix="").get_instance()
search = await wiki.search("test")
opensearch = await wiki.opensearch("test")
page = await wiki.page(search[0])
page = await wiki.page("git")
page = await wiki.page(800543)
print(page.html)
print(page.parsed)
image = await wiki.image(page.title)
print(image.source)
print(image.width)
print(image.height)
🎉 Features
- Full async
- Support of other instances of MediaWiki
- Support cleaning of HTML with TgHTML
- Uses models by pydantic
🚀 Install
To install, run this code:
pip install wikipya