feedify: remove unused downloader
parent
08f08ef704
commit
bf3ef586c2
|
@ -13,13 +13,11 @@ from . import crawler
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from ConfigParser import ConfigParser
|
from ConfigParser import ConfigParser
|
||||||
from urlparse import urlparse, urljoin
|
from urlparse import urljoin
|
||||||
from urllib2 import urlopen
|
|
||||||
from httplib import HTTPException
|
from httplib import HTTPException
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
from urllib.parse import urlparse, urljoin
|
from urllib.parse import urljoin
|
||||||
from urllib.request import urlopen
|
|
||||||
from http.client import HTTPException
|
from http.client import HTTPException
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -116,12 +114,10 @@ def pre_worker(url):
|
||||||
|
|
||||||
|
|
||||||
class Builder(object):
|
class Builder(object):
|
||||||
def __init__(self, link, data=None):
|
def __init__(self, link, data):
|
||||||
self.link = link
|
self.link = link
|
||||||
self.data = data
|
self.data = data
|
||||||
|
self.rule = rule
|
||||||
if self.data is None:
|
|
||||||
self.data = urlopen(link).read()
|
|
||||||
|
|
||||||
self.encoding = crawler.detect_encoding(self.data)
|
self.encoding = crawler.detect_encoding(self.data)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue