Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 17 lines (13 sloc) 446 Bytes
#!/bin/sh
# This script takes a show ID (which has two parts for some reason) and lists the IDs of the episodes
show_id="$1"
list_url="http://www.icefilms.info/tv/series/$show_id"
curl -s "$list_url" | ruby -rnokogiri -e '
Nokogiri::parse(STDIN.read).at("span.list").search("a").each do |item|
if item["href"]
id = item["href"][/[0-9]+/]
# Use to_i to only accept the numeric ids
puts id + " " + item.content if id.to_i != 0
end
end
'