Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
685aa05
add readme.md for apple-music-scraper
Abssdghi Nov 24, 2025
fbb0d93
add apple-music-scraper files
Abssdghi Nov 24, 2025
9cfabde
add requirements.txt file for apple-music-scraper
Abssdghi Nov 24, 2025
d88ae3c
update apple-music-scraper readme for follow guidline
Abssdghi Nov 24, 2025
3e15ab1
add docstring for main.py in apple-music-scraper
Abssdghi Nov 24, 2025
2b777ff
add docstring for utils.py in apple-music-scraper
Abssdghi Nov 24, 2025
adb95ba
change code style for ai checks
Abssdghi Nov 24, 2025
9a1a02c
add test func for apple-music-scraper
Abssdghi Nov 24, 2025
d9f3010
change code style for ai checks
Abssdghi Nov 24, 2025
d6bc2e7
add docstring for room scrape fun in apple-music-scraper
Abssdghi Nov 24, 2025
648485e
update docstring for main.py in apple-music-scraper
Abssdghi Nov 24, 2025
06a83ec
update docstring for utils.py in apple-music-scraper
Abssdghi Nov 24, 2025
76db52a
update artist_scrape func for Code Quality Check
Abssdghi Nov 24, 2025
9d4b80a
change code style for ai checks
Abssdghi Nov 24, 2025
1b153b3
change code style for ai checks
Abssdghi Nov 24, 2025
4b2b5e1
change code style for ai checks
Abssdghi Nov 24, 2025
7b2fd87
change code style for ai checks
Abssdghi Nov 24, 2025
74b365f
change code style for ai checks
Abssdghi Nov 24, 2025
a44bd62
add some helper funcs to reduce complexity
Abssdghi Nov 24, 2025
856d0b3
change code style for ai checks
Abssdghi Nov 24, 2025
1ebd7f2
remove function call line
Abssdghi Nov 24, 2025
b0537cd
add newline at end of file - fix FLK-W292
Abssdghi Nov 24, 2025
3cc5053
reduce complexity for video_scrape func
Abssdghi Nov 24, 2025
7b6dc05
reduce complexity by adding helper functions
Abssdghi Nov 24, 2025
41618be
change code style for ai checks
Abssdghi Nov 24, 2025
f4f0f73
add docstring for utils funcs
Abssdghi Nov 24, 2025
c047856
reduce complexity by adding helper functions
Abssdghi Nov 24, 2025
930f134
change code style for ai checks
Abssdghi Nov 24, 2025
e7ec5fa
fix wrong function calls
Abssdghi Nov 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions Apple-Music-Scraper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Apple Music Scraper

A powerful unofficial scraper for extracting structured metadata from Apple Music web pages using web-scraping techniques and reverse-engineered `serialized-server-data`.
This tool is for **educational purposes only** and does **not** use any official Apple API.

- **Functionalities**
- Search for artists, songs, albums, playlists, and videos
- Extract song metadata and preview URLs
- Fetch album details including tracks, artist info, similar albums, and videos
- Scrape playlist and shared room song URLs
- Retrieve video metadata and direct video links
- Fetch full artist information including top songs, albums, biography, and more

---

## Setup Instructions

1. Clone or download the project
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Import and use the scraper in your Python script:
```python
result = search('night tapes')
artists = result['artists']

artist_url = artists[0]['url']
artist = artist_scrape(artist_url)

latest_night_tapes_song_url = artist['latest']

song = album_scrape(latest_night_tapes_song_url)
song_name = song['title']
song_cover = song['image']

print(f"\nLatest Night Tapes Song: {song_name}\nCover Art: {song_cover}\n")
```

---

## Detailed Explanation

Each scraping function processes the `serialized-server-data` embedded in Apple Music’s webpage structure.
The scraper extracts metadata such as:
- Titles, URLs, artwork
- Track lists
- Preview links
- Album/artist relationships
- Related videos or albums
All results are returned as **structured JSON objects** for easy access in your applications.

---

## Output

The scraper returns JSON structures like:

```json
{
"title": "Example Song",
"artist": "Example Artist",
"image": "https://example-image.jpg",
"preview": "https://example-preview.m4a",
"related": [...],
"songs": [...]
}
```

You can log these results, display them in an interface, or process them however you like.

---

## Author

- [**Abssdghi**](https://github.com/Abssdghi)

---

## Disclaimers

- This project is **not affiliated with Apple Inc.**
- It uses **web scraping** and may break if Apple changes its internal web structure.
- For **educational and personal use only**. Redistribution of scraped content may violate Apple Music’s Terms of Service.
Loading