wpoke

What’s this
You much probably have landed off here while seeking some python scripts online to gather some information from WordPress sites without too much effort. I regret to say that this library, while I actively seek to make it usable by other applications, it may not meet your expectations. On one side, it’s being rolled down employing asyncio, low-level parsers such as lxml and of course python>=3.7. (We only python3 in this house). Either way, not a too much exotic stack but modern enough to require you to prepare more complex environments in order to run it. Of course I know about other tools that ship with all the ecosystem needed to extract this information, such as scrapy, but I wanted to get my hands dirty with new tech… Besides, who does not want to reinvent the wheel from time to time?
On the other hand, it is still under heavy development and there is not much info you can scrape using this tool. Hence, you are very welcome to contribute! :)
Featuring
Theme metadata information
Theme name, version, description and URL
Child themes (template)
Included translations
Screenshot (featured image)
Status
Tags
License and license URL
Version
Description and text domain
Author name and URL
Installing
[STRIKEOUT:I’d rather have a deterministic dependency manager. That’s why this projects employs poetry]. Ejem well, I’m pretty tired of running into weird issues on different environments due to these exotic dep managers, should I will stick back to pip for now.
Install with setup.py
git clone git@github.com:sonirico/wpoke.git
cd wpoke/
python setup.py install
Install from pypi
pip install -U pip # Make sure pip is updated
pip install wpoke
Run as command line tool
pip install wpoke
wpoke-cli https://wp-target-site.com/
Run on docker
docker run sonirico/wpoke:latest https://wp-target-site.com
Configuration
As of now, configurable parameters are:
max number of redirects: max-redirects
global timeout: timeout
user-agent: user-agent
Examples
wpoke-cli --max-redirects=5 --timeout 5 --user-agent "Mozilla/5.0" https://my-wp-target.com
Roll down your own checks (aka fingers)
import requests
from wpoke.hand import Hand
hand = Hand()
@hand.add_finger
def custom_version_extractor(url):
response = requests.get(url)
data = my_response_parser(response.text())
return data
if __name__ == "__main__":
hand.poke()
Metadata
Release files for wpoke 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wpoke-0.1.4.tar.gz | 18.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wpoke-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.0 kB
Release files / wpoke-0.1.4.tar.gz
| Download URL | wpoke-0.1.4.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b21a4bdaed879c0c59300f666b9651df3cd319bbc447676f4745847857aa8bca
|
|
BLAKE2b-256 checksum How to use checksums |
5cf8a7312bf075f30fb7d4ab73c1dcb099af29d2dcde2221adc9d87d20fff905
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / wpoke-0.1.4-py3-none-any.whl
| Download URL | wpoke-0.1.4-py3-none-any.whl |
|---|---|
| Size | 25.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cae3c2071548d5908c0d8a28ab20c667bc4f695aa6681ada8401e9ce4eceb2d
|
|
BLAKE2b-256 checksum How to use checksums |
b905f4cc201ee6537a824d1dc47bd775eabfbc41d908a0554f3a1196bdbb80d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|