Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.3.0¶
Added¶
- Module-level convenience functions for simplified API usage:
detect_platform(url)- Detect platform from URL without instantiating SocialLinksis_valid(platform_name, url)- Validate URL for a specific platformsanitize(platform_name, url)- Sanitize URL to canonical formatlist_platforms()- List all supported platform names- Separate documentation pages for better organization:
basic-api.md- Documentation for module-level convenience functionscore-api.md- Documentation for SocialLinks class and advanced featuresconstants.md- Documentation for constants and type aliasesexceptions.md- Documentation for exception hierarchy- Add test cases for module-level functions.
Changed¶
- Enhanced README with improved Quick Start section using module functions
- Added comprehensive "Basic Usage" section with extensive examples
- Improved README organization with clearer separation between basic and advanced usage
1.2.1¶
Added¶
- Interactive demo page in documentation with Pyodide integration
- Browser-based testing interface for detecting platforms, validating URLs, and sanitizing links
- No installation required - runs entirely in the browser
- Real-time platform detection and validation feedback
- Demo badge in README linking to interactive demo
- Prominent callout in README highlighting the interactive demo feature
Changed¶
- Enhanced README visibility for demo page with badge and callout placement
- Improved user experience with easier access to interactive testing
1.2.0¶
Added¶
- Support for 28 new social media platforms:
- Music & Audio: Apple Music, Bandcamp
- Video Platforms: Douyin, Kuaishou, Vimeo
- Social Networks: Bluesky, Discord, Reddit, Snapchat, Tumblr, Threads (Instagram)
- Professional & Business: Crunchbase, GitLab, HackerNews, ProductHunt, Wellfound (AngelList)
- E-commerce & Marketplaces: Etsy, Gumroad
- Content & Publishing: Hashnode, Slideshare
- Messaging & Communication: Signal, WeChat, WhatsApp
- Photo & Media: Flickr, Gravatar
- Gaming: Steam
- Q&A & Forums: Quora
- Chinese Platforms: Weibo
InvalidPlatformRegexErrorexception for handling invalid regex patterns in platform configurationsconstants.pymodule with reusable regex patterns and type aliases for platform configuration- Comprehensive API reference documentation
- Function and constant docstrings throughout the codebase
- Roadmap section in README
- Google verification key for documentation
- SEO meta tags and title templates for documentation pages
- Common test patterns module for parametrized testing across platforms
Changed¶
- Enhanced platform pattern matching:
- LinkedIn: Added support for school URLs and improved pattern matching with
%character support - Reddit: Added support for subreddit URLs and
u/prefix format - Telegram: Enhanced with additional URL patterns
- Spotify: Added support for artist profile URLs and improved user profile patterns
- Quora: Added support for Unicode characters in profile URLs
- Substack: Updated URL patterns for better matching
- WhatsApp: Added support for send URL format
- YouTube: Fixed channel pattern matching
- Refactored exception hierarchy:
- Introduced
PlatformErroras base class for platform-related errors - Introduced
URLParsingErroras base class for URL parsing errors - Improved error categorization and inheritance structure
- Refactored test suite:
- Split monolithic
test_platforms.pyinto individual platform-specific test files - Added
conftest.pyfor shared test fixtures - Parametrized common test cases (www, http, trailing_slash) for better coverage
- Updated README:
- Formatted predefined platforms in a table for better readability
- Removed outdated error handling section
- Enhanced
pyproject.tomlwith improved keywords and metadata - Improved documentation structure with better organization and SEO optimization
Fixed¶
- Fixed YouTube channel pattern matching issues
- Fixed sanitization pattern edge cases
- Fixed documentation bugs
1.1.0¶
Added¶
- MkDocs documentation setup with Material theme
- Comprehensive Contributing Guide (CONTRIBUTING.md) with development setup instructions
- GitHub Actions workflow for automated documentation deployment
- Documentation badge in README linking to hosted documentation
- Links section in README with all project resources
- Added py.typed file for type hinting
Changed¶
- Updated README with clickable links for all 25+ supported platforms
- Enhanced README structure with Changelog, Contributing, and Support sections
- Improved documentation organization with dedicated docs/ directory
1.0.0¶
Added¶
- Initial release of social-links
SocialLinksclass for detecting and sanitizing social media URLsdetect_platform()method for automatically detecting platform from URLis_valid()method for validating URLs against specific platformssanitize()method for normalizing URLs to canonical format- Platform management methods:
set_platform()- Add or override a single platformdelete_platform()- Remove a single platformset_platforms()- Bulk add/override platformsdelete_platforms()- Bulk remove platformsclear_platforms()- Remove all platformsget_platform()- Retrieve platform configurationlist_platforms()- List all registered platforms- Support for 25+ predefined social media platforms:
- behance, dev_to, dribbble, exercism, facebook, github, instagram, keybase, lemmy_world, linkedin, linktree, mastodon, medium, patreon, pinterest, soundcloud, spotify, stackoverflow, substack, telegram, tiktok, twitch, vk, x (Twitter), youtube
- Custom regex pattern support for flexible URL matching
- Multiple pattern support per platform
- Automatic ID extraction from URLs
- Support for various URL formats (with/without protocol, www, mobile variants)
- Customizable regex flags for pattern matching
- Comprehensive error handling with custom exceptions:
SocialLinksError- Base exceptionPlatformNotFoundError- Platform not foundPlatformAlreadyExistsError- Platform already existsInvalidPlatformError- Invalid platform configurationPlatformIDExtractionError- Failed to extract platform IDURLMismatchError- URL doesn't match platform pattern- Full test coverage with comprehensive test suite
Features¶
- Zero external dependencies
- Python 3.8+ compatibility
- Case-insensitive URL matching (configurable)
- Support for username-only input (without full URLs)
- Automatic @ symbol handling
- URL normalization and sanitization