We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5446c67 commit e032502Copy full SHA for e032502
scripts/link-checker.js
@@ -135,7 +135,14 @@ async function checkLinks() {
135
136
const getPageData = async () => {
137
try {
138
- const response = await fetch(externalPageLink);
+ const response = await fetch(externalPageLink, {
139
+ headers: {
140
+ // Spoof a normal looking User-Agent to keep the servers happy
141
+ // See https://github.com/JustinBeckwith/linkinator/blob/main/src/index.ts
142
+ 'User-Agent':
143
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',
144
+ },
145
+ });
146
const text = await response.text();
147
const html = HTMLParser.parse(text);
148
const ids = html
0 commit comments