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.4.tar.gz
(10.0 kB
view details)
Built Distribution
File details
Details for the file xvideos_py-0.1.4.tar.gz
.
File metadata
- Download URL: xvideos_py-0.1.4.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39542bdee5c869705bea434f0c62ac5c63944b5c045e78bf82477c7eb3bf4317 |
|
MD5 | 9e6112cc2996e9e623252ca5a8875ca2 |
|
BLAKE2b-256 | b0bbcd44a1c1dd9a2c75c494720a9e47a1885a8c2f28712396973023c26e07f8 |
File details
Details for the file xvideos_py-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: xvideos_py-0.1.4-py3-none-any.whl
- Upload date:
- Size: 11.7 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 | 958fb4740f5d6f28ce2a0b5f3f58c08fa740a8dacc6e6b634255982d85237699 |
|
MD5 | 18fad8e24c0cf7da205fdabc49e82282 |
|
BLAKE2b-256 | 690806f5dad3509638265a990e579efc8302e205987fa7f128e6312a670d69e4 |