hypejunction/hypescraper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hypejunction/hypescraper

最新稳定版本:6.2.1

Composer 安装命令:

composer require hypejunction/hypescraper

包简介

Extraction and embedding service

README 文档

README

Elgg 3.0

A tool for scraping, caching and embedding remote resources.

Features

  • Scrapes URLs and turns them in responsive preview cards
  • Aggressive caching of scraped resources for enhanced performance
  • Linkifies #hashtags, @usernames, links and emails

Card view Card mobile Player

Developer notes

Card

To display a URL card with an image preview, title and brief description, use output/card view:

echo elgg_view('output/card', array(
	'href' => 'https://www.youtube.com/watch?v=Dlf1_vuIR4I',
));

Player

To dipslay a rich media player use output/player view:

echo elgg_view('output/player', array(
	'href' => 'https://www.youtube.com/watch?v=Dlf1_vuIR4I',
));

Linkify

To linkify all URLs, usernames, emails and hashtags that are not wrapped in html tags, use output/linkify view. Pass your text in a value parameter. You can use parse_ flags to skip certain qualifiers.

$text = '@someone needs to #linkify this article http://example.com and email it to someone@example.com';
if (elgg_view_exists('output/linkify')) {
	$text = elgg_view('output/linkify', array(
		'value' => $text,
		//'parse_urls' => false,
		//'parse_hashtags' => false,
		//'parse_usernames' => false,
		//'parse_emails' => false,
	));
}

To generate a preview for multiple URLs extracted from text, use output/url_preview view. Pass your text as a value parameter. The view will parse all URLs and generate previews.

$text = 'This video is really cool https://vimeo.com/channels/staffpicks/116498390';
if (elgg_view_exists('output/url_preview')) {
	$text = elgg_view('output/url_preview', array(
		'value' => $text,
	));
}

统计信息

  • 总下载量: 579
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2015-07-27