# donna-scraper

It's pretty easy to capture Donna traffic via Proxyman. Just install it on macOS, setup the self-signed cert, and run Proxyman, then install the Donna iOS app from the macOS app store and run it. You can then filter down to just the Donna traffic and see requests there. You can also find some Proxyman requests in `proxyman_logs`.

In their request bodies for popular songs they store externalId which is a suno clip id:

```
    "externalId": "70b55932-381d-4df6-8187-90cdc5ee82f4",
```

If we didn't have this correlation would be a lot trickier. So we can get all the recent donna tracks by scraping the request bodies of the popular songs endpoint:

```
curl 'https://donna.appsthatworth.com/explore/new?limit=20&page=1&review=false' \
    -H 'Host: donna.appsthatworth.com' \
    -H 'invitefriendab: 1' \
    -H 'version: 1.0.38' \
    -H 'current: 1728750640171187' \
    -H 'Authorization: Basic bW9iYWltdXNpY3VzZXI6TW9iYWltdXNpYzE0MjYhaGlnaGZpdmU=' \
    -H 'Accept: */*' \
    -H 'premium: false' \
    -H 'creditgroup: first' \
    -H 'Accept-Language: en-US;q=1.0' \
    -H 'showsingle: true' \
    -H 'Cache-Control: no-cache' \
    -H 'deviceId: 2DF22A37-D8D0-498B-8E38-9B6F17134D63' \
    -H 'User-Agent: donna/1.0.38 (com.ai.sound.donna; build:1; iOS 18.0.0) Alamofire/5.9.1' \
    -H 'lang: en' \
    -H 'Connection: keep-alive' \
    --proxy http://localhost:9090 | jq ".data[] | .externalId"
```

`donna_scraper.py` does this and stores the results (recent 2000 clips) in `donna_recent_clip_ids_{current_time}.txt` for a given run. You might want to get a new auth header and maybe device id when running the script via Proxyman.

---
