Merge pull request #527 from cyian-1756/tnbtu.com-fixes

tnbtu ripper now sets referrer header
This commit is contained in:
cyian-1756 2018-04-19 05:42:16 -04:00 committed by GitHub
commit a586a3a301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -327,10 +327,16 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|| getHost().contains("themonsterunderthebed.net")) { || getHost().contains("themonsterunderthebed.net")) {
addURLToDownload(url, pageTitle + "_"); addURLToDownload(url, pageTitle + "_");
} }
if (getHost().contains("tnbtu.com")) {
// We need to set the referrer header for tnbtu
addURLToDownload(url, getPrefix(index), "","http://www.tnbtu.com/comic", null);
} else {
// If we're ripping a site where we can't get the page number/title we just rip normally // If we're ripping a site where we can't get the page number/title we just rip normally
addURLToDownload(url, getPrefix(index)); addURLToDownload(url, getPrefix(index));
} }
}
@Override @Override
public Document getFirstPage() throws IOException { public Document getFirstPage() throws IOException {
// "url" is an instance field of the superclass // "url" is an instance field of the superclass