mirror of https://github.com/evilhero/mylar
FIX: Another attempt at the IncompleteRead errors when accessing CV
This commit is contained in:
parent
c4b9d4a4c4
commit
f41ee0f34e
|
@ -22,6 +22,7 @@ import string
|
|||
import urllib2
|
||||
import lib.feedparser
|
||||
import mylar
|
||||
import platform
|
||||
from mylar.helpers import cvapi_check
|
||||
from bs4 import BeautifulSoup as Soup
|
||||
import httplib
|
||||
|
@ -36,6 +37,10 @@ def patch_http_response_read(func):
|
|||
return inner
|
||||
httplib.HTTPResponse.read = patch_http_response_read(httplib.HTTPResponse.read)
|
||||
|
||||
if platform.python_version() == '2.7.6':
|
||||
httplib.HTTPConnection._http_vsn = 10
|
||||
httplib.HTTPConnection._http_vsn_str = 'HTTP/1.0'
|
||||
|
||||
def pulldetails(comicid,type,issueid=None,offset=1,arclist=None,comicidlist=None):
|
||||
#import easy to use xml parser called minidom:
|
||||
from xml.dom.minidom import parseString
|
||||
|
|
|
@ -18,6 +18,7 @@ from __future__ import with_statement
|
|||
import re
|
||||
import time
|
||||
import threading
|
||||
import platform
|
||||
import urllib, urllib2
|
||||
from xml.dom.minidom import parseString, Element
|
||||
|
||||
|
@ -38,6 +39,10 @@ def patch_http_response_read(func):
|
|||
return inner
|
||||
httplib.HTTPResponse.read = patch_http_response_read(httplib.HTTPResponse.read)
|
||||
|
||||
if platform.python_version() == '2.7.6':
|
||||
httplib.HTTPConnection._http_vsn = 10
|
||||
httplib.HTTPConnection._http_vsn_str = 'HTTP/1.0'
|
||||
|
||||
def pullsearch(comicapi,comicquery,offset,explicit,type):
|
||||
u_comicquery = urllib.quote(comicquery.encode('utf-8').strip())
|
||||
u_comicquery = u_comicquery.replace(" ", "%20")
|
||||
|
|
Loading…
Reference in New Issue