-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- updated to eaf_base_api v2 - written tests for search and user objects - removed headers, cuz they were broken - type hinting
- Loading branch information
1 parent
51e8f60
commit f4c0155
Showing
9 changed files
with
113 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# xnxx_api/__init__.py | ||
|
||
__all__ = [ | ||
"Client", "Core", "Quality", "Video", "Callback", "threaded", "default", "FFMPEG", | ||
"Client", "BaseCore", "Video", "Callback", | ||
"errors", "consts", "search_filters", "category" | ||
] | ||
|
||
# Public API from xnxx_api.py | ||
from xnxx_api.xnxx_api import Client, Core, Quality, Video, Callback, threaded, default, FFMPEG | ||
from xnxx_api.xnxx_api import Client, BaseCore, Video, Callback | ||
from xnxx_api.modules import errors, consts, category, search_filters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from ..xnxx_api import Client | ||
|
||
client = Client() | ||
search = client.search("fortnite") | ||
|
||
def test_search(): | ||
for idx, video in enumerate(search.videos): | ||
assert isinstance(video.title, str) | ||
|
||
if idx == 3: | ||
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from ..xnxx_api import Client | ||
|
||
client = Client() | ||
user = client.get_user("https://www.xnxx.com/pornstar/cory-chase") | ||
objects_video = ["title", "publish_date", "length", "author"] | ||
|
||
|
||
|
||
def test_video_views(): | ||
assert isinstance(user.total_video_views, str) | ||
assert user.total_videos > 0 | ||
|
||
def test_videos(): | ||
for idx, video in enumerate(user.videos): | ||
if idx == 3: | ||
break | ||
for object in objects_video: | ||
assert isinstance(getattr(video, object), str) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.