<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Renaud Bourassa &#187; FilesTube</title>
	<atom:link href="http://renaudbourassa.com/blog/tag/filestube/feed/" rel="self" type="application/rss+xml" />
	<link>http://renaudbourassa.com/blog</link>
	<description>Welcome to my World. Here, I am the Architect.</description>
	<lastBuildDate>Thu, 19 Jan 2012 05:45:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Release of RSDownloader 0.2.0</title>
		<link>http://renaudbourassa.com/blog/2009/04/22/release-of-rsdownloader-020/</link>
		<comments>http://renaudbourassa.com/blog/2009/04/22/release-of-rsdownloader-020/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 03:52:32 +0000</pubDate>
		<dc:creator>Rhino</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[FilesTube]]></category>
		<category><![CDATA[RapidShare]]></category>
		<category><![CDATA[RSDownloader]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://renaudbourassa.com/blog/?p=275</guid>
		<description><![CDATA[It is here! After some development during the exam session and a final revision now that I am done with university, I am proud to announce the release of RSDownloader 0.2.0. A lot of things changed since the first draft that was version 0.1.0. First, I changed the download code to be more modular. I [...]]]></description>
			<content:encoded><![CDATA[<p>It is here! After some development during the exam session and a final revision now that I am done with university, I am proud to announce the release of RSDownloader 0.2.0. A lot of things changed since the first draft that was version 0.1.0. First, I changed the download code to be more modular. I created a Download superclass that can be used as a model to create specific download classes for different filehosting websites easily. As of now I implemented <a href="http://rapidshare.com/">RapidShare</a> and <a href="http://www.filestube.com/">FilesTube</a> and I may add others in the future. I also implemented a search function that relies on the FilesTube API to search files by keyword. Last but not least, I changed the structure of the package to look and act more like a real package. I added setup.rb support to make the installation easier and I released the source code under <a href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3</a>.</p>
<p>If you are interested in implementing any other functionality or website, don&#8217;t hesitate to fork the project on <a href="http://github.com/renaudb/rsdownloader/">github</a>. Here is the code of the Download superclass.</p>
<pre class="brush: ruby; title: ; notranslate"># The Download superclass
class Download
 attr_accessor :url, :name

 # Initializes a download
 def initialize(url, opts)
 @url = url
 @opts = opts
 @file = nil
 end

 # Tests the url
 def test
 begin
 Net::HTTP.get_response(URI.parse(url)).value
 rescue
 return false
 end
 return true
 end

 # Executes the download
 def execute
 self.set_file
 self.download
 end

 # Sets the file for the download
 def set_file
 @file = @url
 end

 # Downloads the file
 def download
 cmd = &amp;quot;wget -c --user-agent=&amp;quot;#{@opts[:header]['User-Agent']}&amp;quot;&amp;quot;
 cmd += &amp;quot; -q&amp;quot; if !$verbose
 cmd += &amp;quot; --directory-prefix=&amp;quot;#{@opts[:dir]}&amp;quot;&amp;quot; if @opts[:dir]

 IO.popen(cmd + &amp;quot; #{@file}&amp;quot;){|f|}
 end
end</pre>
]]></content:encoded>
			<wfw:commentRss>http://renaudbourassa.com/blog/2009/04/22/release-of-rsdownloader-020/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

