How To Use Feedparser With Proxy In Python 3?
I'd like to use a proxy and feedparser. This is how I'd do in urllib2: import urllib2, feedparser proxy = urllib2.ProxyHandler({'http':'proxy:port'}) d = feedparser.parse('http://w
Solution 1:
import feedparser
from urllib.request import ProxyHandler, build_opener
proxy_handler = ProxyHandler(proxies)
print(feedparser.parse("rss_url", handlers=[proxy_handler]))
Similarly, we can provide a proxy handler for feed parser.
Post a Comment for "How To Use Feedparser With Proxy In Python 3?"