SlideShare a Scribd company logo
Android
爬蟲與 Web 的三兩兩事
Takuma@Android Study Group
Takuma不上班
Takuma不⼯工作
Takuma宅在家
Takuma沒錢了了
Takuma開始找⼯工作
1
Takuma Lee@Android Study Group
vmgsahm1@gmail.com
Individual App Developer@⾃自宅警備員
Today’s source code
http://bit.ly/webview-javascript-sample
APK展⽰示:https://play.google.com/store/apps/details?id=idv.kuma.app.komica
Or
Google Play 上搜尋 「Komica」
Licensed under the Charlie Tsai
2
Android Developer 開發讀書會
• 瘋狂熱愛(?) Android 的⼀一群⼈人聚集的社群
• 社群中常發⽣生寫⼀一寫 Android 就跳去寫 iOS 最後變成 iOS ⼯工程師的事件
• 設立:2013 / 09
• 社群⼈人數:7050(DevFest 時 6745)
• Google Community Group
• 每週三舉辦線下聚會
• 每⽉月舉辦⽉月會(主題不限)
3
Android Crawler Web
如何找到讀書會
• FB 社群:http://bit.ly/TADSG_FB
• Github:https://github.com/TADSG
• Meetup:https://www.meetup.com/Taiwan-
Android-Developer-Study-Group/
• Telegram:http://bit.ly/TADSG_Telegram
Agenda
• Tools
• 坑
6
Agenda
• Tools
• Tools - JavaScript
• 坑
7
Agenda
• Tools
• Tools - JavaScript
• Tools - WebDriver
• 坑
8
Tools(1)
• Jsoup
• Facebook Stetho
• PostMan
• AndroidNetworking library
• https://github.com/amitshekhariitbhu/Fast-Android-Networking
9
Jsoup
compile group: 'org.jsoup', name: 'jsoup', version: '1.8.3'
10
• Document
• Elements
• Element
11
12
Facebook Stetho
• http://facebook.github.io/stetho/
13
14
15
16
17
Facebook Stetho
Demo
18
Tools(2)- JavaScript
• Duktape for Android
• https://github.com/square/duktape-android
• Js Evaluator for Android
• https://github.com/evgenyneu/js-evaluator-for-android
• WebView
• Custom Tab
• https://github.com/GoogleChrome/custom-tabs-client
• Chromium
19
Tools(3)- WebDriver
• https://github.com/dhamaniasad/
HeadlessBrowsers
• HtmlUnit-Driver
• Selendroid
• Selenium
20
坑
• 非靜態網⾴頁(non static website)
21
坑
• 非靜態網⾴頁(non static website)
• iframe
22
坑
• 非靜態網⾴頁(non static website)
• iframe
• callback value(google reCAPTCHA[iframe])
23
24
reCaptcha
• iframe
25
reCaptcha
• iframe
26
reCaptcha
• iframe
• callback value
27
• https://blog.kaspersky.com.cn/googles-recaptcha-defeated-by-
security-researchers/4144/
• 此篇⽂文章中說道破解 Google reCaptcha 需要 19 秒的時間
• 繞過驗證碼成功率超過 70%
28
Tools(2)- JavaScript
• Duktape for Android
• https://github.com/square/duktape-android
• Js Evaluator for Android
• https://github.com/evgenyneu/js-evaluator-for-android
• WebView
• Custom Tab
• https://github.com/GoogleChrome/custom-tabs-client
• Chromium
29
Tools(2)- JavaScript
• Duktape for Android(⽬目前未成功讀取整個網⾴頁資料)
• https://github.com/square/duktape-android
• Js Evaluator for Android
• https://github.com/evgenyneu/js-evaluator-for-android
• WebView
• Custom Tab
• https://github.com/GoogleChrome/custom-tabs-client
• Chromium
30
Tools(2)- JavaScript
• Duktape for Android
• https://github.com/square/duktape-android
• Js Evaluator for Android(Android YoutubeExtractor)
• https://github.com/HaarigerHarald/android-youtubeExtractor
• https://github.com/evgenyneu/js-evaluator-for-android
• WebView
• Custom Tab
• https://github.com/GoogleChrome/custom-tabs-client
• Chromium
31
Tools(2)- JavaScript
• Duktape for Android
• https://github.com/square/duktape-android
• Js Evaluator for Android
• https://github.com/evgenyneu/js-evaluator-for-android
• WebView(⽬目前使⽤用中)
• https://github.com/TakumaMochizuki/Komica/blob/develop/app/src/main/java/idv/kuma/app/komica/fragments/
SectionDetailsFragment.java
• http://bit.ly/webview-javascript-sample
• Custom Tab
• https://github.com/GoogleChrome/custom-tabs-client
• Chromium
32
Tools(2)- JavaScript
• Duktape for Android
• https://github.com/square/duktape-android
• Js Evaluator for Android
• https://github.com/evgenyneu/js-evaluator-for-android
• WebView
• Custom Tab(待研究, Google 曾表⽰示速度比 WebView 快上許多)
• https://github.com/GoogleChrome/custom-tabs-client
• Chromium(最後研究 == 不研究)
33
34

More Related Content

PPTX
2017.02.22 android taipei
PDF
FcmD2D
PPTX
2017.03.20 android taipei
PPTX
Leakcanary tool
PDF
Orm各library效能分析與使用
PDF
Firebase Cloud Messaging Device to Device
PPTX
Android動態ui介面設計
PDF
Proguard by android studio
2017.02.22 android taipei
FcmD2D
2017.03.20 android taipei
Leakcanary tool
Orm各library效能分析與使用
Firebase Cloud Messaging Device to Device
Android動態ui介面設計
Proguard by android studio

Viewers also liked (19)

PPTX
Hybrid design with bootstrap
PPTX
Custom view2
PDF
ORMLite Android
PPTX
Dog point
PPTX
PDF
設計師合作經驗分享
PDF
RxJava With retrolambda
PDF
Unit test and ui testing with cucumber
PPTX
FCM & GCM
PPTX
Android Animator
PPTX
付不出期刊費的時候,貧窮學生、科學家如何解決?
PDF
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
PDF
Visual Studio Code 快速上手指南
PPTX
大型 Web Application 轉移到 微服務的經驗分享
PDF
Kotlin 初體驗
PDF
[系列活動] 機器學習速遊
PPTX
State of art
PDF
Big-tent UX (UX Camp West 2016)
PDF
Hype vs. Reality: The AI Explainer
Hybrid design with bootstrap
Custom view2
ORMLite Android
Dog point
設計師合作經驗分享
RxJava With retrolambda
Unit test and ui testing with cucumber
FCM & GCM
Android Animator
付不出期刊費的時候,貧窮學生、科學家如何解決?
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
Visual Studio Code 快速上手指南
大型 Web Application 轉移到 微服務的經驗分享
Kotlin 初體驗
[系列活動] 機器學習速遊
State of art
Big-tent UX (UX Camp West 2016)
Hype vs. Reality: The AI Explainer
Ad

Similar to Android Crawler Web (9)

PDF
Android 雜談開發 報價 法規0001
PDF
《氪周刊》(第85期)
PDF
《氪周刊》(第85期)
PDF
《氪周刊》(第85期)
PDF
[幻灯片版]《氪周刊:关注互联网创业》(第16期)
PDF
Google,产品线与开源相关
PDF
Pre show 20110828
PPTX
Android app 入門第一步
PDF
氪周刊:关注互联网创业》(第56期)
Android 雜談開發 報價 法規0001
《氪周刊》(第85期)
《氪周刊》(第85期)
《氪周刊》(第85期)
[幻灯片版]《氪周刊:关注互联网创业》(第16期)
Google,产品线与开源相关
Pre show 20110828
Android app 入門第一步
氪周刊:关注互联网创业》(第56期)
Ad

Android Crawler Web