2006-06-21
Pythonで予約語を出力するには
Python |
![]()
>>> __import__('keyword').kwlist
['and', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'yield']
computerworld.jpとteacup AutoPageのEntryFullText
computerworld_jp.yaml
# upgrade http://www.computerworld.jp/rss/rss.rdf author: Masafumi Otsune handle: http://www\.computerworld\.jp/news/ extract: <!-- latest news -->(.*?)<!-- /latest news --> extract_capture: body
ap_teacup_com.yaml
# upgrade http://autopage.teacup.com/ author: Masafumi Otsune handle: http://\w+\.ap\.teacup\.com/\w+/\d\.html extract: (<div class="postbody">.*?)<div class="postcommtb"> extract_capture: body
こういう合理的な構造のサイトだったらextractは簡単。
コメント
トラックバック - http://subtech.g.hatena.ne.jp/otsune/20060621
