WikipediaQL: querying structured data from Wikipedia
WikipediaQL is an experimental query language and, executable script, and Python library for querying structured data from Wikipedia. It looks like this:
$ wikipedia_ql --page "Guardians of the Galaxy (film)" \
'{
page@title as "title";
section[heading="Cast"] as "cast" >> {
li >> text:matches("^(.+?) as (.+?):") >> {
text-group[group=1] as "actor";
text-group[group=2] as "character"
}
};
section[heading="Critical response"] >> {
sentence:contains("Rotten Tomatoes") as "RT ratings" >> {
text:matches("\d+%") as "percent";
text:matches("(\d+) (critic|review)") >> text-group[group=1] as "reviews";
text:matches("[\d.]+/10") as "overall"
}
}
}'
title: Guardians of the Galaxy (film)
RT ratings:
overall: 7.8/10
percent: 92%
reviews: '334'
cast:
- actor: Chris Pratt
character: Peter Quill / Star-Lord
- actor: Zoe Saldaña
character: Gamora
...
Metadata
Release files for wikipedia-ql 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wikipedia_ql-0.0.6.tar.gz | 25.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wikipedia_ql-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.3 kB
Release files / wikipedia_ql-0.0.6.tar.gz
| Download URL | wikipedia_ql-0.0.6.tar.gz |
|---|---|
| Size | 25.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f78987f526b6fe36b425c2b1d424bc6e078fd0ef436a46c431bc6af14cc82df
|
|
BLAKE2b-256 checksum How to use checksums |
fe2c7dc817dc213929d4a3c02555bd1b22536d64ac5e832c1e192d17a3301e2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.27.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6
|
Release files / wikipedia_ql-0.0.6-py3-none-any.whl
| Download URL | wikipedia_ql-0.0.6-py3-none-any.whl |
|---|---|
| Size | 23.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c3ee0f329ae1d633b70f4bd5f3bdea41003111540ce82be7dbb1c683edd6354
|
|
BLAKE2b-256 checksum How to use checksums |
4afb8f9cd3fe774e912d5cdaba6fbcacfe5ef80d7697ae527a19ce1d715b666e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.27.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6
|