mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
...
This commit is contained in:
parent
124854254e
commit
f48c2ca8f2
@ -4,12 +4,14 @@
|
||||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
from collections import namedtuple
|
||||
from contextlib import contextmanager
|
||||
from threading import Lock
|
||||
from functools import partial
|
||||
|
||||
try:
|
||||
from urllib.parse import parse_qs, quote_plus, unquote, urlencode, quote, urlparse
|
||||
@ -19,7 +21,7 @@ except ImportError:
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from calibre import browser as _browser, prints, random_user_agent
|
||||
from calibre import browser as _browser, prints as safe_print, random_user_agent
|
||||
from calibre.constants import cache_dir
|
||||
from calibre.ebooks.chardet import xml_to_unicode
|
||||
from calibre.utils.lock import ExclusiveFile
|
||||
@ -29,6 +31,7 @@ current_version = (1, 2, 2)
|
||||
minimum_calibre_version = (2, 80, 0)
|
||||
webcache = {}
|
||||
webcache_lock = Lock()
|
||||
prints = partial(safe_print, file=sys.stderr)
|
||||
|
||||
|
||||
Result = namedtuple('Result', 'url title cached_url')
|
||||
|
Loading…
x
Reference in New Issue
Block a user