Add a friendly user agent

This commit is contained in:
Cadence Ember 2025-04-09 20:57:00 +12:00
parent bd9bb656ac
commit 13699d163d
2 changed files with 7 additions and 7 deletions

View file

@ -48,7 +48,7 @@ class TagDownloader extends sync.reloadClassMethods(() => TagDownloader) {
this.processed = 0
try {
for (const {account, item_id, item_type, item_title, item_url, band_name} of this.untaggedItems) {
const res = await fetch(item_url)
const res = await fetch(item_url, {headers: {"user-agent": "BC Explorer (+https://bcexplorer.world)"}})
// delete unreachable items, otherwise it will perpetually try to download tags for them
if (res.status === 404) {