You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Batteries includedCrystal’s standard library comes with a whole range of libraries that let you start working on your project right away. Check the API docs # A very basic HTTP server require "http/server" server = HTTP::Server.new do |context| context.response.content_type = "text/plain" context.response.print "Hello world, got #{context.request.path}!" end address = server.bind_tcp(8080) puts "L
require 'yasuri' # "Rubyに関する新着投稿 - Qiita" を起点にする agent = Mechanize.new page = agent.get('http://qiita.com/tags/Ruby/items') # 最新3ページをスクレイピングする init_page = Yasuri.pages_init '//*[@id="main"]/div/div/div[1]/section/div[2]/ul/li[7]/a', limit:3 do # 現在のページ数 text_page_idx '//*[@id="main"]/div/div/div[1]/section/div[2]/ul/li[@class="active"]/a', proc: :to_i # 各エントリをスクレイピング struct_entries '//*[@id="main"
はじめに こんにちは.私はWebスクレイピングが大好きなのですが、Rubyでもっと簡単にスクレイピングができればと思い、ライブラリを書いてみました. ようやくREADMEとUSAGEが書けたので公開しようと思います. ソースはGithubで公開しています. 特にドキュメントの英語が大変怪しいので、つっこみいただけると喜びます. tac0x2a/yasuri gemでも公開しているので、以下のコマンドで簡単にお試しできます. 簡単なサンプルと解説を書いてみました. Yasuriでお手軽スクレイピング よろしければ使ってみてください>< Yasuri とは Yasuri (鑢) は簡単にWebスクレイピングを行うための、"Mechanize" をサポートするライブラリです. Yasuriは、スクレイピングにおける、よくある処理を簡単に記述することができます. 例えば、 ページ内の複数のリンクを
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く