Skip to content

Commit

Permalink
Fix eH login script so that downloader can download galleries hidden …
Browse files Browse the repository at this point in the history
…behind a warning (#941)

* Add nw=1 cookie to skip offensive warning screen

* Add nw=1 cookie to e-hentai too

---------

Co-authored-by: Yosumi Miko <yosumiko@protonmail.com>
  • Loading branch information
f8upd8 and Yosumi Miko authored Jan 14, 2024
1 parent 51ba810 commit 86cd116
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/LANraragi/Plugin/Login/EHentai.pm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,27 @@ sub get_user_agent {
path => '/'
)
);

#Skips the "offensive warning" screen so that such galleries archive gIDs can be easily retrieved by Download script.
$ua->cookie_jar->add(
Mojo::Cookie::Response->new(
name => 'nw',
value => '1',
domain => 'exhentai.org',
path => '/'
)
);

$ua->cookie_jar->add(
Mojo::Cookie::Response->new(
name => 'nw',
value => '1',
domain => 'e-hentai.org',
path => '/'
)
);


} else {
$logger->info("No cookies provided, returning blank UserAgent.");
}
Expand Down

0 comments on commit 86cd116

Please sign in to comment.