hki98/tiktok-custom-php-scraper
Composer 安装命令:
composer require hki98/tiktok-custom-php-scraper
包简介
Custom TikTok Scraper in PHP
README 文档
README
👇🏻 This repo is no longer maintained, please use the new one below.
TikTok® Custom PHP Scraper
Hi there!
I have many TikTok releated web projects and I was looking for a TikTok Custom PHP API or Scraper, All what I found was paid, limited scripts and most of them are in Python. I do not want so many features, I just want a simple script which I give it a TikTok Video URL then I want to get few details about it: Canonical URL, Username & Video ID That is it!
So I decided to write my own custom PHP script to get these details.
Maybe you guys want the same thing, I hope it will be useful for someone else. Enjoy!
Note: This script can be customized to scrape any additional data you want for a TikTok Video. I have only implemented the features that fits my needs.
Installation
composer require hki98/tiktok-custom-php-scraper
Usage
Instantiate the TikTokScraper class with the TikTok video URL and then call the scrapeVideoDetails() method to get the details of the video.
<?php require 'vendor/autoload.php'; use hki98\TikTokScraper; $url = $_GET['url']; // Assuming $url is obtained from user input $scraper = new TikTokScraper($url); $result = $scraper->scrapeVideoDetails(); echo json_encode($result, JSON_PRETTY_PRINT);
Returned Data:
As I mentioned above, I have made this script to only scrape the data that I need. So, It will return only these values for the given TikTok video URL:
{
"status": "ok",
"link": "https://www.tiktok.com/@tiktok/video/7353002700935679278",
"user": "TikTok",
"username": "tiktok",
"user_id": "107955",
"video_id": "7353002700935679278",
"video_desc": "This is your sign to keep doing the things that ignite your soul ✨ You’re destined to be your best self. #WomensMonth #PowerOfWe #JustLikeThat #Manifesting",
"thumbnail": "https://p16-sign.tiktokcdn-us.com/obj/tos-useast5-p-0068-tx/owxlSFD9VCDevQAvkWEIjzCAOA1gdzARCmfOVA?x-expires=1712268000&x-signature=oZRVD2O2Kr1hr96YoN2r%2F15GKoM%3D",
"views": 78900,
"likes": 1413,
"comments": 297,
"shares": 64,
"favorites": "112"
}
Supported Links:
- https://www.tiktok.com/@username/video/012345678901234
- https://vt.tiktok.com/aBcDeFgH
- https://vm.tiktok.com/aBcDeFgH
Used:
Notice: TikTok is a Trademark of ByteDance Ltd.
This project is not affiliated with, endorsed, or sponsored by ByteDance Ltd., the creator of TikTok. TikTok® is a registered trademark of ByteDance Ltd.
The use of the TikTok name, logo, or any related trademarks or intellectual property is for descriptive purposes only, and it does not imply any endorsement or affiliation with this project.
We respect intellectual property rights and are committed to ensuring that our project complies with all applicable copyright and trademark laws. If you believe that any content on this platform infringes on TikTok's trademark or copyright, please contact us promptly so that we can address the concern.
We do not intend to infringe upon any copyrights or trademarks associated with TikTok, and any use of TikTok-related terms is solely for the purpose of providing information and services related to the TikTok platform.
Thank you for your understanding and cooperation.
I'm open to work, let's connect: Haian K. Ibrahim | contact [at] haian.me
hki98/tiktok-custom-php-scraper 适用场景与选型建议
hki98/tiktok-custom-php-scraper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 71 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 04 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「TikTok」 「PHP scraper」 「tiktok api」 「tiktok scraper」 「tiktok php api」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 hki98/tiktok-custom-php-scraper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hki98/tiktok-custom-php-scraper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hki98/tiktok-custom-php-scraper 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A lightweight, dependency free PHP class that acts as wrapper for Crawlbase API
Aftership TikTok Shop extension for Magento 2. Allows connect with TikTok Shop and more.
A tool for scraping URL resources (oEmbed, OpenGraph, Twitter cards, JSON-LD)
TikTok scrapper for Laravel 7+
Scrapes app data from Google Play store.
统计信息
- 总下载量: 71
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2024-04-03