Skip to content

Commit

Permalink
added support to fetch Google's sellers.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Vekaria committed May 19, 2024
1 parent 12507e8 commit dbdd617
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dist/ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const fetchAndParse = async (url, parser) => {
const { signal } = controller;
setTimeout(() => controller.abort(), 5000);

// Google being popular ad-exchange hosting sellers.json at custom location, added its support
if (url.endsWith("google.com/sellers.json")) {
url = "https://storage.googleapis.com/adx-rtb-dictionaries/sellers.json"
}

try {
const response = await fetch(url, { signal, redirect: 'follow' });
return parser(response);
Expand Down

0 comments on commit dbdd617

Please sign in to comment.