use consistent names for URL constants

root := <scheme>://<host>
base_url := <root>/<common path>
This commit is contained in:
Mike Fährmann
2017-11-06 20:56:49 +01:00
parent 69cbc0619f
commit 92027f67f9
6 changed files with 26 additions and 27 deletions

View File

@@ -15,13 +15,13 @@ from .. import text
class ImgchiliExtractor(Extractor):
"""Base class for imgchili extractors"""
category = "imgchili"
url_base = "https://imgchili.net/"
root = "https://imgchili.net"
def __init__(self, match):
Extractor.__init__(self)
self.url = match.group(0)
self.match = match
self.session.headers["Referer"] = self.url_base
self.session.headers["Referer"] = self.root
def items(self):
page = self.request(self.url, encoding="utf-8").text