From bf29eea05c6228d7357ac257c6f4f190c9ea18f6 Mon Sep 17 00:00:00 2001 From: Alpha <666504+alphaho@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:27:31 +0800 Subject: [PATCH] Remove redundant `` --- book/chapter2.md | 2 +- enjoy/lib/youtubedr/README.md | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/book/chapter2.md b/book/chapter2.md index 8e0d904d..1fdc941e 100644 --- a/book/chapter2.md +++ b/book/chapter2.md @@ -80,7 +80,7 @@ Meanwhile, everyone is becoming even more distinctive, especially in terms of th 10. Good afternoon. 11. Good evening. 12. Good night. -13. Good-bye. +13. Good-bye. 14. See you in the evening. 15. So long. diff --git a/enjoy/lib/youtubedr/README.md b/enjoy/lib/youtubedr/README.md index ab06bc71..d327c059 100644 --- a/enjoy/lib/youtubedr/README.md +++ b/enjoy/lib/youtubedr/README.md @@ -97,23 +97,23 @@ Please check out the [example_test.go](example_test.go) for example code. * ### Download video to specific folder and name -`go get github.com/kkdai/youtube/v2/youtubedr` +`go get github.com/kkdai/youtube/v2/youtubedr` -Download video from [dotGo 2015 - Rob Pike - Simplicity is Complicated](https://www.youtube.com/watch?v=rFejpH_tAHM) to current directory and name the file to simplicity-is-complicated.mp4 +Download video from [dotGo 2015 - Rob Pike - Simplicity is Complicated](https://www.youtube.com/watch?v=rFejpH_tAHM) to current directory and name the file to simplicity-is-complicated.mp4 -``` -youtubedr download -d ./ -o simplicity-is-complicated.mp4 https://www.youtube.com/watch?v=rFejpH_tAHM -``` +``` +youtubedr download -d ./ -o simplicity-is-complicated.mp4 https://www.youtube.com/watch?v=rFejpH_tAHM +``` * ### Download video with specific quality -`go get github.com/kkdai/youtube/v2/youtubedr` +`go get github.com/kkdai/youtube/v2/youtubedr` -Download video from [dotGo 2015 - Rob Pike - Simplicity is Complicated](https://www.youtube.com/watch?v=rFejpH_tAHM) with specific quality +Download video from [dotGo 2015 - Rob Pike - Simplicity is Complicated](https://www.youtube.com/watch?v=rFejpH_tAHM) with specific quality -``` -youtubedr download -q medium https://www.youtube.com/watch?v=rFejpH_tAHM -``` +``` +youtubedr download -q medium https://www.youtube.com/watch?v=rFejpH_tAHM +``` #### Special case by quality hd1080: Installation of ffmpeg is necessary for hd1080 @@ -136,14 +136,14 @@ Please check out the [example_test.go](example_test.go) for example code. ## How it works - Parse the video ID you input in URL -- ex: `https://www.youtube.com/watch?v=rFejpH_tAHM`, the video id is `rFejpH_tAHM` +- ex: `https://www.youtube.com/watch?v=rFejpH_tAHM`, the video id is `rFejpH_tAHM` - Get video information via video id. -- Use URL: `http://youtube.com/get_video_info?video_id=` +- Use URL: `http://youtube.com/get_video_info?video_id=` - Parse and decode video information. -- Download URL in "url=" -- title in "title=" +- Download URL in "url=" +- title in "title=" - Download video from URL -- Need the string combination of "url" +- Need the string combination of "url" ## Inspired - [https://github.com/ytdl-org/youtube-dl](https://github.com/ytdl-org/youtube-dl)