{"id":21375251,"url":"https://github.com/internet4000/media-url-parser","last_synced_at":"2025-03-16T09:27:46.004Z","repository":{"id":47416401,"uuid":"141911777","full_name":"internet4000/media-url-parser","owner":"internet4000","description":"Parses a url and returns a provider and id of the media it is pointing to","archived":false,"fork":false,"pushed_at":"2023-05-19T16:13:31.000Z","size":112,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T06:37:41.252Z","etag":null,"topics":["discogs","javascript","soundcloud","url-parser","vimeo","youtube"],"latest_commit_sha":null,"homepage":"https://internet4000.github.io/media-url-parser/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/internet4000.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-22T16:22:19.000Z","updated_at":"2022-10-29T07:49:48.000Z","dependencies_parsed_at":"2024-11-22T09:09:27.285Z","dependency_job_id":"55a1f80b-70e7-4311-83e2-ccb5b43bbad5","html_url":"https://github.com/internet4000/media-url-parser","commit_stats":{"total_commits":66,"total_committers":7,"mean_commits":9.428571428571429,"dds":0.3939393939393939,"last_synced_commit":"018d1b5939a3054f110895ab1a0d5405caeb7780"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internet4000%2Fmedia-url-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internet4000%2Fmedia-url-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internet4000%2Fmedia-url-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internet4000%2Fmedia-url-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/internet4000","download_url":"https://codeload.github.com/internet4000/media-url-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243850647,"owners_count":20358038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discogs","javascript","soundcloud","url-parser","vimeo","youtube"],"created_at":"2024-11-22T09:09:23.643Z","updated_at":"2025-03-16T09:27:45.966Z","avatar_url":"https://github.com/internet4000.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# media-url-parser\n\nInstall with `yarn add media-url-parser` as a [npm package](https://www.npmjs.com/package/media-url-parser).\n\nOr load from a CDN\n\n```html\n\u003cscript type=\"module\"\u003e\n  import mediaUrlParser from 'https://unpkg.com/media-url-parser'\n  const x = mediaUrlParser('https://www.youtube.com/watch?v=EFh-vtZHjOQ')\n  console.log(x) // {url: \"https://www.youtube.com/watch?v=EFh-vtZHjOQ\", provider: \"youtube\", id: \"EFh-vtZHjOQ\"}\n\u003c/script\u003e\n```\n\nUsage:\n\n```javascript\nconst urlA = 'https://www.youtube.com/watch?v=OkR7UNnQU6c'\nconst urlB = '192.168.0.1/a/longer/path/podcast.ogg'\n\nconst resultsA = mediaUrlParser(urlA)\nconst resultsB = mediaUrlParser(urlB)\n```\n\nThis code will output:\n```javascript\n// resultsA\n{\n    url: 'https://www.youtube.com/watch?v=OkR7UNnQU6c',\n    provider: 'youtube',\n    id: 'OkR7UNnQU6c'\n}\n\n// resultsB\n{\n    url: 'https://192.168.0.1/a/longer/path/podcast.ogg',\n    provider: 'file',\n    id: 'podcast.ogg' \n}\n\n```\n\nSupported providers are:\n\n- [youtube](https://www.youtube.com)\n- file (only remote for now, not local files)\n- [discogs](https://www.discogs.com)\n\nPossible future providers are:\n- [bandcamp](https://bandcamp.com/)\n- [musicbrainz](https://musicbrainz.org/)\n- [mixcloud](https://www.mixcloud.com/)\n- [spotify](https://www.spotify.com/)\n- [soundcloud](https://soundcloud.com/)\n- [youtube-music](https://music.youtube.com/)\n\nSuggestions and PR welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternet4000%2Fmedia-url-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finternet4000%2Fmedia-url-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternet4000%2Fmedia-url-parser/lists"}