aggregates web comics
This collects web-comics to one place.
I wanted a reader that was automatic, but does not require a webserver.
if this app breaks, edit config.json with new CSS selectors
config.js
entry
"xkcd": {
"url": "https://xkcd.com/",
"class": null,
"selectors": {
"image": "#comic img",
"comic_title": "#ctitle",
"prev": "a[rel='prev']"
}
}
required:
image: CSS selector to grab `<img>` element
optional:
comic_title: CSS selector to grab comic title element. Fallback to `image.alt`
class: name of class in CSS for special markup on a single comic
prev: CSS selector for url to prev page
cache error somehow:
- cache {} should be thread safe.
- But even if not: threads should *never* intersect domains
- FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\cppmo_000\\PycharmProjects\\NewspaperWebComics\\cache\\2018 05 19 - 16 50 00 896403'
optionally clear cache by age
show ‘new’ images based on
why did image[‘title’] fail?
alt
module js pattern
generate_js
cache.py
remove all print statements for a STDOUT logger
move html output to /html/
threading
utilize srcset
?
default selectors if config fails
optionally download only headers:
http://docs.python-requests.org/en/master/user/advanced/#body-content-workflow