Skip to content

Commit

Permalink
Fix Cloudflare on NovelUpdates (#887)
Browse files Browse the repository at this point in the history
* fix cloudflare

* fix import
  • Loading branch information
nguyd1 authored Jan 13, 2024
1 parent e4364ae commit e600828
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/sources/en/novelupdates.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import * as cheerio from 'cheerio';
import { fetchApi, fetchHtml, cloudflareCheck } from '@utils/fetch/fetch';
import {
fetchApi,
fetchHtml,
cloudflareCheck,
defaultUserAgentString,
} from '@utils/fetch/fetch';
import { defaultTo } from 'lodash-es';
import { FilterInputs } from '../types/filterTypes';

const sourceId = 50;

const sourceName = 'Novel Updates';

const baseUrl = 'https://www.novelupdates.com/';

const userAgent =
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36';
const userAgent = defaultUserAgentString;

const getPopularNovelsUrl = (page, { showLatestNovels, filters }) => {
let url = `${baseUrl}${
Expand Down

0 comments on commit e600828

Please sign in to comment.