Exodus-Privacy / exodus

Platform to audit trackers used by Android application
https://reports.exodus-privacy.eu.org/
GNU Affero General Public License v3.0
644 stars 63 forks source link

Missing trackers from API #582

Closed rawrke closed 1 year ago

rawrke commented 1 year ago

Description

When sending a request to https://reports.exodus-privacy.eu.org/api/trackers, per the api, it returns a list of only 428 of the 443 known trackers.

Reproduce (using Python)

Following these steps to reproduce:

  1. Executing the following python code:
import requests

response = requests.get(
    url=f"https://reports.exodus-privacy.eu.org/api/trackers",
    headers={"Authorization": "Token <MySuperSecretToken>"},
)

trackers = response.json()["trackers"]
n_trackers = len(trackers)

print("Number of trackers:", n_trackers)
print("Last tracker:", trackers[f"{n_trackers}"])
  1. Gives the result:
Number of trackers: 428
Last tracker: {'id': 428, 'name': 'Adjust Unbotify', 'description': 'Bot fraud detection', ... }
  1. Which lines up properly with Exodus' website: https://reports.exodus-privacy.eu.org/en/trackers/428/

  2. But there are additional trackers on the website that do not show up in the API results:

codeurimpulsif commented 1 year ago

Hi @rawrke,

I think you're confused by the trackers ID. At the time of writing this, there is 428 trackers in exodus database, the numbers you are refering to are trackers ID in exodus database.

Yes the last tracker added is tracker ID 443 "Coulus Coelib" but there is only 428 trackers. For example you can't find any tracker with ID 21 in the database. It's because sometime we remove trackers for some reasons.

This page show there is 428 trackers: https://reports.exodus-privacy.eu.org/en/trackers/

Your script don't check the last tracker ID but the tracker ID corresponding to the total number of trackers, here a change to this script to check the list, so we can see trackers 429 to 443:

import requests

response = requests.get(url=f"https://reports.exodus-privacy.eu.org/api/trackers")

trackers = response.json()["trackers"]
n_trackers = len(trackers)

for tracker in trackers:
    print(tracker, ":", trackers[tracker]['name'])

print("Number of trackers:", n_trackers)

Does that seem clearer?

rawrke commented 1 year ago

Oh woops, yeah I see that the trackers are not continuous from 1...428 after all. I was just going off of count, my bad!

trackers["443"]

returns

{
  'id': 443,
  'name': 'Coulus Coelib',
  ...
}

thanks for the response, i'll close the ticket