Youtube data extractor
- Nim 100%
|
|
||
|---|---|---|
| examples/web | fix | |
| reqs | Version 0.8.0 | |
| src |
Fixed publishDate and uploadDate time parsing
|
|
| tests | Version 1.1.0 | |
| .gitattributes | recompiled example js file; fixed gitattributes | |
| .gitignore | saving | |
| changelog.md |
Fixed publishDate and uploadDate time parsing
|
|
| config.nims | saving | |
| licence | init | |
| readme.md |
Fixed publishDate and uploadDate time parsing
|
|
| ytextractor.nimble |
Fixed publishDate and uploadDate time parsing
|
|
ytextractor
Note
An new version with async, NodeJS support and more fixes are in development at branch
dev-v1.2
Youtube data extractor
Extracts the data of a Youtube url. but more will be added soon!
The objective is extract every data that don't need authentication
Features
Extracted Info
-
Video url
- Video info
- Id (video code)
- Title
- Description
- Thumbnails
- Embed
- Publish date
- Upload date
- Length
- Family friendly
- Unlisted
- Private
- Live (is live)
- Channel
- Views
- Category
- Likes
- Keywords
- Captions URLs
- Channel
- Name
- Id
- Url
- Subscribers
- Channel icons
- Hidden subscribers (bool)
- Video info
-
Channel url
- Id
- Url
- Name
- Subscribers
- Channel icons
- Hidden subscribers (bool)
- Family safe
- Tags
- Description (about)
- Banners
- Links
- Primary
- Secondary
- Highlighted playlists videos
- Highlighted video
- Id (video code)
- Title
- Description
- Thumbnails
- Views
- Rounded publish date
- Badges
- Name
- Icon
- IconType
- Style
-
Video captions
-
Video data
- Subtitles
- Comments
- Comments of comments
- Livechat
- Realtime
- Replay
-
Search results
-
All videos from channel/user
-
All videos of playlist (a seq of videos)
JS (browser) target avaliable!
An example can be found in examples/web.
Unfortunately the implementation isn't async, soon it will be fixed
TODO: Add captions extraction to JS example
Usage
video.nim
import ytextractor
echo extractVideo "7on15IWC2u4"
or
import ytextractor
var vid = initYoutubeVideo "7on15IWC2u4".videoId
discard vid.update()
echo vid
channel.nim
import ytextractor
echo extractChannel "https://www.youtube.com/c/taofledermaus"
or
import ytextractor
var channel = initYoutubeChannel "https://www.youtube.com/c/taofledermaus".channelId
discard channel.update(home)
echo channel
captions.nim
import ytextractor
echo "7on15IWC2u4".extractVideo.captions[0].url.extractCaptions
or
import ytextractor
var captions = initYoutubecaptions()
discard captions.update "7on15IWC2u4".extractVideo.captions[0].url
echo captions
Installation
Minimum Nim version is 1.2.2
Please choice one installation method:
- Automatically with nimble
nimble install ytextractor
Or
- Manually
git clone https://github.com/thisago/ytextractor cd ytextractor/ nimble install
Docs
A online docs is hosted in Github Pages
TODO
- Usage guide (not only Nim)
- Make requests async
- Use API https://www.youtube.com/youtubei/v1/browse to get channel data instead using simple page request
- Add tests for captions sub module
Useful links
nlitsme/youtube_tool
Python3 parser
With a "How it works" section
License
MIT