apto1/translate-scrapper 问题修复 & 功能扩展

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

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

apto1/translate-scrapper

最新稳定版本:1.0.0

Composer 安装命令:

composer require apto1/translate-scrapper

包简介

Create directories and search based on terms on wp pagesd

README 文档

README

To create the dictionary files ex.:

/**
* The urls array of the content to be crawled
* pageId=>['en'=>'url','gr'=>'url']
*/
const URLS = [
    13 => [
        'en'	=> 'https://herema.gr/who-we-are/our-mandate/',
        'gr'	=> 'https://herema.gr/el/who-we-are/our-mandate/',
    ],
    14 => [
        'en'	=> 'https://herema.gr/who-we-are/our-transformation/',
        'gr'	=> 'https://herema.gr/el/who-we-are/our-transformation/',
    ],
];

/**
* Just initialize the class and everything will be done automatically
*/
$scrapper = new Scrapper(URLS);

/**
* There are some available methods for debugging
*/
//The URLS array
$scrapper->getUrls();
//The dictionary array
$scrapper->getFiles();
//Performance timings for curl,parsing and writing
$scrapper->getPerformance();
//The scrapped sanitzed content
$scrapper->getScrappedContent();
//The original content
$scrapper->getUrlContent();

To search the dictionary files ex.:

/**
* Create a new instance of the Search class
* by passing the language
* PS. Leave blank contructor for en languange
*/
$dictionary = new Dictionary('gr');

/**
* Search for a word using the ->search() method
*/
$dictionary->search('Με πυξίδα την πεποίθηση ότι η εταιρεία');

/**
* Retrieve the results using the ->getResults() method
*/
$res = $dictionary->getResult();

/**
* There are some available methods for debugging
*/
//Performance timings for parsing and searching
$dictionary->getPerformance();
//The dictionary array
$dictionary->getDictionary()

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固