タグ

scrapiに関するshidhoのブックマーク (2)

  • 初めてのWeb Scraping - Lyo.blog

    バイト先でスクレイピングをすることになりそうだ。 Javaでwebページの解析をしたら日が何回も沈みそうだし(というか、解析元のhtmlが汚くて読めねぇ( つД`))、言語は何でもいいらしいので、最近やたら見かけるperlのWeb::Scraper(ドキュメント)を使ってみることにした。 今日はそれのメモ。 まず、Web::Scraperに慣れるために題材はオレのソーシャルブックマーク一覧のページに右あるtagの名前と数を抜き出すことにする。 とりあえず、htmlの該当箇所の <div id="sidebar" class="list"><div class="sidebar-inner"> <ul class="bundles"> <li class="bundle fold"><h3 class="label"><span>tags</span></h3> <ul> <li><span

    shidho
    shidho 2007/12/12
    入れ子な構造の場合はこうするのか。
  • scrAPI Cheat Sheet

    Selectors *any element Ean element of type E E.warningan E element whose class is "warning" (the document language specifies how class is determined). E#myidan E element with ID equal to "myid". E[foo]an E element with a "foo" attribute E[foo="bar"]an E element whose "foo" attribute value is exactly equal to "bar" E[foo~="bar"]an E element whose "foo" attribute value is a list of space-separated v

    shidho
    shidho 2007/12/12
    とりあえず。
  • 1