louisperre/composer-td3
Composer 安装命令:
composer require louisperre/composer-td3
包简介
Scrap the TMDB website to get all sort of data
README 文档
README
Information
Easily scrap the TMDB website
Features
- Scrap all the movies categories name
- Scrap all the movies categories slug
- Scrap all the movies related to a category
- Scrap all the data of a movie
Work without any api key
🔥 Installation 🔥
composer require louisperre/composer-td3
⚙️ Usage ⚙️
<?php use louisperr/ApiTmdb; $api = new ApiTmdb(); $categories = $api->getNameCategories() // array
✨ How does that work ? ✨
I use the HttpClient from Symfony to get the HTTP Code of TMDB :
$client = HttpClient::create(); $response = $client->request( 'GET', 'url' ); $content = $response->getContent();
After that I use the Crawler to find and loop over the content and get what I want :
$crawler = new Crawler($content); $list = $crawler ->filter('CSS SELECTOR') ->reduce(function (Crawler $node, $i) use (&$array) : bool { foreach ($node->filter('selector') as $something) { // Do something } })
The filter function allow me to navigate inside the HTML CODE and the reduce one act as a callback function to do some logic to the result and the result I want.
🔧 Local development 🔧
# Install the dependencies
composer install
# Test the type of all the project
php vendor/bin/phpstan analyze src --level=max
# Execute all the test
php vendor/bin/phpunit --testdox tests
📝 License 📝
Licensed under the terms of the MIT License.
louisperre/composer-td3 适用场景与选型建议
louisperre/composer-td3 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 07 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 louisperre/composer-td3 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 louisperre/composer-td3 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-05