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
Androidでスクレイピングした話 / Talk of scraping with Android
Search
futabooo
February 01, 2018
Technology
5.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Androidでスクレイピングした話 / Talk of scraping with Android
futabooo
February 01, 2018
More Decks by futabooo
See All by futabooo
Android Jetpack Navigation Deep Links Tips
futaboooo
0
630
チームの学びを活かす全社での取り組み / company wide efforts to make use of team's learning
futaboooo
1
750
ペアプロ・モブプロを広めるのに役立ったControl Chartの使い方 / How to use Control Chart which helped spread Pair or Mob Programing
futaboooo
2
340
スクラムチームをやめて、20人でカンバン運用してきた半年間の軌跡 / Stop Scrum Start Kanban
futaboooo
19
19k
InvisionのAndroidアプリでみる4つのデザイン基本原則 / Four design basic principles seen in Invision's Android application
futaboooo
2
2.5k
Pairsの開発のすべて / all of Pairs development
futaboooo
1
2.7k
モブプログラミングという開発スタイル、あるいは生産性について / On development style called mob programming, or productivity
futaboooo
5
9k
新人スクラムマスターが開発者と兼任しながらやってきた事と成果/What the newcomer Scrum Master came while concurrently serving as a developer and the result
futaboooo
1
2k
What I did for Google IO since then
futaboooo
1
470
Other Decks in Technology
See All in Technology
AIレビューはどこまで任せられるのか?自動化と人が背負うレビューの境界
sansantech
PRO
2
770
関数型の考えを TypeScript に持ち込んで、テストしやすい純粋関数を増やす / Pure at the Core, Effects at the Edge: Bringing Functional Thinking into TypeScript
kaminashi
1
110
Claude Code 珍プレー好プレー
shinyasaita
0
330
“それは自分の仕事じゃない"を越えて行け
yuukiyo
0
210
Compose 新機能総まとめ / What's New in Jetpack Compose
yanzm
0
180
Keeping applications secure by evolving OAuth 2.0 and OpenID Connect
ahus1
PRO
1
160
AI時代の EM への処方箋
staka121
PRO
0
140
プロダクトだけじゃない、社内プロセスにおける自動化・省力化ノススメ
kakehashi
PRO
1
3.7k
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
150
しぶいSRE: サーバから見えない障害にどう向き合うか。ラストワンマイルのデバッグ実践 / Shibui SRE
kanny
13
6.1k
人を動かすのは時間ではなく、納得感 〜新任EMが入社3ヶ月、組織を2回変えた話〜
kakehashi
PRO
3
220
クラウド上のデータ復旧で見落としがちな制約: 医療系 SaaS の BCP 設計から得た教訓
kakehashi
PRO
0
3.4k
Featured
See All Featured
How to make the Groovebox
asonas
2
2.3k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
300
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Ethics towards AI in product and experience design
skipperchong
2
330
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
260
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
220
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
190
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
600
Transcript
@futabooo Connehito Marché #1ʙAndroidࢢʙ #ConnehitoMarche AndroidͰεΫϨΠϐϯάͨ͠
2 About me 4FOJPS&OHJOFFS4DSVN.BTUFSBUFVSFLB *OD +BWB ,PUMJO (PMBOH
5ZQF4DSJQU "OHVMBS+4 'BOUBTZ&BSUI;FSP T$3:FE 4QMBUPPO GVUBCPPP ɹɹɹೋ ོߒʢTakahiro Futagawaʣ
3 About eureka ैۀһ ໊ʢฏۉྸࡀʣ ࣄۀ༰
ࣗࣾαʔϏεاըɾ։ൃɾӡӦ 1BJST $PVQMFT ձࣾ֓ཁ
4 About eureka
ࠓͷ
https://droidkaigi.jp/2018/proposals
Έͳ͞ΜຊΛಡΜͩ͋ͱͲ͏͠·͔͢ʁ
ಡΜͩ༰Λه͓͖ͯͨ͘͠ͳΓ·ͤΜ͔ʁ
https://bookmeter.com/
10 ಡॻϝʔλʔ ಡΜͩຊΛײͱͱʹهͰ͖Δ ಡΜͩྔΛཧ͢Δ͜ͱ͕Ͱ͖Δ
AndroidΞϓϦ͕ͳ͍
ͳ͚Εͭ͘Ε͍͍
࡞ͬͨ
࣮ͷհ
15 ࣮ͷհ KIZKTPVQ +BWB)5.-1BSTFS XJUICFTUPG%0. $44 BOEKRVFSZ
ϩάΠϯը໘
interface LoginService { @GET("/login") fun get(): Observable<ResponseBody> @FormUrlEncoded @POST("/login") fun
login( @Field("session[email_address]") mail: String, @Field("session[password]") password: String, @Field("authenticity_token") authenticityToken: String): Observable<ResponseBody> }
retrofit.create(LoginService::class.java).get() .flatMap { val reader = BufferedReader(InputStreamReader(it.byteStream())) val result =
reader.readLines().filter(String::isNotBlank).toList() val token = Jsoup.parse(result.toString()) .select("form input[name=authenticity_token]").attr("value") } .subscribeBy( onNext = { val reader = BufferedReader(InputStreamReader(it.byteStream())) val result = reader.readLines().filter(String::isNotBlank).toList() val alert = Jsoup.parse(result.toString()) .select(“div.container li.bm-flash-item—alert").isNotEmpty() if (alert) { Timber.i("E-mail or Password is wrong") contract.failureLogin() return@subscribeBy } }, onError = { Timber.e(it, it.message) } )
ར༻ͨ͠πʔϧ
postman, Charles, Chrome dev tool
ϋϚͬͨͱ͜Ζ
ಥવͷ༷มߋ❗
23 ಥવͷ༷มߋ ظٳΈ໌͚ʹΞϓϦʹϩάΠϯͰ͖ͳ͘ͳͬͨ ৽͍͠ηΩϡϦςΟରࡦͰ3FRVFTUʹ5PLFO͕ඞཁʹͳ͍ͬͯͨ εΫϨΠϐϯάͳͷͰͳΤϥʔ͕ฦ͞ΕΔΘ͚Ͱͳ͍ ௐࠪʹ̍ि͔͚ؒͯमਖ਼
·ͱΊ
25 ·ͱΊ "OESPJEΞϓϦ͕ແ͍͚Ͳ͍͍ͨαʔϏε͕͋ͬͨΒ࡞ͬͪΌ͑ྑ͍ ͱ͍͑εΫϨΠϐϯάಥવͷ༷มߋͰ͙͢ࢮ͵ ΞϓϦͷίʔυHJUIVCެ։ͯ͠·͢ GVUBCPPP#PPL-JGF
Credit: NASA Earth Observatory/NOAA NGDC Thank you :)