Skip to content

Commit

Permalink
Youtube Link Finder in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamstan13y authored Jan 1, 2022
1 parent 6464506 commit f6dec5c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Sololearn CodeCoach Challenges/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,29 @@ _6_

> ### 💡 Explanation
> The string in question has five words with a total of 26 letters (spaces do not count). The average word length is 5.20 letters, rounding it up to the nearest whole numbers results in 6.
<br/>

# 12. Youtube Link Finder

You and your friends like to share YouTube links all throughout the day. You want to keep track of all the videos you watch in your own personal notepad, but you find that keeping the entire link is unnecessary.
Keep the video ID (the combination of letters and numbers at the end of the link) in your notepad to slim down the URL.

### :bookmark_tabs: Task: <br/>
_Create a program that parses through a link, extracts and outputs the YouTube video ID._

**Input Format:** <br/>
_A string containing the URL to a YouTube video. The format of the string can be in "https://www.youtube.com/watch?v=kbxkq_w51PM" or the shortened "https://youtu.be/KMBBjzp5hdc" format._

**Output Format:** <br/>
_A string containing the extracted YouTube video id._

**Sample Input:** <br/>
_https://www.youtube.com/watch?v=RRW2aUSw5vU_

**Sample Output:** <br/>
_RRW2aUSw5vU_

<br/>

> ### 💡 Note that the input can be in two different formats.

0 comments on commit f6dec5c

Please sign in to comment.