{"id":629,"date":"2012-09-24T12:41:10","date_gmt":"2012-09-24T03:41:10","guid":{"rendered":"http:\/\/ts-engine.net\/?p=629"},"modified":"2012-09-24T12:41:10","modified_gmt":"2012-09-24T03:41:10","slug":"wordpress%e3%81%aeurl%e3%80%81title%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8bperl%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88%e4%bd%9c%e3%81%a3%e3%81%9f%ef%bc%81%ef%bc%88%e3%83%91%e3%83%bc","status":"publish","type":"post","link":"http:\/\/ts-engine.net\/?p=629","title":{"rendered":"wordpress\u306eURL\u3001title\u3092\u53d6\u5f97\u3059\u308bperl\u30b9\u30af\u30ea\u30d7\u30c8\u4f5c\u3063\u305f\uff01"},"content":{"rendered":"<p>\n\u4eca\u3001\u5199\u771f\u306b\u95a2\u3059\u308bweb\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u3063\u3066\u3044\u308b\u3002<br \/>\n\u305d\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u304a\u3044\u3066\u3001twitter\u3067wordpress\u306e\u904e\u53bb\u8a18\u4e8b\u3092\u3064\u3076\u3084\u304fbot\u3092\u4f5c\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3001\u300cwordpress\u306e\u904e\u53bb\u8a18\u4e8bURL\u300d\u3001\u300c\u904e\u53bb\u8a18\u4e8b\u306etitle\u300d\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067\u3001perl\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002<\/p>\n<p>\u4ee5\u4e0b\u3001\u4f5c\u696d\u30e1\u30e2\u3092\u8a18\u8f09\u3059\u308b\u3002\n<\/p>\n<p><!--more--><\/p>\n<h2>\n\u307e\u305a\u306f\u3001wordpress\u306e\u30d1\u30fc\u30de\u30cd\u30f3\u30c8\u30ea\u30f3\u30af\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b<br \/>\n<\/h2>\n<p>\n\u79c1\u306e\u5834\u5408\u306f\u3001<br \/>\n\u30ab\u30b9\u30bf\u30e0\u69cb\u9020\u306e\u300c\/archives\/%post_id%\u300d\u3068\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u4ed6\u306e\u8a18\u4e8b\u306f\u3001\u672b\u5c3e\u306e\u756a\u53f7(post_id)\u304c\u7570\u306a\u308b\u306e\u307f\u3068\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002<\/p>\n<h2>\n\u3042\u3068\u306f\u672b\u5c3e\u306e\u756a\u53f7\u3092\u3057\u3089\u307f\u3064\u3076\u3057\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3059\u308b<br \/>\n<\/h2>\n<p>\u672b\u5c3e\u306e\u756a\u53f7\u3092\u5909\u66f4\u3059\u308b\u306e\u307f\u3068\u306a\u308b\u306e\u3067\u3001\u3057\u3089\u307f\u3064\u3076\u3057\u306b\u30a2\u30af\u30bb\u30b9\u3092\u3057\u3066\u3001<br \/>\n\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9\u304c200\u306e\u307f\u306e\u3082\u306e\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u3002<br \/>\n\u7279\u306b\u3001\u79c1\u306e\u5834\u5408\u306f\u3001300\u4ee3\u306e\u756a\u53f7\u3057\u304b\u306a\u304b\u3063\u305f\u306e\u3067\u3001300\u301c400\u3067\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3053\u3053\uff08for\u306e\u30eb\u30fc\u30d7\u306e\u756a\u53f7\uff09\u306f\u9069\u5b9c\u756a\u53f7\u3092\u5909\u3048\u3066\u304f\u3060\u3055\u3044\u3002\n<\/p>\n<p>[perl]<br \/>\nuse warnings;<br \/>\nuse strict;<br \/>\nuse LWP;<br \/>\nuse LWP::UserAgent;<br \/>\nuse Encode qw(encode_utf8);<br \/>\nuse encoding &#8216;utf-8&#8217;;<\/p>\n<p>for (my $i=300;$i&lt;400;$i++){<br \/>\n        #\u3053\u3053\u306e$i\u306e\u5024\u306f\u9069\u5b9c\u5909\u66f4\u3059\u308b\u3053\u3068<br \/>\n\tmy $url = &quot;http:\/\/hogehoge.com\/archives\/$i&quot;;<br \/>\n\tmy $ua = LWP::UserAgent-&gt;new;<br \/>\n\t$ua-&gt;agent(&quot;TestApp\/0.1&quot;);<br \/>\n\tmy $request = new HTTP::Request(HEAD =&gt; $url);<br \/>\n\tmy $header = $ua-&gt;request($request);<br \/>\n\tif ($header-&gt;code== 200 ){<br \/>\n\t\tprint $header-&gt;code, &quot;\\n&quot;;<br \/>\n\t\tprint $url, &quot;\\n&quot;;<br \/>\n\t\tmy $reply = $ua-&gt;get($url);<br \/>\n\t\tmy $content = $reply-&gt;decoded_content;<br \/>\n\t\tif($content =~ \/&lt;title&gt;(.+)&lt;\\\/title&gt;\/){<br \/>\n\t\t\tmy $title = $1;<br \/>\n\t\t\tprint $title;<br \/>\n\t\t}<br \/>\n\t}<br \/>\n[\/perl]<\/p>\n<h2>\n\u6ce8\u610f<br \/>\n<\/h2>\n<p>\n\uff16\u884c\u76ee\u306b\u3042\u308b\u300cuse encoding &#8216;utf-8&#8217;;\u300d<br \/>\n\u3092\u5fd8\u308c\u305a\u306b\u8a18\u8f09\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u3053\u308c\u3092\u5fd8\u308c\u308b\u3068\u3001Wide character in print at\u306e\u30a8\u30e9\u30fc\u304c\u3067\u3066\u3057\u307e\u3044\u307e\u3059\u306e\u3067\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u3001\u5199\u771f\u306b\u95a2\u3059\u308bweb\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u3063\u3066\u3044\u308b\u3002 \u305d\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u304a\u3044\u3066\u3001twitter\u3067wordpress\u306e\u904e\u53bb\u8a18\u4e8b\u3092\u3064\u3076\u3084\u304fbot\u3092\u4f5c\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3001\u300cwordpress\u306e\u904e\u53bb\u8a18\u4e8bURL\u300d\u3001\u300c\u904e\u53bb\u8a18\u4e8b\u306etitle\u300d\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067\u3001perl\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002 \u4ee5\u4e0b\u3001\u4f5c\u696d\u30e1\u30e2\u3092\u8a18\u8f09\u3059\u308b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,20,6,7,16,25,18],"tags":[28],"class_list":["post-629","post","type-post","status-publish","format-standard","hentry","category-perl","category-20","category-6","category-7","category-16","category-25","category-18","tag-perl"],"_links":{"self":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=629"}],"version-history":[{"count":0,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/629\/revisions"}],"wp:attachment":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=629"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}