Parser for Wikipedia.org
Project description
wiki-fetch
Installation
- PyPI
pip install wiki-fetch
- Source
git clone git@github.com:d3z-the-dev/wiki-fetch.git
cd wiki-fetch && poetry build
pip install ./dist/*.whl
Usage
CLI
| Options for use in console | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
wiki-fetch -q 'The Doors (band)' -p infobox -i first
output
Infobox:
The Doors:
The Doors:
Image: https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/The_Doors_1968.JPG/250px-The_Doors_1968.JPG
Caption: The Doors in 1966: Morrison (left), Densmore (centre), Krieger (right) and Manzarek (seated)
Background information:
Origin: Los Angeles, California, U.S.
Genres:
Psychedelic Rock
Blues Rock
Acid Rock
Years active:
1965-1973
1978
Labels:
Elektra
Rhino
Spinoffs:
The Psychedelic Rangers
Butts Band
Nite City
Manzarek-Krieger
Spinoff of: Rick & the Ravens
Past members:
Jim Morrison
Ray Manzarek
Robby Krieger
John Densmore
Website: thedoors.com
URL: https://en.wikipedia.org/?search=The Doors (Band)
Python
| Arguments of function and class | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
from wiki_fetch.driver import Wiki
output = Wiki(lang='English').search(query='The Doors (band)', part='infobox', item='first')
print(output.json)
output
{
"Infobox": [
{
"The Doors": {
"The Doors": {
"Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/The_Doors_1968.JPG/250px-The_Doors_1968.JPG",
"Caption": "The Doors in 1966: Morrison (left), Densmore (centre), Krieger (right) and Manzarek (seated)"
},
"Background information": {
"Origin": "Los Angeles, California, U.S.",
"Genres": [
"Psychedelic Rock",
"Blues Rock",
"Acid Rock"
],
"Years active": [
"1965-1973",
"1978"
],
"Labels": [
"Elektra",
"Rhino"
],
"Spinoffs": [
"The Psychedelic Rangers",
"Butts Band",
"Nite City",
"Manzarek-Krieger"
],
"Spinoff of": "Rick & the Ravens",
"Past members": [
"Jim Morrison",
"Ray Manzarek",
"Robby Krieger",
"John Densmore"
],
"Website": "thedoors.com"
}
}
}
],
"URL": "https://en.wikipedia.org/?search=The Doors (Band)"
}
Specification
| Available options | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wiki_fetch-0.1.1.tar.gz
(15.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wiki_fetch-0.1.1.tar.gz.
File metadata
- Download URL: wiki_fetch-0.1.1.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.10 Linux/5.15.0-1033-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5593a1dd2ceca9be89a9d93e417a5fce659a518824994962540921c836123fb6
|
|
| MD5 |
17f3ebec7aa5f37d1f11948589883779
|
|
| BLAKE2b-256 |
341e3fd6a17d5121f9c2bb7bf5ef6f87529477d15e97242804333c407d3b07f5
|
File details
Details for the file wiki_fetch-0.1.1-py3-none-any.whl.
File metadata
- Download URL: wiki_fetch-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.10 Linux/5.15.0-1033-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3afa5c130ca7e5dff662418c2f2e50e5ffff0742cc6384e3c76488e7efe3b438
|
|
| MD5 |
6a41d6ad5e544fa8e1aa3414b5125ec2
|
|
| BLAKE2b-256 |
cc91b3a73a75eae9c79950d8ce8ee3033c655adc2e35cb7e24c35cb2b95f8526
|