承接 eduardorengifo/botnews 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

eduardorengifo/botnews

Composer 安装命令:

composer require eduardorengifo/botnews

包简介

Bot News

README 文档

README

Build Status License: MIT Packagist Pre Release PHP from Packagist

Botnews is a small PHP script to extract news from websites.

Installation

To install, use the following to pull the package in via Composer.

$ composer require eduardorengifo/botnews

Configuration

At the moment there are only two news sites configured. The same settings could be applied for all other available sites.

require_once __DIR__ . '/vendor/autoload.php';

$rppPostSlug = 'futbol/seleccion-peruana/video-ricardo-gareca-para-rpp-tenemos-que-tener-los-pies-sobre-la-tierra-en-el-mundial-noticia-1096914';
$rpp = new \BotNews\Sites\Rpp();

/** @var \BotNews\Models\Post $rppPost */
$rppPost = $rpp->getPost( $rppPostSlug );

/** @var \BotNews\Models\Page $rppPage */
$rppPage = $rpp->getPage('futbol');

Extend

To set up your own news site using the classes, models and BotNews interface you could use the following template.

use BotNews\BotNews;
use BotNews\Client;

class SiteName extends Client implements BotNews
{
	/**
	 * @var string
	 */
	protected $siteUrl = ''; // TODO: Place the web site url

	/**
	 * @param string $slug
	 *
	 * @return Post
	 */
	public function getPost( $slug )
	{
		// TODO: Your code configuration for post
	};

	/**
	 * @param mixed $paged
	 *
	 * @return Page
	 */
	public function getPage( $paged = 1 )
	{
		// TODO: Your code configuration for page
	};
}

License

BotNews is open-sourced software licensed under the MIT license

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固