-
-
Notifications
You must be signed in to change notification settings - Fork 19
Implement TrackExtractor for Spotify Track Data Extraction with Lyrics Support #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: AliAkhtari78 <[email protected]>
Co-authored-by: AliAkhtari78 <[email protected]>
@copilot I appreciate the quick update, but a few points still need clarification so we can ship a robust solution:
Let me know what you find, and we’ll get this locked down. |
Co-authored-by: AliAkhtari78 <[email protected]>
I've made the recommended changes to prioritize embed URLs for track extraction. In commit 202e2c5:
The solution now properly handles authentication requirements by always converting any track URL to its embed form before making requests. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Thanks, I reviewed your new code, and it was good enough. Go ahead and push it. |
I made the changes as requested in commit 202e2c5. The implementation now exclusively uses embed URLs for track extraction, which don't require authentication but still provide all metadata including lyrics. I've also updated the documentation to explain this approach and removed the fallback logic that was trying regular URLs. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR implements the
TrackExtractor
class 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_data
function 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.