{"id":18290810,"url":"https://github.com/convos-chat/linkembedder","last_synced_at":"2025-12-12T02:47:34.557Z","repository":{"id":49884439,"uuid":"86722042","full_name":"convos-chat/linkembedder","owner":"convos-chat","description":"Embed / expand oEmbed resources and other URL / links","archived":false,"fork":false,"pushed_at":"2021-10-18T23:54:21.000Z","size":482,"stargazers_count":6,"open_issues_count":4,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-30T18:38:08.875Z","etag":null,"topics":["mojo"],"latest_commit_sha":null,"homepage":"","language":"Perl","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/convos-chat.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-30T16:02:02.000Z","updated_at":"2021-10-18T23:54:25.000Z","dependencies_parsed_at":"2022-09-02T21:20:33.289Z","dependency_job_id":null,"html_url":"https://github.com/convos-chat/linkembedder","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/convos-chat/linkembedder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Flinkembedder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Flinkembedder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Flinkembedder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Flinkembedder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/convos-chat","download_url":"https://codeload.github.com/convos-chat/linkembedder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Flinkembedder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016601,"owners_count":26085852,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["mojo"],"created_at":"2024-11-05T14:12:17.616Z","updated_at":"2025-10-13T18:43:57.052Z","avatar_url":"https://github.com/convos-chat.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nLinkEmbedder - Embed / expand oEmbed resources and other URL / links\n\n# SYNOPSIS\n\n    use LinkEmbedder;\n\n    my $embedder = LinkEmbedder-\u003enew(force_secure =\u003e 1);\n\n    # In some cases, you have to set a proper user_agent to get complete\n    # pages. This is done automatically by $embedder-\u003eserve()\n    $embedder-\u003eua-\u003etransactor-\u003ename(\"Mozilla...\");\n\n    $embedder-\u003eget_p(\"https://xkcd.com/927\")-\u003ethen(sub {\n      my $link = shift;\n      print $link-\u003ehtml;\n    })-\u003ewait;\n\n# DESCRIPTION\n\n[LinkEmbedder](https://metacpan.org/pod/LinkEmbedder) is a module that can expand an URL into a rich HTML snippet or\nsimply to extract information about the URL.\n\nThis module replaces [Mojolicious::Plugin::LinkEmbedder](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3ALinkEmbedder).\n\nGo to [https://thorsen.pm/linkembedder](https://thorsen.pm/linkembedder) to see a demo of how it works.\n\nThese web pages are currently supported:\n\n- [https://dropbox.com/](https://dropbox.com/)\n- [https://imgur.com/](https://imgur.com/)\n- [https://instagram.com/](https://instagram.com/)\n\n    Instagram need some additional JavaScript. Please look at\n    [https://github.com/jhthorsen/linkembedder/blob/master/examples/embedder.pl](https://github.com/jhthorsen/linkembedder/blob/master/examples/embedder.pl) and\n    [https://www.instagram.com/developer/embedding/](https://www.instagram.com/developer/embedding/)\n    for more information.\n\n- [https://appear.in/](https://appear.in/)\n- [https://gist.github.com](https://gist.github.com)\n- [https://github.com](https://github.com)\n- [http://ix.io](http://ix.io)\n- [https://maps.google.com](https://maps.google.com)\n- [https://metacpan.org](https://metacpan.org)\n- [https://paste.fedoraproject.org/](https://paste.fedoraproject.org/)\n- [https://paste.opensuse.org](https://paste.opensuse.org)\n- [http://paste.scsys.co.uk](http://paste.scsys.co.uk)\n- [https://pastebin.com](https://pastebin.com)\n- [https://www.spotify.com/](https://www.spotify.com/)\n- [https://ted.com](https://ted.com)\n- [https://travis-ci.org](https://travis-ci.org)\n- [https://twitter.com](https://twitter.com)\n\n    Twitter need some additional JavaScript. Please look at\n    [https://github.com/jhthorsen/linkembedder/blob/master/examples/embedder.pl](https://github.com/jhthorsen/linkembedder/blob/master/examples/embedder.pl) and\n    [https://dev.twitter.com/web/javascript/initialization](https://dev.twitter.com/web/javascript/initialization)\n    for more information.\n\n- [https://vimeo.com](https://vimeo.com)\n- [https://youtube.com](https://youtube.com)\n- [https://www.xkcd.com/](https://www.xkcd.com/)\n- HTML\n\n    Any web page will be parsed, and \"og:\", \"twitter:\", meta tags and other\n    significant elements will be used to generate a oEmbed response.\n\n- Images\n\n    URLs that looks like an image is automatically converted into an img tag.\n\n- Video\n\n    URLs that looks like a video resource is automatically converted into a video tag.\n\n# ATTRIBUTES\n\n## force\\_secure\n\n    $bool = $self-\u003eforce_secure;\n    $self = $self-\u003eforce_secure(1);\n\nThis attribute will translate any unknown http link to https.\n\nThis attribute is EXPERIMENTAL. Feeback appreciated.\n\n## ua\n\n    $ua = $self-\u003eua;\n\nHolds a [Mojo::UserAgent](https://metacpan.org/pod/Mojo%3A%3AUserAgent) object.\n\n## url\\_to\\_link\n\n    $hash_ref = $self-\u003eurl_to_link;\n\nHolds a mapping between host names and [link class](https://metacpan.org/pod/LinkEmbedder%3A%3ALink) to use.\n\n# METHODS\n\n## get\n\n    $self = $self-\u003eget_p($url, sub { my ($self, $link) = @_ });\n\nSame as [\"get\\_p\"](#get_p), but takes a callback instead of returning a [Mojo::Promise](https://metacpan.org/pod/Mojo%3A%3APromise).\n\n## get\\_p\n\n    $promise = $self-\u003eget_p($url)-\u003ethen(sub { my $link = shift });\n\nUsed to construct a new [LinkEmbedder::Link](https://metacpan.org/pod/LinkEmbedder%3A%3ALink) object and retrieve information\nabout the URL.\n\n## serve\n\n    $self = $self-\u003eserve(Mojolicious::Controller-\u003enew, $url);\n\nUsed as a helper for [Mojolicious](https://metacpan.org/pod/Mojolicious) web applications to reply to an oEmbed\nrequest. Will also set [\"name\" in Mojo::UserAgent::Transactor](https://metacpan.org/pod/Mojo%3A%3AUserAgent%3A%3ATransactor#name) for [\"ua\"](#ua) if\nthe incoming request contains a \"User-Agent\" header.\n\nNote that in [Mojolicious](https://metacpan.org/pod/Mojolicious) 9.11 and later, you must define the format for your\nroute to serve with extension .html, .json or .jsonp.\n\n# AUTHOR\n\nJan Henning Thorsen\n\n# COPYRIGHT AND LICENSE\n\nThis program is free software, you can redistribute it and/or modify it under\nthe terms of the Artistic License version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconvos-chat%2Flinkembedder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconvos-chat%2Flinkembedder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconvos-chat%2Flinkembedder/lists"}