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.1.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file xvideos_py-0.1.1.tar.gz
.
File metadata
- Download URL: xvideos_py-0.1.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43c7f362ade29de8a1d0e451a8a7a7a2b6e6e5bdb115ceee27883ddfe3a34fa3 |
|
MD5 | 425f6097d80a7d5f50aa7e86c0fa3449 |
|
BLAKE2b-256 | c5ffa0c8be29121accd780d02a435fb9ca17969c757aac8fffce8b95a256916b |
File details
Details for the file xvideos_py-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: xvideos_py-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.9 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 | 6b6b9831bd2dfa1f08b1362d1dd816286c7539dab389e7d64ba4c303d1a10fef |
|
MD5 | 5b977791c60c3d07602d4711aef5db3e |
|
BLAKE2b-256 | ee8ec4cff94076c4930d381d75a73c515d011eb8a07551bb393ba9511ccef592 |