綾小路龍之介の素人思考

ミニまぐ http://mini.mag2.com/

"http://mini.mag2.com/pc/m/M0002216.html"のようなURLの場合、これの"http://mini.mag2.com/pc/m/"の部分を、"wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id="のように置換し、この後に続くマガジンIDを残して、".html"の部分を"&PC=" http://regist.mini.mag2.com/r/servlet/Ma"のように置換します。つまり、Perlスクリプト的にはこんな感じです。

open IN,"mag.txt";
while(<IN>){
  s/http:\/\/mini.mag2.com\/pc\/m\/(.*)\.html/wget --post-data=\"e=MAILADDRESS\@MAILADDRESS.COMP&id=$1&PC=\" http:\/\/regist.mini.mag2.com\/r\/servlet\/Ma/;
  print;
}
close IN;
path "C:\Program Files\GnuWin32\bin"
path "D:\temp_prog\wget-1.10.1-bin\bin"
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048769&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048718&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048746&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048744&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048723&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048751&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048750&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048693&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048792&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048724&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048741&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048795&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048760&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048735&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048069&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048029&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0047998&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0047989&PC=" http://regist.mini.mag2.com/r/servlet/Ma
wget --post-data="e=MAILADDRESS@MAILADDRESS.COMP&id=M0048072&PC=" http://regist.mini.mag2.com/r/servlet/Ma

ソーシャルブックマーク

  1. はてなブックマーク
  2. Google Bookmarks
  3. del.icio.us

ChangeLog

  1. Posted: 2006-04-17T06:51:49+09:00
  2. Modified: 2006-04-17T10:32:44+09:00
  3. Generated: 2017-01-29T23:09:17+09:00