[hentaicosplays] add Referer to headers (#2317)

This commit is contained in:
dragobit
2022-03-01 06:19:32 +09:00
committed by GitHub
parent 4385a34e05
commit 781fdfa212

View File

@@ -57,6 +57,7 @@ class HentaicosplaysGalleryExtractor(GalleryExtractor):
self.root = text.ensure_http_scheme(root)
url = "{}/story/{}/".format(self.root, self.slug)
GalleryExtractor.__init__(self, match, url)
self.session.headers["Referer"] = url
def metadata(self, page):
title = text.extract(page, "<title>", "</title>")[0]