A powerful Python library to scrape xvideos.com
Project description
xvideos-py
A powerful Python library to scrape xvideos.com.
💻 Installation
$ pip install xvideos-py
🍑 Usage
🍒 Importing the Library
from xvideos import XVideos
🍒 Retrieve Fresh Videos
xvideos = XVideos()
# Retrieve fresh videos from the first page
fresh = xvideos.fresh(page=1)
# Log details of the retrieved videos
print(fresh['videos']) # List of video objects with properties like url, path, title, duration, profile, views
print(fresh['pagination']['pages']) # List of available page numbers
🍒 Retrieve Verified Videos
# Retrieve verified videos from the first page
verified = xvideos.get_verified(page=1)
# Log details of the retrieved videos
print(verified['videos']) # List of verified video objects with properties like url, path, title, duration, profile, views
print(verified['pagination']) # List of available page numbers
🍒 Search Videos
# Search for videos with a specific keyword
search_results = xvideos.search(page=1, k="example", sort="relevance")
# Log details of the search results
print(search_results['videos']) # List of video objects with properties based on the search parameters
print(search_results['pagination']) # List of available page numbers
🍐 Params explanation
Parameter | Default | Options |
---|---|---|
page |
1 |
(any positive integer) |
k |
"" |
(any search keyword) |
sort |
"relevance" |
"uploaddate" , "rating" , "length" , "views" , "random" |
datef |
"all" |
"today" , "week" , "month" , "3month" , "6month" , "all" |
durf |
"allduration" |
"1-3min" , "3-10min" , "10min_more" , "10-20min" , "20min_more" , "allduration" |
quality |
"all" |
"hd" , "1080P" , "all" |
pewmium |
False |
False, True |
🍑 Development
🍒 Running Tests
To run tests, you can use pytest
. Ensure you have it installed in your development environment.
$ pytest
🐼 @me
You can find me on twitter as 🐤 @osinthappyemo or on instagram as 🍢 @osintxv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xvideos_py-0.1.3.tar.gz
(8.3 kB
view details)
Built Distribution
File details
Details for the file xvideos_py-0.1.3.tar.gz
.
File metadata
- Download URL: xvideos_py-0.1.3.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 170699722716b32e4d8c84d6d4c433e83d45e28cf4fed04ca0933f1392645ba7 |
|
MD5 | 9b6e1bec071b077b8d6d2818a3e7473a |
|
BLAKE2b-256 | d362d9304413b772386f627e5aedfd2584b7f8d4d7ab46f6507e5fd61011562f |
File details
Details for the file xvideos_py-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: xvideos_py-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b5310a55d5155aaa06ce787c89feb6509dd38695c0a1c8801a87bcc2bdad3c8 |
|
MD5 | 9f18f0acb79d9abff4bd67a2610f0e55 |
|
BLAKE2b-256 | f42e06aef84f807adb90e45d6307793a72f8606efa964d2b381b7e1add6ece87 |