Changed view_mature from a querystring to a header. querystring no longer worked

This commit is contained in:
Benny Jacobs 2017-08-15 01:11:50 +02:00
parent c318f5830c
commit b747a6364f
2 changed files with 3 additions and 2 deletions

View file

@ -544,7 +544,7 @@ class FimFic2Epub extends Emitter {
fetchTitlePage () {
let url = this.storyInfo.url.replace('http://www.fimfiction.net', '')
return fetch(url + '?view_mature=true').then(this.extractTitlePageInfo.bind(this))
return fetch(url).then(this.extractTitlePageInfo.bind(this))
}
extractTitlePageInfo (html) {

View file

@ -11,7 +11,8 @@ function fetchNode (url, responseType) {
url: url,
encoding: responseType ? null : 'utf8',
headers: {
referer: 'http://www.fimfiction.net/'
referer: 'http://www.fimfiction.net/',
Cookie: 'view_mature=true',
}
}, (error, response, body) => {
if (error) {