BATgrowth / detect-bat-publishers

DEPRECATED: A npm package to detect Brave Browser / Basic Attention Token publishers
https://www.npmjs.com/package/detect-bat-publishers
MIT License
21 stars 3 forks source link

API was shutdown #7

Open da2x opened 5 years ago

da2x commented 5 years ago

https://mercury-proxy.privateinternetaccess.com/v3/publisher/identity?publisher=example.com is dead.

da2x commented 5 years ago

I’m not sure where they’re downloading it from, but the new Brave includes every publisher domain in a file in the user profile called publisher_list.

maxenceC commented 5 years ago

Hello @da2x

https://mercury-proxy.privateinternetaccess.com/v3/publisher/identity?publisher=example.com

It can be replaced with a call on https://publishers.basicattentiontoken.org/api/v1/public/channels and a check if the publisher is found within the array "channels"

maxenceC commented 5 years ago

It's not a great solution, but it's what I'm am using for now as a replacement

I need to play a bit more with the API to find if there's another way

da2x commented 5 years ago

I believe they wanted to do the checking client-side to not leak any information about which domains people were visiting. On the other hand, you now have a complete list of publishers in one go.

maxenceC commented 5 years ago

On the other hand, you now have a complete list of publishers in one go.

Yeah this is great, I don't have to scrap the top 1M on Alexa and verify if the website is a publisher or not, as I already have a full list now

I'm now doing the opposite, gathering the Alexa rank for an already known Brave publisher to display it on the site