Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AbolDev/AparatLib
A library for interacting with the Aparat API
https://github.com/AbolDev/AparatLib
aparat aparat-api aparat-dl aparat-downloader aparat-lib aparat-news aparat-playlist-downloader aparat-python aparat-uploader aparatlib library python
Last synced: 3 months ago
JSON representation
A library for interacting with the Aparat API
- Host: GitHub
- URL: https://github.com/AbolDev/AparatLib
- Owner: AbolDev
- License: mit
- Created: 2024-06-02T10:04:50.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-15T13:13:45.000Z (5 months ago)
- Last Synced: 2024-07-16T14:38:04.665Z (4 months ago)
- Topics: aparat, aparat-api, aparat-dl, aparat-downloader, aparat-lib, aparat-news, aparat-playlist-downloader, aparat-python, aparat-uploader, aparatlib, library, python
- Language: Python
- Homepage:
- Size: 227 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aparat
A Python library to interact with the Aparat API.
## Installation
```bash
pip install AparatLib
```## Login & save session
```python
from aparat import Aparataparat = Aparat()
if aparat.login('your_username', 'your_password'):
print("Login successful")
aparat.save_session()
print("Session saved successfully.")
else:
print("Login failed.")```
## Interacting with Videos
```python
from aparat import Aparataparat = Aparat()
if aparat.load_session('your_username'):
print("Session loaded successfully.")video = aparat.get_video('m98gm8j')
# Send a comment
print(video.send_comment('Hello World!'))# Like the video
print(video.like())# Unlike the video
print(video.unlike())# Download video with 480p resolution
video_path = video.download('480p')
print("Video path: ", video_path)
else:
print("Login failed.")
```## Interaction with other users
```python
from aparat import Aparataparat = Aparat()
if aparat.load_session('your_username'):
print("Session loaded successfully.")user = aparat.get_user('aparat')
# Follow the user
print(user.follow())# Unfollow the user
print(user.unfollow())
else:
print("Login failed.")
```For more detailed information, please refer to the [documentation](https://aparatlib.readthedocs.io/en/latest/).