mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[pixiv] fix http headers and cookies
This commit is contained in:
parent
5806e02f97
commit
8f24329e30
@ -46,11 +46,13 @@ class PixivExtractor(AsynchronousExtractor):
|
||||
self.config = config
|
||||
self.artist_id = match.group(1)
|
||||
self.api = PixivAPI(config["pixiv-cookies"]["PHPSESSID"])
|
||||
self.session.headers.update({"Referer": "http://www.pixiv.net/"})
|
||||
self.session.cookies.update(self.config["pixiv-cookies"])
|
||||
|
||||
def items(self):
|
||||
yield Message.Version, 1
|
||||
yield Message.Headers, {"Referer": "http://www.pixiv.net/"}
|
||||
yield Message.Cookies, self.config["pixiv-cookies"]
|
||||
yield Message.Headers, self.session.headers
|
||||
yield Message.Cookies, self.session.cookies
|
||||
yield Message.Directory, self.get_job_metadata()
|
||||
|
||||
for illust_id in self.get_illust_ids():
|
||||
|
Loading…
Reference in New Issue
Block a user