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
480
自家製オタクソリューションの紹介
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.5k
Amazon Cloud Driveのご紹介
tondol
0
470
ドはDockerのド
tondol
1
2.7k
Other Decks in Programming
See All in Programming
Zoneless Testing
rainerhahnekamp
0
120
fs2-io を試してたらバグを見つけて直した話
chencmd
0
220
103 Early Hints
sugi_0000
1
220
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
バグを見つけた?それAppleに直してもらおう!
uetyo
0
170
ドメインイベント増えすぎ問題
h0r15h0
1
170
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
170
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
690
CSC509 Lecture 14
javiergs
PRO
0
130
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
110
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
44
13k
A designer walks into a library…
pauljervisheath
204
24k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
The Pragmatic Product Professional
lauravandoore
32
6.3k
A Philosophy of Restraint
colly
203
16k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Agile that works and the tools we love
rasmusluckow
328
21k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
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?