データの取得方法をAPIからスクレイピングに変更
より多くのタグと高画質なサムネイルを取得するように変更
This commit is contained in:
@@ -20,15 +20,18 @@ class XtubeResolverTest extends TestCase
|
||||
|
||||
public function test()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Xtube/test.json');
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Xtube/video.html');
|
||||
|
||||
$this->createResolver(XtubeResolver::class, $responseText);
|
||||
|
||||
$metadata = $this->resolver->resolve('https://www.xtube.com/video-watch/homegrown-big-tits-18634762');
|
||||
$this->assertEquals('Homegrown Big Tits', $metadata->title);
|
||||
$this->assertEquals('Dedicated to the fans of the beautiful amateur women with big natural tits. All user submitted - you can see big boob amateur hotties fucking and sucking as their tits bounce and sway.', $metadata->description);
|
||||
$this->assertRegExp('~https://cdn\d+-s-hw-e5\.xtube\.com/m=eSK08f/videos/201302/07/RF4Nk-S774-/240X180/1\.jpg~', $metadata->image);
|
||||
$this->assertEquals(['bigtits', 'homeg'], $metadata->tags);
|
||||
$this->assertRegExp('~https://cdn\d+-s-hw-e5\.xtube\.com/m=eaAaaEFb/videos/201302/07/RF4Nk-S774-/original/1\.jpg~', $metadata->image);
|
||||
$this->assertEquals(['Amateur', 'Blowjob', 'Big Boobs', 'bigtits', 'homeg'], $metadata->tags);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://www.xtube.com/video-watch/homegrown-big-tits-18634762', (string) $this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testNotMatch()
|
||||
|
Reference in New Issue
Block a user