Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
自家製オタクソリューションの紹介
Search
tondol
July 29, 2015
Programming
1
470
自家製オタクソリューションの紹介
Archive everything you want
tondol
July 29, 2015
Tweet
Share
More Decks by tondol
See All by tondol
ちいさく始めるレイヤードアーキテクチャ
tondol
7
1.8k
RxSwift 3.3.0: Observable のフレンズが増えました!!
tondol
2
2.4k
Amazon Cloud Driveのご紹介
tondol
0
460
ドはDockerのド
tondol
1
2.7k
Other Decks in Programming
See All in Programming
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
130
Vue.js学習の振り返り
hiro_xre
2
130
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
910
Piniaの現状と今後
waka292
5
1.4k
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
420
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
480
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
16
4k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
260
Progressive Web Apps für Desktop und Mobile mit Angular (Hands-on)
christianliebel
PRO
0
110
Featured
See All Featured
Producing Creativity
orderedlist
PRO
341
39k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
We Have a Design System, Now What?
morganepeng
50
7.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Facilitating Awesome Meetings
lara
49
6k
Transcript
W8LT#04 ࣗՈΦλΫιϦϡʔγϣϯͷհ @tondol 2015-07-29 (Wed.)
Self Introduction @tondol ܭࢉֶઐ߈M2 ˓˓ݚڀࣨ ˠˠେࡕˠౡˠ໊ݹˠ ˠʢΠϚίίʣˠࡳຈˠઋˠ • ୭͔50ສԁ͘Ε •
ࠓظͷϥϒϥΠϒʂ
Self Introduction @tondol ܭࢉֶઐ߈M2 ˓˓ݚڀࣨ ˠˠେࡕˠౡˠ໊ݹˠ ˠʢΠϚίίʣˠࡳຈˠઋˠ • ୭͔50ສԁ͘Ε •
ࠓظͷϥϒϥΠϒʂ
എܠ • ΦλΫଟ – ΠϕϯτࢀՃ – ΞϧόΠτ – ݚڀ – W8LTͷࢿྉ࡞ • ࡏίϯςϯπ – ΞχϝɾϥδΦɾχίੜ
– ϦΞϧλΠϜʹফԽͰ͖ͳ͍͜ͱ͋Δ – ظؒݶఆίϯςϯπͷݫ͠͞
Archive everything you want
͜ͷੈʹଘࡏ͢Δ͢ ͯͷظؒݶఆίϯςϯ πΛΞʔΧΠϒ͍ͨ͠
ఏҊ • NicoAnime – χίχίͷΞχϝνϟϯωϧΛొ – ֤Τϐιʔυ͕ࣗಈΞʔΧΠϒ͞ΕΔ • NicoKako –
ಛఆͷχίχίੜ์ૹΛొ – λΠϜγϑτػೳͰμϯϩʔυ • koeradi – ಛఆͷωοτϥδΦΛԻ • ֤αʔϏεͷنతʹ……ʁ
NicoAnime
֓ཁ • Ϣʔβʔ͕νϟϯωϧΛొ – ֤Ϋʔϧͷॳճ৴ظؒʹΔ • ఆظతʹcrawler͕ొಈըΛ֬ೝ – ߋ৽͕͋ΕDLϦετʹೖΕΔ • ఆظతʹdownloader͕ಈըΛDL – DLϦετʹ͋ΔͷΛΞʔΧΠϒ͢Δ
• Ϣʔβʔͷૢ࡞ΣϒͰ݁ – ಈըͷ࠶ੜɾϩʔΧϧͷDLՄೳ
σϞ
ߏ crawler (Ruby) downloader (Ruby) Niconico Live DB (MySQL) frontend
(PHP) file system crontab nginx, php-fpm
ٕज़తৄࡉ(1) • NiconicoͷϩάΠϯ – secure.nicovideo.jp/secure/login – ্هʹIDͱύεϫʔυΛPOST͢Δ – Ϩεϙϯεͷset-cookieϔομ͔Β user_sessionΛऔಘ͠هԱ͢Δ • getflv/getthumbinfo – ಈըϝλσʔλΛऔಘ͢ΔAPI
– user_sessionΛcookieͰૹ৴ͭͭ͠get – GETύϥϝʔλ/XMLϑΥʔϚοτ
ٕज़తৄࡉ(2) • watch – user_sessionΛcookieͰૹ৴ͭͭ͠GET – Ϩεϙϯεͷset-cookieϔομ͔Β historyΛऔಘ͠هԱ͢Δ • μϯϩʔυ – user_session, historyΛcookieͰૹ৴ͭͭ͠
getflvͰऔಘͨ͠ಈըURLΛGET
ิ • Niconico APIʹؔ͢Δৄࡉ – https://github.com/tondol/NicoVideo • ࿈ଓ࠶ੜ੍ݶͱ͔ը࣭ͱ͔ ϓϨϛΞϜ͡Όͳ͍ͱΩπ͍ͱࢥ͏ – ݄500ԁޡࠩ
NicoKako
֓ཁ • Ϣʔβʔ͕χίχίੜ์ૹΛొ – λΠϜγϑτՄೳظؒʹΔ – DLϦετʹՃ͞ΕΔ • ఆظతʹdownloader͕ಈըΛDL – DLϦετʹ͋ΔͷΛΞʔΧΠϒ͢Δ • Ϣʔβʔͷૢ࡞ΣϒͰ݁
– ಈըͷ࠶ੜɾϩʔΧϧͷDLՄೳ – λΠϜγϑτ༧ཧػೳ
σϞ
ߏ downloader (Ruby) Niconico Live DB (MySQL) frontend (PHP) file
system crontab nginx, php-fpm
ٕज़తৄࡉ(1) • NiconicoͷϩάΠϯ – লུ • getplayerstatus – χίੜͷϝλσʔλΛऔಘ͢ΔAPI – user_sessionΛcookieͰૹ৴ͭͭ͠GET – XMLϑΥʔϚοτ – λΠϜγϑτDLʹඞཁͳύϥϝʔλͳͲ
ٕज़తৄࡉ(2) • λΠϜγϑτDL – rtmpeϓϩτίϧͰͷ৴ – getplayerstatusͷϨεϙϯεΛݩʹDLʹඞཁͳ ύϥϝʔλΛߏ͢Δ – ύϥϝʔλΛrtmpdumpʹ͢
– DLঢ়گ͕100%ʹͳΔ·ͰϨδϡʔϜ • ҙ – ظݶΕͷੜ์ૹDLෆՄ – ՝ۚࡁΈͳΒ༗ྉੜ์ૹಉ͡ํ๏ͰDLՄೳ
ิ • λΠϜγϑτDLʹؔ͢Δৄࡉ – https://gist.github.com/tondol/7039259 • λΠϜγϑτ༧ͷ্ݶͱ͔λΠϛϯά ͱ͔ϓϨϛΞϜ͡Όͳ͍ͱΩπ͍ͱࢥ͏ – ݄500ԁޡࠩ
koeradi
֓ཁ • ωοτϥδΦΛDL͢ΔεΫϦϓτ܊ – ରԠہɿ A&GɾڹɾϦεϥδɾradikoɾϫϩοϓ – ؆қWeb UIΛඋ͑Δ • Ի͍ͨ͠์ૹຖʹcrontabʹهड़ – ִि৴ͱ͔໘͔ͩΒඇରԠ
– ݱࡏ14ϓϩάϥϜ/ि΄ͲΞʔΧΠϒӡ༻த
σϞ
ߏ downloader(s) (Ruby/bash) net radio server(s) frontend (PHP) file system
crontab nginx, php-fpm
ٕज़తৄࡉ • ༻πʔϧ – rtmpdump/ffmpeg/swftools – rtmpdump: rtmpϓϩτίϧʹΑΔDL – ffmpeg: HLSϓϩτίϧʹΑΔDL, ม – swftools:
radikoͷpartialkeyऔಘ༻ • εΫϦϓτ – RubyͩͬͨΓbashͩͬͨΓ – ઃఆϑΝΠϧdotenvʹهड़
ิ • radikoʹؔ͢Δৄࡉ – http://kyoshiaki.hatenablog.com/entry/ 2014/05/04/184748 • ํͷϥδΦΛฉ͘ͳΒ radikoϓϨϛΞϜΛܖ͠·͠ΐ͏ – ݄300ԁޡࠩ
NicoAnime NicoKako koeradi
Q and A?