################################################################
#
# ERINSBOROUGH
#
# Version 3.1
# Author: kaolincash, neuralwarp
# Date: 17th June 2016
# Email: kaolin@maia.cash
#
# Special thanks to: the Tin Man, newmaritk1
#
################################################################
require 'open-uri'
require 'net/ftp'
require 'date'
current_time = DateTime.now
time = current_time.strftime "%d/%m/%Y %H:%M"
tmpdir = 'tmp'
tmpfile = tmpdir + '/tmp.tmp'
unless Dir[tmpdir].empty?
File.delete tmpfile
Dir.rmdir tmpdir
end
ramsay = open('http://www.dailymotion.com/user/newmaritk1/search/Neighbours/1')
text = ramsay.read.downcase
ramsay.close
Dir.mkdir "tmp"
path = "tmp"
street = open("./tmp/tmp.tmp", "w")
street.write '
Ramsay Street
'
id = []
5.times {
video = text.match(/\" href=\"\/video\/([a-z0-9]+)\D+(\d+)/)
break unless video
id += [$1]
text = $'
}
id.reverse.each {|episode|
street.write '