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
LigthingTalk: Sinatra + Hpricot
Search
Duke
September 18, 2010
Programming
1
75
LigthingTalk: Sinatra + Hpricot
Uma LigthingTalk no #GuruSP, um das minha primeiras apresetações
Duke
September 18, 2010
Tweet
Share
More Decks by Duke
See All by Duke
Docker
dukex
0
77
Lightning Talk: Testes em Javascript
dukex
0
110
Lightning Talk: Fluxo (básico) Ember 1.x.x
dukex
0
110
Concorrência em GO
dukex
0
33
Meetup Go - Como construi o uhuraapp.com
dukex
4
670
Realtime - Usando o MeteorJS
dukex
3
590
Como fazer API melhor que o governo?
dukex
1
680
Raspagem de Dados com Ruby
dukex
1
920
Grid System com Amor
dukex
0
690
Other Decks in Programming
See All in Programming
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
最新TCAキャッチアップ
0si43
0
200
Quine, Polyglot, 良いコード
qnighy
4
650
距離関数を極める! / SESSIONS 2024
gam0022
0
290
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
CSC509 Lecture 09
javiergs
PRO
0
140
C++でシェーダを書く
fadis
6
4.1k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
900
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.2k
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Happy Clients
brianwarren
98
6.7k
The Language of Interfaces
destraynor
154
24k
Teambox: Starting and Learning
jrom
133
8.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
BBQ
matthewcrist
85
9.3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
It's Worth the Effort
3n
183
27k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Scaling GitHub
holman
458
140k
Transcript
$ 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!