Move build_opener to crawler

Forgotten
master
pictuga 2017-03-18 23:03:04 -10:00
parent f7d570d4c8
commit 67f5a21019
2 changed files with 2 additions and 4 deletions

View File

@ -12,10 +12,10 @@ import sqlite3
import time
try:
from urllib2 import BaseHandler, Request, addinfourl, parse_keqv_list, parse_http_list
from urllib2 import BaseHandler, Request, addinfourl, parse_keqv_list, parse_http_list, build_opener
import mimetools
except ImportError:
from urllib.request import BaseHandler, Request, addinfourl, parse_keqv_list, parse_http_list
from urllib.request import BaseHandler, Request, addinfourl, parse_keqv_list, parse_http_list, build_opener
import email
try:

View File

@ -25,14 +25,12 @@ from html2text import HTML2Text
try:
from Queue import Queue
from httplib import HTTPException
from urllib2 import build_opener
from urllib2 import HTTPError
from urllib import quote_plus
from urlparse import urlparse, urljoin, parse_qs
except ImportError:
from queue import Queue
from http.client import HTTPException
from urllib.request import build_opener
from urllib.error import HTTPError
from urllib.parse import quote_plus
from urllib.parse import urlparse, urljoin, parse_qs