Skip to content

Commit

Permalink
1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EchterAlsFake committed Feb 6, 2024
1 parent da42885 commit c8e2dd0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
9 changes: 8 additions & 1 deletion README/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 1.0

- Initial Commit
- Initial Commit

# 1.1

- implemented searching
- implemented search filters
- unit tests for searching
- updated documentation
44 changes: 43 additions & 1 deletion README/Documentation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# XNXX API Documentation

> - Version 1.0
> - Version 1.1
> - Author: Johannes Habel
> - Copryight (C) 2024
> - License: GPL 3
Expand All @@ -19,6 +19,9 @@ The ToS of xvideos.com clearly say, that using scrapers / bots isn't allowed.
- [Attributes](#attributes)
- [Downloading](#downloading-a-video)
- [Custom callback](#custom-callback-for-downloading--videos)
- [Searching Videos](#searching)
- [Basic Search](#basic-search)
- [Using Filters](#using-filters)

- [Locals](#locals)
- [Quality](#the-quality-object)
Expand Down Expand Up @@ -119,6 +122,45 @@ def custom_callback(pos, total):

When downloading a video, you can just specify your callback functions in the `callback` argument

# Searching

## Basic Search

```python
from xvideos_api.xvideos_api import Client

client = Client()
videos = client.search("Mia Khalifa", pages=2)

for video in videos:
print(video.title)
```

- One Page contains 27 videos
- Search filters are by default the ones from xvideos

## Using Filters

```python
from xvideos_api.modules.sorting import SortDate, Sort, SortQuality, SortVideoTime
from xvideos_api.xvideos_api import Client

client = Client()
videos = Client.search("Mia Khalifa", pages=1, sorting_Date=SortDate.Sort_all, sort_Quality=SortQuality.Sort_720p,
sorting_Sort=Sort.Sort_relevance, sorting_Time=SortVideoTime.Sort_short)

# If you don't specify filters, the default from xvideos.com will be used!
```

- Sort: Sorts videos by relevance, views and stuff
- SortQuality: Sorts videos by their quality
- SortDate: Sorts videos by upload date
- SortVideoTime: Sorts videos by their length






# Locals

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="xvideos_api",
version="1.0",
version="1.1",
packages=find_packages(),
install_requires=[
"requests", "bs4", "lxml", "ffmpeg-progress-yield"
Expand Down

0 comments on commit c8e2dd0

Please sign in to comment.