No project description provided
Project description
📚 wikipya
A simple async python library for search pages and/or images in Wikipedia.
🚀 Install
To install, run this code:
pip install wikipya
🛠 Usage
# Import wikipya
from wikipya.aiowiki import Wikipya
# Create Wikipya object with wikipedia methods
wiki = Wikipya("en")
# Get a pages list from search
search = wiki.search("test")
# Get a pages list from opensearch
opensearch = wiki.opensearch("test")
# Get page class
# You can give to wiki.page() search item, title of page, page id
# Search item (supported ONLY wiki.search)
page = wiki.page(search[0])
# Page title
page = wiki.page("git")
# Pageid
page = wiki.page(800543)
print(page.html) # Get page html
print(page.soup) # Get parsed html (Beatiful Soup 4)
print(page.parsed) # Get html cleared of link, and other non-formating tags
print(page.fixed) # [RU/UK] Свойство, в котором исправлены спорные слова (В/НА, Беларусь)
# Get page image
image = page.image()
print(image.source) # Image url
print(image.width) # Image width
print(image.height) # Image height
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wikipya-3.0.0b4.tar.gz
(6.7 kB
view details)
File details
Details for the file wikipya-3.0.0b4.tar.gz.
File metadata
- Download URL: wikipya-3.0.0b4.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ade4246b3f50af79fcaeeeda6ee07a6445af763d5fadc050a0ea20a2bfd2204c
|
|
| MD5 |
934303d4d70ace47eff7a70a28123dc0
|
|
| BLAKE2b-256 |
cee562586affc47c96778512e81f96a6a04a44d7b65a448144170f213e09521f
|