Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ruby conf tw 2012 build your own web scrapper
Search
Dale Ma
December 08, 2012
Programming
740
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ruby conf tw 2012 build your own web scrapper
build your own web scrapper
Dale Ma
December 08, 2012
Other Decks in Programming
See All in Programming
最近”作らせてる” ローカルAIアプリの話
akit37
0
490
Simple Storage Service(S3) is not simple
iwatsukayura
0
310
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
360
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
200
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
600
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.2k
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
1.5k
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
A designer walks into a library…
pauljervisheath
211
25k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
350
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How to Ace a Technical Interview
jacobian
280
24k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Automating Front-end Workflow
addyosmani
1369
210k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Transcript
Build Your Own Web Scraper - Dale Ma @eguitarz 12年12月8日星期六
@eguitarz It’s fun to do something small and easy. 12年12月8日星期六
@eguitarz I always want to build a robot to serve
me. 12年12月8日星期六
@eguitarz Since making a robot is too difficult, so I
choose to make a web bot. 12年12月8日星期六
@eguitarz Today I’m talking about how do I build my
own web scraper in ruby. 12年12月8日星期六
@eguitarz Web scrapers have many uses. For example... 12年12月8日星期六
@eguitarz Up time survey, image collecting, automate web snapshots and
more... 12年12月8日星期六
@eguitarz Usually, there are many scrapers (threads) fired at the
same time. 12年12月8日星期六
@eguitarz So, first things first, I have to control the
threads. 12年12月8日星期六
@eguitarz I decide to write #threadpool to do this such
thing. 12年12月8日星期六
@eguitarz You can find that at https:// github.com/eguitarz/threadpool 12年12月8日星期六
@eguitarz Threadpool decides the life of each thread. 12年12月8日星期六
@eguitarz Now, let’s go for the main dish. 12年12月8日星期六
@eguitarz Web scrappers should be able to `grab page` and
`parse html tags`. 12年12月8日星期六
@eguitarz #Nokogiri is good at those things. 12年12月8日星期六
@eguitarz I use “Hash” to save parsed links. 12年12月8日星期六
@eguitarz There’s a problem, links stored in hash by threads.
But hash in ruby is not thread-safe... 12年12月8日星期六
@eguitarz #hamster helps me with this. 12年12月8日星期六
@eguitarz I use `Depth-Limited Search` algorithm for my scrapper. 3
2 1 1 12年12月8日星期六
@eguitarz What if the page needs javascript to render? 12年12月8日星期六
@eguitarz There’s a easy way... use browser to render the
html with javascript. 12年12月8日星期六
@eguitarz How? 12年12月8日星期六
@eguitarz #Waltir or #Selenium 12年12月8日星期六
Gonna show my little toy... 12年12月8日星期六
@eguitarz My scraper is on github at https:// github.com/eguitarz/macaron 12年12月8日星期六
@eguitarz The demo is simple, `you` can enhance or create
new one. 12年12月8日星期六
@eguitarz Wikipedia scraper, Facebook scraper... could be interesting! 12年12月8日星期六
THANKS! 12年12月8日星期六