Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brooke-ec/artfight-api
A python module for retrieving data from artfight.net
https://github.com/brooke-ec/artfight-api
api-client artfight asynchronous asyncio python scraper
Last synced: 11 days ago
JSON representation
A python module for retrieving data from artfight.net
- Host: GitHub
- URL: https://github.com/brooke-ec/artfight-api
- Owner: brooke-ec
- Created: 2023-06-29T11:17:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-30T21:16:47.000Z (5 months ago)
- Last Synced: 2024-10-17T15:34:56.785Z (28 days ago)
- Topics: api-client, artfight, asynchronous, asyncio, python, scraper
- Language: Python
- Homepage: https://pypi.org/project/artfight-api/
- Size: 65.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Artfight Api
A module for retrieving data from [artfight.net](https://artfight.net/).
Powered by [beautifulsoup4](https://pypi.org/project/beautifulsoup4/) Artfight Api scrapes the normal frontend to retrieve data from Artfight. As a result any changes to the UI are likely to break this module. If you encounter any errors please be sure to report them to the repository's [GitHub issues page](https://github.com/NimajnebEC/artfight-api/issues/new).
## Quickstart
Install the module:
```
pip install artfight-api
```Fetch all attacks by a user:
```py
import asynciofrom artfight import ArtfightClient
async def main():
async with ArtfightClient("USERNAME", "PASSWORD") as client:
async for attack in client.get_user("Takaia").fetch_attacks():
fetched = await attack.fetch()
print(fetched.title)asyncio.run(main())
```