Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enzoalbornoz/bitchute-dl
Get videos from BitChute easily
https://github.com/enzoalbornoz/bitchute-dl
Last synced: 12 days ago
JSON representation
Get videos from BitChute easily
- Host: GitHub
- URL: https://github.com/enzoalbornoz/bitchute-dl
- Owner: EnzoAlbornoz
- Created: 2020-11-15T04:58:56.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-16T21:12:22.000Z (about 4 years ago)
- Last Synced: 2024-11-05T22:19:15.427Z (13 days ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bitchute Downloader
This packages is focused on creating a wrapper for the BitChute site. Because the website doesn't have a API, the majority of the functions use HTML scrapping or XHR requests that detect when videos are searched or selected.
## API
### `isBitchuteLink(possibleLink) : bool`
Checks if a possible value is a valid URL and it's from the bitchute domainParamameters:
- `possibleLink: String`: Value containing a possible BitChute URL
### `fetchCookies() : Promise`
To correctly connect to BitChute, you have to request cookies. So, this function will fetch them. You may also pass it to other functions to prevent cookie fetching internally.### `searchVideo (topic, duration, sorting, cookies) : Promise`
List Bitchute videos based on search criteria. Currently, only the first page of data is fetched.Parameters:
- `topic: String` - The topic that you want to query
- `duration: String` - Video duration category. Possible values are:
- `"any"` - Do not restrict
- `"short"` - Videos between 0 and 5 minutes
- `"medium"` - Videos between 5 and 20 minutes
- `"long"` - Videos longer than 20 minutes
- `"feature"` - Videos longer than 45 minutes
- `sorting: String` - Video sorting setting. Possible values are:
- `"relevance"` - Use higher relevance sorting (Default)
- `"newest"` - Sort by newest videos first
- `"oldest"` - Sort by oldest videos first
- `cookies: CookieMap` - Cookies fetched from `fetchCookies`### `getVideoPrivateLink(publicPath, cookies): Promise`
When acessing BitChute video pages, the URL is formed by its domain and a path (e.g `/video/QBoDWtj3e8wi/` is the path part). With this data, we can fetch the private link for the video, i.e, the link for the video file on a content web server.Parameters:
- `publicPath: String` - The public path of the target video
- `cookies: CookieMap` - Cookies fetched from `fetchCookies`### `getVideoStream(privateLink) : Promise`
With the private link of a video, we can access the file as a binary data, creating a download stream from the remote data.Parameters:
- `privateLink: String` - The private link of a Bitchute video. (Usually achieved with the `getVideoPrivateLink` function)