while lined = filed.gets
fh = File.new("out.txt", "a") #是追加
if lined=~/^>/
fh.puts lined
else
require 'watir'
include Watir
ie = Watir::IE.new
ie.goto("http://www.imtech.res.in/raghava/eslpred/submit.html")
ie.text_field(:name, "seq").set(lined)
ie.button(:value, "Submit sequence").click
aFile = File.new("lei.htm" , "w")
aFile << ie.html
aFile.close
ie.close
#2
File.open("lei.htm") do |file|
while line = file.gets
if line=~/Reliability Index|Expected Accuracy/
line=line.gsub(/
fh.puts line
end
end
end
end
end
end
没有评论:
发表评论