How to use Golang download YouTube video

How to use Golang download YouTube video

by Evan Lin @Golang Taipei Meetup #49

2102a6b8760bd6f57f672805723dd83a?s=128

line_developers_tw

May 26, 2020
Tweet

Transcript

  1. How to use Golang download YouTube video LINE Developer Relations

    Evan Lin 2020.05 1
  2. Evan Lin • Google Developer Expert • LINE Developer Meetup

    • LINE TAIWAN TECHPULSE Organizer LINE Technology Evangelist 2
  3. 3

  4. How to get Youtube Video Info? https://www.youtube.com/watch?v=rFejpH_tAHM https://youtube.com/get_video_info?video_id=rFejpH_tAHM 4

  5. How to get Youtube Video Info? 5

  6. RAW Data 6

  7. How to parse with Query Parameter 7

  8. Get Video Author and Title How to handle JSON value

    without structure data. 8
  9. Let’s find the video download link 9

  10. How to process JSON data from Web Jsonlint.com à Paste

    and copy on text editor à Json to Go 10
  11. Using the file download link… 11

  12. Using the file download link… (what?) No url??? But new

    ”cipher”? 12
  13. Finally … https://stackoverflow.com /questions/60607291/you tube-video-downloader- with-php 13

  14. Look into browser player related setting https://www.youtube.com/embed/FHpvI8oGsuQ?hl=en https://www.youtube.com/s/player/e3cd195e/player_ias.vflset/en_US/base.js 14

  15. Make it simple … “string” EQ(“string”, 3) è c =

    ‘s’ è a[0] = a[2] = `r` è a[2] = `s` à “rtsing” 15
  16. Decipher :Operation 16

  17. Decipher : Parse Ops and Args https://github.com/kkdai/youtube/blob/master/decipher.go#L12 17

  18. Looking for contributors 18 https://github.com/kkdai/youtube

  19. LINE TECH FRESH https://engineering.linecorp.com/zh-hant/blog/tech-fresh-2020/ 19

  20. 20

  21. Q&A 21