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
LigthingTalk: Sinatra + Hpricot
Search
Duke
September 18, 2010
Programming
110
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
LigthingTalk: Sinatra + Hpricot
Uma LigthingTalk no #GuruSP, um das minha primeiras apresetações
Duke
September 18, 2010
Transcript
22 slides
$ ruby app.rb Raspando dados com Sinatra e Hpricot
{ name: 'Emerson Vinicius', github: 'emersonvinicius ' }
Sinatra
require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end
require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end
require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end
require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end
Hpricot
None
require 'rubygems' require 'open-uri' require 'hpricot' url = 'http://br.weather.yahoo.com/brazil/sao-paulo/sao- paulo-455827/'
tempo = Hpricot(open(url).read) (tempo/"[@id='yw-temp']").inner_text // 27°
require 'rubygems' require 'open-uri' require 'hpricot' url = 'http://br.weather.yahoo.com/brazil/sao-paulo/sao- paulo-455827/'
tempo = Hpricot(open(url).read) (tempo/"[@id='yw-temp']").inner_text // 27°
require 'rubygems' require 'open-uri' require 'hpricot' url = 'http://br.weather.yahoo.com/brazil/sao-paulo/sao- paulo-455827/'
tempo = Hpricot(open(url).read) (tempo/"[@id='yw-temp']").inner_text // 27°
require 'rubygems' require 'open-uri' require 'hpricot' url = 'http://br.weather.yahoo.com/brazil/sao-paulo/sao- paulo-455827/'
tempo = Hpricot(open(url).read) (tempo/"[@id='yw-temp']").inner_text // 27° #WIN
O que fazer com isso?
None
None
None
None
None
None
None
{ name: 'Emerson Vinicius', twitter: '@emersonvinicius', gtalk: 'duke.m16', github: 'emersonvinicius
' } Obrigado!
More Decks by Duke
See All by Duke
Docker
dukex
0
110
Lightning Talk: Testes em Javascript
dukex
0
140
Lightning Talk: Fluxo (básico) Ember 1.x.x
dukex
0
160
Concorrência em GO
dukex
0
93
Meetup Go - Como construi o uhuraapp.com
dukex
4
750
Realtime - Usando o MeteorJS
dukex
3
670
Como fazer API melhor que o governo?
dukex
1
780
Raspagem de Dados com Ruby
dukex
1
1k
Grid System com Amor
dukex
0
770
Other Decks in Programming
See All in Programming
Math.sumPreciseから学ぶ、ECMAScript仕様の数値の種類
syumai
1
1.7k
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
240
LLM 101
dalinaum
0
560
AppFunctionsの内部実装を紐解く
hiroaki404
1
130
初学者向け 分散トレーシングとDatadog
mtaka1222
0
120
テスト駆動開発から学ぶ 達人プログラマーの型 / TechRAMEN 2026 Conference
a_okui
0
3.2k
Apache Airflow Introduction
leew
1
100
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
470
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
320
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
250
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
Distance field of Julia set
kinakomoti321
0
340
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
710
Are puppies a ranking factor?
jonoalderson
2
4.2k
The untapped power of vector embeddings
frankvandijk
2
2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
WCS-LA-2024
lcolladotor
0
1k
Paper Plane (Part 1)
katiecoart
PRO
3
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
61k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Optimising Largest Contentful Paint
csswizardry
37
4k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
540