<?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>rohitj&#039;s domain &#187; FeedParser</title>
	<atom:link href="http://rohitj.net/blog/category/softwares/feedparser/feed/" rel="self" type="application/rss+xml" />
	<link>http://rohitj.net</link>
	<description>Yet more clitches</description>
	<lastBuildDate>Tue, 10 Apr 2012 20:32:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to run feedparser behind proxy</title>
		<link>http://rohitj.net/blog/2008/03/13/how-to-run-feedparser-behind-proxy/</link>
		<comments>http://rohitj.net/blog/2008/03/13/how-to-run-feedparser-behind-proxy/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 18:12:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FeedParser]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.rohitj.net/blog/2008/03/13/how-to-run-feedparser-behind-proxy/</guid>
		<description><![CDATA[So, I had to change the feedparser code to run it behind proxy. Basically the idea is that python by default doesn&#8217;t user environment variables http proxy. You have to specify it in the python code. In feedparser code, url is accessed at the line # 1895. Now, opener has to have http settings so [...]]]></description>
			<content:encoded><![CDATA[<p>So, I had to change the feedparser code to run it behind proxy. Basically the idea is that python by default doesn&#8217;t user environment variables http proxy. You have to specify it in the python code.</p>
<p>In feedparser code, url is accessed at the line # 1895. Now, opener has to have http settings so that it could access the url. For that, I added 2 lines before calling opener:<br />
<code><br />
proxy_support = urllib2.ProxyHandler({"http" : "http://&lt;username&gt;:&lt;passwd&gt;@&lt;proxyserver&gt;:&lt;proxyport&gt;"});<br />
opener = urllib2.build_opener(proxy_support)<br />
</code><br />
Here is the final feedparser : <a href="http://www.rohitj.net/blog/wp-content/uploads/2008/03/feedparser_with_proxytar.gz" title="FeedParser With Proxy Support">FeedParser With Proxy Support</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rohitj.net/blog/2008/03/13/how-to-run-feedparser-behind-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

