bmww-api
Use : pip install bmww-api==0.0.9
to install this module
Pypi url : https://pypi.org/project/bmww-api/
Disclaimers:
-
This is not an official api and it is quite weak but it gets the job done.
-
DO NOT ABUSE REQUESTS SINCE IT CAN BE HARMFUL FOR THE WEB PAGE.
Notes:
-
As said before this is not an official api and it was made by one person, so if you see any errors in the code or see a better way to do code it and know how to do it, you are welcome to edit it.
-
Information like genres or information that can be a list (ex: genres, categories, challenges, series) can't be accessed individually due to the way that the html was written. Again if you find a way to fix it or make it possible to access this information individually you are welcome to do it
-
If you want to access information like the ones stated above you would have to do .complete_info this will get the work's complete info
-
I may be updating this project with new features, however i don't really have much time to do it and since this is one of my first times using beautiful soup the code maybe a bit messy and with a lot of errors.
Quick guide on how to use:
#import module
from bmwwAPI import bmww
#create api object
api = bmww()
# create work from api '487' being the id of the work/fanfiction
# https://batmanwonderwoman.com/fanfiction/viewstory.php?sid=487 the last 3 numbers of the url are the id of the work, those are the three numbers you need
# if an id is not given the only information available is to get a random story
# create a work object based on the api
work = api.work(#id)
# some of the functions of the api
# get information out of a work/fanfic/series
work_info = [
work.title, # title
work.author, # author
work.reviews, # reviews
work.chapters, # chapters
work.completed, # if its completed
work.words, # how many words
work.read, # times read
work.published, # publish date
work.updated, # last time updated
work.url, # its url
work.summary, # its summary
work.complete_info # the entire work's info
work.rand_id # the random story id
work.random_story_url # the random story url
]
# get information out of an users profile, this gets the information that the user chose to share, so no funny business here.
# you don't have to specify any work's id except the users id
# create an user object based on the api
user = api.users()
# some of the information that you can get from user's profiles
# keep in mind that some of this information may not be available if the user chose not to share it
user_info = [
user.penname, # gets the user nickname
user.real_name, # gets the user real name
user.member_status, # gets the user member status
user.bio, # gets the user bio
user.user_url, # gets the user page url
user.beta_reader # gets if the user is a beta reader
user.gender # gets the user gender
user.recent_story # gets the user's last published or updated story
user.stories # gets the number of user published stories
user.series # gets the number of user series
user.reviews # gets the number of the user reviews
user.challenges # gets the number of the user challenges
user.favorite_series # gets the number of the user favorite series
user.user_favorites # gets the number of user favorites
]
For more information in how to use the api, refer to example_code.py
Metadata
Release files for bmww-api 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bmww-api-0.0.9.tar.gz | 4.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bmww_api-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / bmww-api-0.0.9.tar.gz
| Download URL | bmww-api-0.0.9.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0640918605b68f5b4c2a1f049ac61195d02dbecd1bf994bcdc80b1d11a6b3830
|
|
BLAKE2b-256 checksum How to use checksums |
baf1ce99f7f3d0933ffb640909888e8893e9fa7ff807caaba0bba2dfbf198751
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Release files / bmww_api-0.0.9-py3-none-any.whl
| Download URL | bmww_api-0.0.9-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bb588a21ac3816228c2b07a85fe7556d9995b595c7a2fa2beef0cc9b8a32d44
|
|
BLAKE2b-256 checksum How to use checksums |
c59d3f28881643cc63ad686ddd42f302465eba4b97bed89b42a104f62d435019
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Security for bmww-api 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.