mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-03-29 23:50:56 +02:00
update user agent so less sites block us
This commit is contained in:
@@ -33,7 +33,7 @@ const MONTH_NAMES = [
|
||||
|
||||
async function fetchArticleText(url) {
|
||||
const response = await fetch(url, {
|
||||
headers: { 'User-Agent': 'Mozilla/5.0 (compatible; import-win/1.0)' },
|
||||
headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' },
|
||||
signal: AbortSignal.timeout(15000),
|
||||
});
|
||||
if (!response.ok) throw new Error(`Failed to fetch article: ${response.status} ${response.statusText}`);
|
||||
|
||||
Reference in New Issue
Block a user