mirror of
https://github.com/AliAkhtari78/SpotifyScraper.git
synced 2026-04-26 03:55:50 +03:00
[PR #21] [MERGED] Implement TrackExtractor for Spotify Track Data Extraction with Lyrics Support #101
Labels
No labels
bug
bug
claude-assistant
claude-assistant
claude-assistant
dependencies
documentation
documentation
enhancement
in review list
infrastructure
infrastructure
infrastructure
pull-request
refactoring
release
stale
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SpotifyScraper#101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AliAkhtari78/SpotifyScraper/pull/21
Author: @Copilot
Created: 5/21/2025
Status: ✅ Merged
Merged: 5/22/2025
Merged by: @AliAkhtari78
Base:
master← Head:copilot/fix-20📝 Commits (4)
bf561daInitial plan for issue7321278Add Token class and update constants for tests86245d0Complete the implementation of track extraction with lyrics support202e2c5Prioritize embed URLs for track extraction without authentication📊 Changes
9 files changed (+928 additions, -57 deletions)
View changed files
➕
direct_test.py(+156 -0)📝
src/spotify_scraper/core/constants.py(+10 -0)📝
src/spotify_scraper/core/exceptions.py(+22 -0)📝
src/spotify_scraper/extractors/track.py(+18 -29)📝
src/spotify_scraper/parsers/json_parser.py(+29 -0)➕
test_embed_url.py(+65 -0)➕
test_track_extraction.py(+62 -0)📝
tests/unit/test_track_extractor.py(+52 -28)➕
track_extractor.py(+514 -0)📄 Description
This PR implements the
TrackExtractorclass for extracting comprehensive track data from Spotify web pages. The implementation includes the exciting new feature of extracting lyrics with synchronized timing information.🚀 Features Implemented
🧠 Implementation Details
The implementation uses a multi-strategy approach to extract track data:
__NEXT_DATA__script tag containing JSON data🧪 Testing
To validate the implementation, I created:
extract_track_datafunction injson_parser.py📋 Validation
The implementation was tested against real Spotify track data and successfully extracts:
📝 Example Output
Fixes #20.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.