Anyone knows a tool to scrape youtube links?

eunicemartinez_21

Senior Member
Joined
Oct 8, 2009
Messages
952
Reaction score
239
Can anyone suggest me a tool that can scrape youtube links?

For example I want to scrape all the youtube links for a certain channel then save it.

Is there any free tool that can do this?

Thanks
 
what you mean links? links from the descriptions of videos or what links?
 
i can make a tools to scrape youtube video id from any channel that you want
pm me if you really want this bot...
 
Code:
#!/usr/bin/ruby
require 'rubygems'
require 'mechanize'

agent=Mechanize.new
output=File.new("#{ARGV[0]}.txt", 'w')

i=1
loop do
	page=agent.get("hXXp://youtube.com/user/#{ARGV[0]}/videos", {'sort'=>'dd', 'view'=>'u', 'page'=>i})
	links=page.links_with(:href=>/watch/).map { |link| link="hXXp://youtube.com#{link.href.gsub(/&.*$/, '')}\n" }
	links.uniq!
	if links.size>2
		links.each { |link| output.write(link) }
	else
		break
	end
	i+=1
end

output.close
 
Back
Top