This was supposed to be a quick procedure, but stuff like this inexplicably didn’t work:
#DOESN'T WORK; retrieves the same page repeatedly.
25.times do |i|
command = <<-EOF
curl --cookie "my/cookies.txt" "http://www.netflix.com/MoviesYouveSeen?so=1&sc=0&lnkctr=ListSort_0&pageNum=#{i}" > #{i}.htm
EOF
puts command
system(command)
end
At least parsing the pages did:
movies = {}
while line = gets
title = $1 if line =~ %r|<div class="list-title">.*>(.*)</a>|
movies[title] = $1 if line =~ %r|class=star alt="(d).d+ Stars">|
end
movies.keys.sort.each do |title|
puts [title, movies[title]].join(”t”)
end
Once I looked everything over, there were a couple in there that simply didn’t make sense (but that reflected the ratings on the Netflix site). Either my mouse slipped, or Diana rated a couple. Anyway, here’s where my Netflix ratings stand as of now:
Continue Reading »