accept both desktop and mobile user agents scraper

This commit is contained in:
Pablo Ferreiro 2023-04-05 17:09:22 +02:00
parent d09830cc89
commit 4e191922fe
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
3 changed files with 14 additions and 8 deletions

12
composer.lock generated
View file

@ -303,16 +303,16 @@
}, },
{ {
"name": "pablouser1/tikscraper", "name": "pablouser1/tikscraper",
"version": "v2.3.6.3", "version": "v2.3.6.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/pablouser1/TikScraperPHP.git", "url": "https://github.com/pablouser1/TikScraperPHP.git",
"reference": "99c75fc1786c63276592b0f9859a232f17876f6a" "reference": "b26764777121dbc4408f84140b802869a77b575e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/99c75fc1786c63276592b0f9859a232f17876f6a", "url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/b26764777121dbc4408f84140b802869a77b575e",
"reference": "99c75fc1786c63276592b0f9859a232f17876f6a", "reference": "b26764777121dbc4408f84140b802869a77b575e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -346,9 +346,9 @@
"description": "Get data from TikTok API", "description": "Get data from TikTok API",
"support": { "support": {
"issues": "https://github.com/pablouser1/TikScraperPHP/issues", "issues": "https://github.com/pablouser1/TikScraperPHP/issues",
"source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.3.6.3" "source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.3.6.4"
}, },
"time": "2023-04-03T14:23:28+00:00" "time": "2023-04-05T15:08:06+00:00"
}, },
{ {
"name": "php-webdriver/webdriver", "name": "php-webdriver/webdriver",

View file

@ -17,15 +17,18 @@
{if !empty($item->challenges)} {if !empty($item->challenges)}
<p>{include './common/tags.latte', challenges: $item->challenges}</p> <p>{include './common/tags.latte', challenges: $item->challenges}</p>
{/if} {/if}
<p n:ifcontent>{render_desc($item->desc, $item->textExtra)|noescape}</p> <p n:ifcontent>{render_desc($item->desc, $item->textExtra ?? [])|noescape}</p>
<p>Song: {$item->music->title}</p> <p>Song: {$item->music->title}</p>
<audio controls preload="none" src="{url_stream($item->music->playUrl)}"></audio> <audio controls preload="none" src="{url_stream($item->music->playUrl)}"></audio>
{include './common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount} {include './common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount}
<div class="has-text-centered"> <div class="has-text-centered">
{include './common/content.latte', item: $item, isAutoplay: false, isBig: false} {include './common/content.latte', item: $item, isAutoplay: false, isBig: false}
</div> </div>
{if isset($item->video->playAddr)}
<!-- Download links, not shown if item is a gallery -->
<p class="has-text-centered"><b>Download video</b></p> <p class="has-text-centered"><b>Download video</b></p>
{include './common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $item->author->uniqueId} {include './common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $item->author->uniqueId}
{/if}
<p class="has-text-centered"><b>Share link</b></p> <p class="has-text-centered"><b>Share link</b></p>
{include './common/share.latte', uniqueId: $item->author->uniqueId, id: $item->id} {include './common/share.latte', uniqueId: $item->author->uniqueId, id: $item->id}
<div class="has-text-centered"> <div class="has-text-centered">

View file

@ -33,13 +33,16 @@
<p>{include '../components/themes/common/tags.latte', challenges: $item->challenges}</p> <p>{include '../components/themes/common/tags.latte', challenges: $item->challenges}</p>
{/if} {/if}
<div class="content"> <div class="content">
<p n:ifcontent>{render_desc($item->desc, $item->textExtra)|noescape}</p> <p n:ifcontent>{render_desc($item->desc, $item->textExtra ?? [])|noescape}</p>
<p>Song: {$item->music->title}</p> <p>Song: {$item->music->title}</p>
<audio controls preload="none" src="{url_stream($item->music->playUrl)}"></audio> <audio controls preload="none" src="{url_stream($item->music->playUrl)}"></audio>
{include '../components/themes/common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount} {include '../components/themes/common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount}
<div class="has-text-centered"> <div class="has-text-centered">
{include '../components/themes/common/share.latte', uniqueId: $info->detail->uniqueId, id: $item->id} {include '../components/themes/common/share.latte', uniqueId: $info->detail->uniqueId, id: $item->id}
{if isset($item->video->playAddr)}
<!-- Download links, not shown if item is a gallery -->
{include '../components/themes/common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $info->detail->uniqueId} {include '../components/themes/common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $info->detail->uniqueId}
{/if}
</div> </div>
</div> </div>
</div> </div>