Dolda2000 GitWeb
/
automanga.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix up BS4 warnings in mangafox and mrnet.
[automanga.git]
/
manga
/
htcache.py
diff --git
a/manga/htcache.py
b/manga/htcache.py
index
5f28c00
..
2aa594e
100644
(file)
--- a/
manga/htcache.py
+++ b/
manga/htcache.py
@@
-1,4
+1,5
@@
import os, hashlib, urllib.request, time
import os, hashlib, urllib.request, time
+from . import profile
pj = os.path.join
class cache(object):
pj = os.path.join
class cache(object):
@@
-31,10
+32,7
@@
class cache(object):
f.write(data)
return data
f.write(data)
return data
-home = os.getenv("HOME")
-if home is None or not os.path.isdir(home):
- raise Exception("Could not find home directory for HTTP caching")
-default = cache(pj(home, ".manga", "htcache"))
+default = cache(pj(profile.confdir, "htcache"))
def fetch(url, expire=3600):
return default.fetch(url, expire)
def fetch(url, expire=3600):
return default.fetch(url, expire)