mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-12-18 08:54:20 +03:00
[TikTokBridge] Include author profile picture (#4354)
This commit is contained in:
parent
d956471d42
commit
59d77d4576
1 changed files with 2 additions and 1 deletions
|
@ -29,6 +29,7 @@ class TikTokBridge extends BridgeAbstract
|
||||||
$html = getSimpleHTMLDOMCached('https://www.tiktok.com/embed/' . $this->processUsername());
|
$html = getSimpleHTMLDOMCached('https://www.tiktok.com/embed/' . $this->processUsername());
|
||||||
|
|
||||||
$author = $html->find('span[data-e2e=creator-profile-userInfo-TUXText]', 0)->plaintext ?? self::NAME;
|
$author = $html->find('span[data-e2e=creator-profile-userInfo-TUXText]', 0)->plaintext ?? self::NAME;
|
||||||
|
$authorProfilePicture = $html->find('img[data-e2e=creator-profile-userInfo-Avatar]', 0)->src ?? '';
|
||||||
|
|
||||||
$videos = $html->find('div[data-e2e=common-videoList-VideoContainer]');
|
$videos = $html->find('div[data-e2e=common-videoList-VideoContainer]');
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ class TikTokBridge extends BridgeAbstract
|
||||||
$image = $video->find('video', 0)->poster;
|
$image = $video->find('video', 0)->poster;
|
||||||
$views = $video->find('div[data-e2e=common-Video-Count]', 0)->plaintext;
|
$views = $video->find('div[data-e2e=common-Video-Count]', 0)->plaintext;
|
||||||
|
|
||||||
$enclosures = [$image];
|
$enclosures = [$image, $authorProfilePicture];
|
||||||
|
|
||||||
$item['uri'] = $url;
|
$item['uri'] = $url;
|
||||||
$item['title'] = 'Video';
|
$item['title'] = 'Video';
|
||||||
|
|
Loading…
Reference in a new issue