Merge pull request #101 from hinaloe/tests/mockable-resolver
GuzzleHttpをモック可能にする
This commit is contained in:
commit
f760ea7093
4
.gitignore
vendored
4
.gitignore
vendored
@ -12,4 +12,6 @@ yarn-error.log
|
||||
.env
|
||||
*.iml
|
||||
.php_cs
|
||||
.php_cs.cache
|
||||
.php_cs.cache
|
||||
.phpstorm.meta.php
|
||||
_ide_helper*.php
|
||||
|
@ -21,7 +21,8 @@ class LinkCollector
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
* @param Formatter $formatter
|
||||
* @param MetadataResolver $metadataResolver
|
||||
*/
|
||||
public function __construct(Formatter $formatter, MetadataResolver $metadataResolver)
|
||||
{
|
||||
|
@ -3,16 +3,30 @@
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class CienResolver extends MetadataResolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
|
||||
// 画像URLから有効期限の起点を拾う
|
||||
parse_str(parse_url($metadata->image, PHP_URL_QUERY), $params);
|
||||
|
@ -2,16 +2,31 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class DLsiteResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata->image = str_replace('img_sam.jpg', 'img_main.jpg', $metadata->image);
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
$metadata->image = str_replace('img_sam.jpg', 'img_main.jpg', $metadata->image);
|
||||
|
||||
return $metadata;
|
||||
} else {
|
||||
|
@ -2,15 +2,30 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class DeviantArtResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
|
||||
$dom = new \DOMDocument();
|
||||
@$dom->loadHTML(mb_convert_encoding($res->getBody(), 'HTML-ENTITIES', 'UTF-8'));
|
||||
|
@ -2,20 +2,33 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class FantiaResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
preg_match("~\d+~", $url, $match);
|
||||
$postId = $match[0];
|
||||
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
|
||||
$dom = new \DOMDocument();
|
||||
@$dom->loadHTML(mb_convert_encoding($res->getBody(), 'HTML-ENTITIES', 'UTF-8'));
|
||||
|
@ -2,16 +2,31 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class FanzaResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata->image = preg_replace("~(pr|ps)\.jpg$~", 'pl.jpg', $metadata->image);
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
$metadata->image = preg_replace("~(pr|ps)\.jpg$~", 'pl.jpg', $metadata->image);
|
||||
|
||||
return $metadata;
|
||||
} else {
|
||||
|
@ -2,12 +2,24 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class IwaraResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
|
||||
public function __construct(Client $client)
|
||||
{
|
||||
$this->client = $client;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$dom = new \DOMDocument();
|
||||
@$dom->loadHTML(mb_convert_encoding($res->getBody(), 'HTML-ENTITIES', 'UTF-8'));
|
||||
|
@ -2,8 +2,20 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class KomifloResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
|
||||
public function __construct(Client $client)
|
||||
{
|
||||
$this->client = $client;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
if (preg_match('~komiflo\.com(?:/#!)?/comics/(\\d+)~', $url, $matches) !== 1) {
|
||||
@ -11,8 +23,7 @@ class KomifloResolver implements Resolver
|
||||
}
|
||||
$id = $matches[1];
|
||||
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get('https://api.komiflo.com/content/id/' . $id);
|
||||
$res = $this->client->get('https://api.komiflo.com/content/id/' . $id);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$json = json_decode($res->getBody()->getContents(), true);
|
||||
$metadata = new Metadata();
|
||||
|
@ -2,19 +2,33 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
|
||||
class MelonbooksResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$cookieJar = CookieJar::fromArray(['AUTH_ADULT' => '1'], 'www.melonbooks.co.jp');
|
||||
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url, ['cookies' => $cookieJar]);
|
||||
$res = $this->client->get($url, ['cookies' => $cookieJar]);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
|
||||
// censoredフラグの除去
|
||||
if (mb_strpos($metadata->image, '&c=1') !== false) {
|
||||
|
@ -37,7 +37,8 @@ class MetadataResolver implements Resolver
|
||||
{
|
||||
foreach ($this->rules as $pattern => $class) {
|
||||
if (preg_match($pattern, $url) === 1) {
|
||||
$resolver = new $class();
|
||||
/** @var Resolver $resolver */
|
||||
$resolver = app($class);
|
||||
|
||||
return $resolver->resolve($url);
|
||||
}
|
||||
@ -49,13 +50,14 @@ class MetadataResolver implements Resolver
|
||||
}
|
||||
|
||||
if (isset($this->defaultResolver)) {
|
||||
$resolver = new $this->defaultResolver();
|
||||
/** @var Resolver $resolver */
|
||||
$resolver = app($this->defaultResolver);
|
||||
return $resolver->resolve($url);
|
||||
}
|
||||
|
||||
throw new \UnexpectedValueException('URL not matched.');
|
||||
}
|
||||
|
||||
|
||||
public function resolveWithAcceptHeader(string $url): ?Metadata
|
||||
{
|
||||
try {
|
||||
|
@ -2,19 +2,33 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
|
||||
class NarouResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$cookieJar = CookieJar::fromArray(['over18' => 'yes'], '.syosetu.com');
|
||||
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url, ['cookies' => $cookieJar]);
|
||||
$res = $this->client->get($url, ['cookies' => $cookieJar]);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
$metadata->description = '';
|
||||
|
||||
$dom = new \DOMDocument();
|
||||
|
@ -2,15 +2,30 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class NicoSeigaResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
|
||||
// ページURLからサムネイルURLに変換
|
||||
preg_match('~http://(?:(?:sp\\.)?seiga\\.nicovideo\\.jp/seiga(?:/#!)?|nico\\.ms)/im(\\d+)~', $url, $matches);
|
||||
|
@ -2,8 +2,25 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class NijieResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
protected $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
if (mb_strpos($url, '//sp.nijie.info') !== false) {
|
||||
@ -13,11 +30,10 @@ class NijieResolver implements Resolver
|
||||
$url = preg_replace('~view_popup\.php~', 'view.php', $url);
|
||||
}
|
||||
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$client = $this->client;
|
||||
$res = $client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
|
||||
$dom = new \DOMDocument();
|
||||
@$dom->loadHTML(mb_convert_encoding($res->getBody(), 'HTML-ENTITIES', 'UTF-8'));
|
||||
|
@ -2,12 +2,23 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class OGPResolver implements Resolver, Parser
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
|
||||
public function __construct(Client $client)
|
||||
{
|
||||
$this->client = $client;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
return $this->parse($res->getBody());
|
||||
} else {
|
||||
|
@ -3,19 +3,33 @@
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class PatreonResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
|
||||
parse_str(parse_url($metadata->image, PHP_URL_QUERY), $temp);
|
||||
$expires_at_unixtime = $temp["token-time"];
|
||||
$expires_at_unixtime = $temp['token-time'];
|
||||
$expires_at = Carbon::createFromTimestamp($expires_at_unixtime);
|
||||
|
||||
$metadata->expires_at = $expires_at;
|
||||
|
@ -2,8 +2,25 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class PixivResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
/**
|
||||
* サムネイル画像 URL から最大長辺 1200px の画像 URL に変換する
|
||||
*
|
||||
@ -46,11 +63,9 @@ class PixivResolver implements Resolver
|
||||
$url = preg_replace('~mode=manga(_big)?~', 'mode=medium', $url);
|
||||
}
|
||||
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url);
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
$metadata = $ogpResolver->parse($res->getBody());
|
||||
$metadata = $this->ogpResolver->parse($res->getBody());
|
||||
|
||||
preg_match("~https://i\.pximg\.net/c/128x128/img-master/img/\d{4}/\d{2}/\d{2}/\d{2}/\d{2}/\d{2}/{$illustId}(_p0)?_square1200\.jpg~", $res->getBody(), $match);
|
||||
$illustThumbnailUrl = $match[0];
|
||||
|
@ -2,20 +2,34 @@
|
||||
|
||||
namespace App\MetadataResolver;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
|
||||
class ToranoanaResolver implements Resolver
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var OGPResolver
|
||||
*/
|
||||
private $ogpResolver;
|
||||
|
||||
public function __construct(Client $client, OGPResolver $ogpResolver)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->ogpResolver = $ogpResolver;
|
||||
}
|
||||
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$cookieJar = CookieJar::fromArray(['adflg' => '0'], 'ec.toranoana.jp');
|
||||
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->get($url, ['cookies' => $cookieJar]);
|
||||
$res = $this->client->get($url, ['cookies' => $cookieJar]);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
$ogpResolver = new OGPResolver();
|
||||
|
||||
return $ogpResolver->parse($res->getBody());
|
||||
return $this->ogpResolver->parse($res->getBody());
|
||||
} else {
|
||||
throw new \RuntimeException("{$res->getStatusCode()}: $url");
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.1",
|
||||
"barryvdh/laravel-ide-helper": "^2.5",
|
||||
"filp/whoops": "~2.0",
|
||||
"friendsofphp/php-cs-fixer": "^2.14",
|
||||
"fzaninotto/faker": "~1.4",
|
||||
|
485
composer.lock
generated
485
composer.lock
generated
@ -1,10 +1,10 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "9a0efd1b396f7a748eee3b98cbd7b6a6",
|
||||
"content-hash": "79423bebbfa31e28aab2d06ba7e19828",
|
||||
"packages": [
|
||||
{
|
||||
"name": "anhskohbo/no-captcha",
|
||||
@ -3045,6 +3045,265 @@
|
||||
],
|
||||
"time": "2018-11-09T08:37:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/laravel-ide-helper",
|
||||
"version": "v2.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
|
||||
"reference": "3d7f1240896a075aa23b13f82dfcbe165dadeef2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/3d7f1240896a075aa23b13f82dfcbe165dadeef2",
|
||||
"reference": "3d7f1240896a075aa23b13f82dfcbe165dadeef2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"barryvdh/reflection-docblock": "^2.0.6",
|
||||
"composer/composer": "^1.6",
|
||||
"illuminate/console": "^5.5,<5.8",
|
||||
"illuminate/filesystem": "^5.5,<5.8",
|
||||
"illuminate/support": "^5.5,<5.8",
|
||||
"php": ">=7"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "~2.3",
|
||||
"illuminate/config": "^5.1,<5.8",
|
||||
"illuminate/view": "^5.1,<5.8",
|
||||
"phpro/grumphp": "^0.14",
|
||||
"phpunit/phpunit": "4.*",
|
||||
"scrutinizer/ocular": "~1.1",
|
||||
"squizlabs/php_codesniffer": "^3"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/dbal": "Load information from the database about models for phpdocs (~2.3)"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.5-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Barryvdh\\LaravelIdeHelper\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Barry vd. Heuvel",
|
||||
"email": "barryvdh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.",
|
||||
"keywords": [
|
||||
"autocomplete",
|
||||
"codeintel",
|
||||
"helper",
|
||||
"ide",
|
||||
"laravel",
|
||||
"netbeans",
|
||||
"phpdoc",
|
||||
"phpstorm",
|
||||
"sublime"
|
||||
],
|
||||
"time": "2018-12-19T12:12:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/reflection-docblock",
|
||||
"version": "v2.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/ReflectionDocBlock.git",
|
||||
"reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/6b69015d83d3daf9004a71a89f26e27d27ef6a16",
|
||||
"reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0,<4.5"
|
||||
},
|
||||
"suggest": {
|
||||
"dflydev/markdown": "~1.0",
|
||||
"erusev/parsedown": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Barryvdh": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mike van Riel",
|
||||
"email": "mike.vanriel@naenius.com"
|
||||
}
|
||||
],
|
||||
"time": "2018-12-13T10:34:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/ca-bundle",
|
||||
"version": "1.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/ca-bundle.git",
|
||||
"reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/558f321c52faeb4828c03e7dc0cfe39a09e09a2d",
|
||||
"reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-openssl": "*",
|
||||
"ext-pcre": "*",
|
||||
"php": "^5.3.2 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
|
||||
"psr/log": "^1.0",
|
||||
"symfony/process": "^2.5 || ^3.0 || ^4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\CaBundle\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
}
|
||||
],
|
||||
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
|
||||
"keywords": [
|
||||
"cabundle",
|
||||
"cacert",
|
||||
"certificate",
|
||||
"ssl",
|
||||
"tls"
|
||||
],
|
||||
"time": "2019-01-28T09:30:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/composer",
|
||||
"version": "1.8.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/composer.git",
|
||||
"reference": "bc364c2480c17941e2135cfc568fa41794392534"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/composer/zipball/bc364c2480c17941e2135cfc568fa41794392534",
|
||||
"reference": "bc364c2480c17941e2135cfc568fa41794392534",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer/ca-bundle": "^1.0",
|
||||
"composer/semver": "^1.0",
|
||||
"composer/spdx-licenses": "^1.2",
|
||||
"composer/xdebug-handler": "^1.1",
|
||||
"justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0",
|
||||
"php": "^5.3.2 || ^7.0",
|
||||
"psr/log": "^1.0",
|
||||
"seld/jsonlint": "^1.4",
|
||||
"seld/phar-utils": "^1.0",
|
||||
"symfony/console": "^2.7 || ^3.0 || ^4.0",
|
||||
"symfony/filesystem": "^2.7 || ^3.0 || ^4.0",
|
||||
"symfony/finder": "^2.7 || ^3.0 || ^4.0",
|
||||
"symfony/process": "^2.7 || ^3.0 || ^4.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/console": "2.8.38"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7",
|
||||
"phpunit/phpunit-mock-objects": "^2.3 || ^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
|
||||
"ext-zip": "Enabling the zip extension allows you to unzip archives",
|
||||
"ext-zlib": "Allow gzip compression of HTTP requests"
|
||||
},
|
||||
"bin": [
|
||||
"bin/composer"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.8-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\": "src/Composer"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nils Adermann",
|
||||
"email": "naderman@naderman.de",
|
||||
"homepage": "http://www.naderman.de"
|
||||
},
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
}
|
||||
],
|
||||
"description": "Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.",
|
||||
"homepage": "https://getcomposer.org/",
|
||||
"keywords": [
|
||||
"autoload",
|
||||
"dependency",
|
||||
"package"
|
||||
],
|
||||
"time": "2019-02-11T09:52:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "1.4.2",
|
||||
@ -3107,6 +3366,67 @@
|
||||
],
|
||||
"time": "2016-08-30T16:08:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/spdx-licenses",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/spdx-licenses.git",
|
||||
"reference": "7a9556b22bd9d4df7cad89876b00af58ef20d3a2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7a9556b22bd9d4df7cad89876b00af58ef20d3a2",
|
||||
"reference": "7a9556b22bd9d4df7cad89876b00af58ef20d3a2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
|
||||
"phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\Spdx\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nils Adermann",
|
||||
"email": "naderman@naderman.de",
|
||||
"homepage": "http://www.naderman.de"
|
||||
},
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
},
|
||||
{
|
||||
"name": "Rob Bast",
|
||||
"email": "rob.bast@gmail.com",
|
||||
"homepage": "http://robbast.nl"
|
||||
}
|
||||
],
|
||||
"description": "SPDX licenses list and validation library.",
|
||||
"keywords": [
|
||||
"license",
|
||||
"spdx",
|
||||
"validator"
|
||||
],
|
||||
"time": "2018-11-01T09:45:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/xdebug-handler",
|
||||
"version": "1.3.1",
|
||||
@ -3528,6 +3848,72 @@
|
||||
],
|
||||
"time": "2016-01-20T08:20:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "justinrainbow/json-schema",
|
||||
"version": "5.2.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/justinrainbow/json-schema.git",
|
||||
"reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/dcb6e1006bb5fd1e392b4daa68932880f37550d4",
|
||||
"reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "~2.2.20",
|
||||
"json-schema/json-schema-test-suite": "1.2.0",
|
||||
"phpunit/phpunit": "^4.8.35"
|
||||
},
|
||||
"bin": [
|
||||
"bin/validate-json"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"JsonSchema\\": "src/JsonSchema/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Bruno Prieto Reis",
|
||||
"email": "bruno.p.reis@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Justin Rainbow",
|
||||
"email": "justin.rainbow@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Igor Wiedler",
|
||||
"email": "igor@wiedler.ch"
|
||||
},
|
||||
{
|
||||
"name": "Robert Schönthal",
|
||||
"email": "seroscho@googlemail.com"
|
||||
}
|
||||
],
|
||||
"description": "A library to validate a json schema.",
|
||||
"homepage": "https://github.com/justinrainbow/json-schema",
|
||||
"keywords": [
|
||||
"json",
|
||||
"schema"
|
||||
],
|
||||
"time": "2019-01-14T23:55:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
"version": "v1.15.0",
|
||||
@ -5021,6 +5407,99 @@
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2016-10-03T07:35:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "seld/jsonlint",
|
||||
"version": "1.7.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/jsonlint.git",
|
||||
"reference": "d15f59a67ff805a44c50ea0516d2341740f81a38"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/d15f59a67ff805a44c50ea0516d2341740f81a38",
|
||||
"reference": "d15f59a67ff805a44c50ea0516d2341740f81a38",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/jsonlint"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Seld\\JsonLint\\": "src/Seld/JsonLint/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
}
|
||||
],
|
||||
"description": "JSON Linter",
|
||||
"keywords": [
|
||||
"json",
|
||||
"linter",
|
||||
"parser",
|
||||
"validator"
|
||||
],
|
||||
"time": "2018-01-24T12:46:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "seld/phar-utils",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/phar-utils.git",
|
||||
"reference": "7009b5139491975ef6486545a39f3e6dad5ac30a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/7009b5139491975ef6486545a39f3e6dad5ac30a",
|
||||
"reference": "7009b5139491975ef6486545a39f3e6dad5ac30a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Seld\\PharUtils\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be"
|
||||
}
|
||||
],
|
||||
"description": "PHAR file format utilities, for when PHP phars you up",
|
||||
"keywords": [
|
||||
"phra"
|
||||
],
|
||||
"time": "2015-10-13T18:44:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v4.2.2",
|
||||
@ -5370,7 +5849,7 @@
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=7.0.0"
|
||||
"php": ">=7.1.0"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
||||
|
53
tests/Unit/MetadataResolver/CreateMockedResolver.php
Normal file
53
tests/Unit/MetadataResolver/CreateMockedResolver.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\MetadataResolver;
|
||||
|
||||
use App\MetadataResolver\Resolver;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Handler\MockHandler;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use Monolog\Handler\AbstractHandler;
|
||||
|
||||
trait CreateMockedResolver
|
||||
{
|
||||
/**
|
||||
* @var Resolver
|
||||
*/
|
||||
protected $resolver;
|
||||
|
||||
/**
|
||||
* @var AbstractHandler
|
||||
*/
|
||||
protected $handler;
|
||||
|
||||
/**
|
||||
* @param string $resolverClass
|
||||
* @param string $responseText
|
||||
* @param array $headers
|
||||
* @param int $status
|
||||
* @return Resolver
|
||||
*/
|
||||
protected function createResolver(string $resolverClass, string $responseText, array $headers = [], int $status = 200)
|
||||
{
|
||||
if (!$this->shouldUseMock()) {
|
||||
$this->resolver = app()->make($resolverClass);
|
||||
|
||||
return $this->resolver;
|
||||
}
|
||||
|
||||
$headers += [
|
||||
'content-type' => 'text/html',
|
||||
];
|
||||
|
||||
$mockResponse = new Response($status, $headers, $responseText);
|
||||
$this->handler = new MockHandler([$mockResponse]);
|
||||
$client = new Client(['handler' => $this->handler]);
|
||||
$this->resolver = app()->make($resolverClass, ['client' => $client]);
|
||||
return $this->resolver;
|
||||
}
|
||||
|
||||
protected function shouldUseMock(): bool
|
||||
{
|
||||
return (bool)env('TEST_USE_HTTP_MOCK', true);
|
||||
}
|
||||
}
|
@ -7,95 +7,135 @@ use Tests\TestCase;
|
||||
|
||||
class NijieResolverTest extends TestCase
|
||||
{
|
||||
use CreateMockedResolver;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function testStandardPicture()
|
||||
{
|
||||
sleep(1);
|
||||
$resolver = new NijieResolver();
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
||||
|
||||
$metadata = $resolver->resolve('https://nijie.info/view.php?id=66384');
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
$metadata = $this->resolver->resolve('https://nijie.info/view.php?id=66384');
|
||||
$this->assertEquals('チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営', $metadata->title);
|
||||
$this->assertEquals("メールマガジン漫画のバックナンバー第一話です!\r\n最新話はメールマガジンより配信中です。", $metadata->description);
|
||||
$this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image);
|
||||
$this->assertNotRegExp('~/diff/main/~', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://nijie.info/view.php?id=66384', (string)$this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testMultiplePicture()
|
||||
{
|
||||
sleep(1);
|
||||
$resolver = new NijieResolver();
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMultiplePictureResponse.html');
|
||||
|
||||
$metadata = $resolver->resolve('https://nijie.info/view.php?id=202707');
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
$metadata = $this->resolver->resolve('https://nijie.info/view.php?id=202707');
|
||||
$this->assertEquals('ニジエ壁紙 | ニジエ運営', $metadata->title);
|
||||
$this->assertEquals("ニジエのPCとiphone用(4.7inch推奨)の壁紙です。\r\n保存してご自由にお使いくださいませ。", $metadata->description);
|
||||
$this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image);
|
||||
$this->assertNotRegExp('~/diff/main/~', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://nijie.info/view.php?id=202707', (string)$this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testAnimationGif()
|
||||
{
|
||||
sleep(1);
|
||||
$resolver = new NijieResolver();
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testAnimationGifResponse.html');
|
||||
|
||||
$metadata = $resolver->resolve('https://nijie.info/view.php?id=9537');
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
$metadata = $this->resolver->resolve('https://nijie.info/view.php?id=9537');
|
||||
$this->assertEquals('ニジエがgifに対応したんだってね 奥さん | 黒末アプコ', $metadata->title);
|
||||
$this->assertEquals('アニメgifとか専門外なのでよくわかりませんでした', $metadata->description);
|
||||
$this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://nijie.info/view.php?id=9537', (string)$this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testMp4Movie()
|
||||
{
|
||||
sleep(1);
|
||||
$resolver = new NijieResolver();
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html');
|
||||
|
||||
$metadata = $resolver->resolve('https://nijie.info/view.php?id=256283');
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
$metadata = $this->resolver->resolve('https://nijie.info/view.php?id=256283');
|
||||
$this->assertEquals('てすと | ニジエ運営', $metadata->title);
|
||||
$this->assertEquals("H264動画てすと あとで消します\r\n\r\n今の所、H264コーデックのみ、出力時に音声なしにしないと投稿できません\r\n動画は勝手にループします", $metadata->description);
|
||||
$this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://nijie.info/view.php?id=256283', (string)$this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testStandardPictureSp()
|
||||
{
|
||||
sleep(1);
|
||||
$resolver = new NijieResolver();
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
||||
|
||||
$metadata = $resolver->resolve('https://sp.nijie.info/view.php?id=66384');
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
$metadata = $this->resolver->resolve('https://sp.nijie.info/view.php?id=66384');
|
||||
$this->assertEquals('チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営', $metadata->title);
|
||||
$this->assertEquals("メールマガジン漫画のバックナンバー第一話です!\r\n最新話はメールマガジンより配信中です。", $metadata->description);
|
||||
$this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image);
|
||||
$this->assertNotRegExp('~/diff/main/~', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://nijie.info/view.php?id=66384', (string)$this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testMultiplePictureSp()
|
||||
{
|
||||
sleep(1);
|
||||
$resolver = new NijieResolver();
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMultiplePictureResponse.html');
|
||||
|
||||
$metadata = $resolver->resolve('https://sp.nijie.info/view.php?id=202707');
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
$metadata = $this->resolver->resolve('https://sp.nijie.info/view.php?id=202707');
|
||||
$this->assertEquals('ニジエ壁紙 | ニジエ運営', $metadata->title);
|
||||
$this->assertEquals("ニジエのPCとiphone用(4.7inch推奨)の壁紙です。\r\n保存してご自由にお使いくださいませ。", $metadata->description);
|
||||
$this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image);
|
||||
$this->assertNotRegExp('~/diff/main/~', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://nijie.info/view.php?id=202707', (string)$this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testAnimationGifSp()
|
||||
{
|
||||
sleep(1);
|
||||
$resolver = new NijieResolver();
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testAnimationGifResponse.html');
|
||||
|
||||
$metadata = $resolver->resolve('https://nijie.info/view.php?id=9537');
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
|
||||
$metadata = $this->resolver->resolve('https://nijie.info/view.php?id=9537');
|
||||
$this->assertEquals('ニジエがgifに対応したんだってね 奥さん | 黒末アプコ', $metadata->title);
|
||||
$this->assertEquals('アニメgifとか専門外なのでよくわかりませんでした', $metadata->description);
|
||||
$this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://nijie.info/view.php?id=9537', (string)$this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testMp4MovieSp()
|
||||
{
|
||||
sleep(1);
|
||||
$resolver = new NijieResolver();
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html');
|
||||
|
||||
$metadata = $resolver->resolve('https://sp.nijie.info/view.php?id=256283');
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
$metadata = $this->resolver->resolve('https://sp.nijie.info/view.php?id=256283');
|
||||
$this->assertEquals('てすと | ニジエ運営', $metadata->title);
|
||||
$this->assertEquals("H264動画てすと あとで消します\r\n\r\n今の所、H264コーデックのみ、出力時に音声なしにしないと投稿できません\r\n動画は勝手にループします", $metadata->description);
|
||||
$this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://nijie.info/view.php?id=256283', (string)$this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,18 +8,45 @@ use Tests\TestCase;
|
||||
|
||||
class OGPResolverTest extends TestCase
|
||||
{
|
||||
use CreateMockedResolver;
|
||||
|
||||
public function testMissingUrl()
|
||||
{
|
||||
$resolver = new OGPResolver();
|
||||
$this->createResolver(OGPResolver::class, '', [], 404);
|
||||
|
||||
$this->expectException(ClientException::class);
|
||||
$resolver->resolve('http://example.com/404');
|
||||
$this->expectException(\RuntimeException::class);
|
||||
$this->resolver->resolve('http://example.com/404');
|
||||
}
|
||||
|
||||
public function testResolve()
|
||||
{
|
||||
$resolver = new OGPResolver();
|
||||
$response = <<< 'HTML'
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head prefix="og: http://ogp.me/ns#">
|
||||
<meta charset="utf-8">
|
||||
<title>The Open Graph protocol</title>
|
||||
<meta name="description" content="The Open Graph protocol enables any web page to become a rich object in a social graph.">
|
||||
<link rel="stylesheet" href="base.css" type="text/css">
|
||||
<meta property="og:title" content="Open Graph protocol">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://ogp.me/">
|
||||
<meta property="og:image" content="http://ogp.me/logo.png">
|
||||
<meta property="og:image:type" content="image/png">
|
||||
<meta property="og:image:width" content="300">
|
||||
<meta property="og:image:height" content="300">
|
||||
<meta property="og:image:alt" content="The Open Graph logo">
|
||||
<meta property="og:description" content="The Open Graph protocol enables any web page to become a rich object in a social graph.">
|
||||
<meta prefix="fb: http://ogp.me/ns/fb#" property="fb:app_id" content="115190258555800">
|
||||
<link rel="alternate" type="application/rdf+xml" href="http://ogp.me/ns/ogp.me.rdf">
|
||||
<link rel="alternate" type="text/turtle" href="http://ogp.me/ns/ogp.me.ttl">
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
HTML;
|
||||
$this->createResolver(OGPResolver::class, $response);
|
||||
|
||||
$resolver = $this->createResolver(OGPResolver::class, $response);
|
||||
$metadata = $resolver->resolve('http://ogp.me');
|
||||
$this->assertEquals('Open Graph protocol', $metadata->title);
|
||||
$this->assertEquals('The Open Graph protocol enables any web page to become a rich object in a social graph.', $metadata->description);
|
||||
@ -28,9 +55,22 @@ class OGPResolverTest extends TestCase
|
||||
|
||||
public function testResolveTitleOnly()
|
||||
{
|
||||
$resolver = new OGPResolver();
|
||||
$response = <<< 'HTML'
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Example Domain</title>
|
||||
|
||||
$metadata = $resolver->resolve('http://example.com');
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
HTML;
|
||||
$this->createResolver(OGPResolver::class, $response);
|
||||
|
||||
$metadata = $this->resolver->resolve('http://example.com');
|
||||
$this->assertEquals('Example Domain', $metadata->title);
|
||||
$this->assertEmpty($metadata->description);
|
||||
$this->assertEmpty($metadata->image);
|
||||
@ -38,7 +78,7 @@ class OGPResolverTest extends TestCase
|
||||
|
||||
public function testResolveTitleAndDescription()
|
||||
{
|
||||
$resolver = new OGPResolver();
|
||||
$resolver = $this->app->make(OGPResolver::class);
|
||||
|
||||
$html = <<<EOF
|
||||
<title>Welcome to my homepage</title>
|
||||
|
11
tests/fixture/Nijie/testAnimationGifResponse.html
Normal file
11
tests/fixture/Nijie/testAnimationGifResponse.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><link rel="alternate" media="handheld" href="http://mb.nijie.info/view.php?id=9537" /><link rel="alternate" media="only screen and (max-width: 640px)" href="https://sp.nijie.info/view.php?id=9537" /><link rel="canonical" href="https://nijie.info/view.php?id=9537" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=970" /><meta name="format-detection" content="telephone=no" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Content-Style-Type" content="text/css; charset=utf-8" /><meta http-equiv="Content-Script-Type" content="text/javascript" /><meta http-equiv="Content-Language" content="ja" /><meta name="description" content="ニジエに投稿された、黒末アプコのイラスト「ニジエがgifに対応したんだってね 奥さん」です。この画像はニジエがgifに対応したんだってね 奥さん,黒末アプコ,おっぱい,陥没乳首,眼鏡,GIFアニメ,ぶるんぶるん,アニメgif,に関連があります。「アニメgifとか専門外なのでよくわかりませんでした」" /><meta name="keywords" content="ニジエがgifに対応したんだってね 奥さん,黒末アプコ,おっぱい,陥没乳首,眼鏡,GIFアニメ,ぶるんぶるん,アニメgif," /><meta property="og:title" content="ニジエがgifに対応したんだってね 奥さん | 黒末アプコ" /><meta property="og:type" content="article" /><meta property="og:description" content="アニメgifとか専門外なのでよくわかりませんでした" /><meta property="og:url" content="https://nijie.info/view.php?id=9537" /><meta property="og:image" content="https://nijie.info/pic/logo/nijie_logo_og.png?201902161557" /><meta property="og:site_name" content="ニジエがgifに対応したんだってね 奥さん | 黒末アプコ | ニジエ" /><meta property="og:email" content="info@nijie.co.jp" /><link rel="alternate" href="https://nijie.info/view.php?id=9537" hreflang="x-default" /><link rel="shortcut icon" href="https://nijie.info/icon/favicon.ico?201902161557" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="https://nijie.info/pic/icon/nijie.png?201902161557" /><title>ニジエがgifに対応したんだってね 奥さん | 黒末アプコ | ニジエ</title></head>
|
||||
<body>
|
||||
<!-- pickup some json -->
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "ImageObject","name": "ニジエがgifに対応したんだってね 奥さん","description": "アニメgifとか専門外なのでよくわかりませんでした","text": "アニメgifとか専門外なのでよくわかりませんでした","interactionCount": "10862 UserPlays, 6 UserComments","datePublished": "Sun Apr 8 06:59:48 2012","uploadDate": "Sun Apr 8 06:59:48 2012","dateModified": "Mon Apr 9 17:09:30 2012","copyrightYear": "2012","genre":"Image","contentLocation":"Japan","width":160,"height":90,"thumbnailUrl": "https://pic01.nijie.info/__rs_l160x160/nijie_picture/201204080659341943.gif","author": {"@type": "Person","name": "黒末アプコ","description": "判子エロ絵師とはわたしのことです","sameAs": "https://nijie.info/members.php?id=1943","image": "https://pic04.nijie.info/members_picture/thumbnail/1943_1542569693.gif"},"creator": {"@type": "Person","name": "黒末アプコ","description": "判子エロ絵師とはわたしのことです","sameAs": "https://nijie.info/members.php?id=1943","image": "https://pic04.nijie.info/members_picture/thumbnail/1943_1542569693.gif"},"editor": {"@type": "Person","name": "黒末アプコ","description": "判子エロ絵師とはわたしのことです","sameAs": "https://nijie.info/members.php?id=1943","image": "https://pic04.nijie.info/members_picture/thumbnail/1943_1542569693.gif"},"copyrightHolder": {"@type": "Person","name": "黒末アプコ","description": "判子エロ絵師とはわたしのことです","sameAs": "https://nijie.info/members.php?id=1943","image": "https://pic04.nijie.info/members_picture/thumbnail/1943_1542569693.gif"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "ティッシュ","author": {"@type": "Person","name": "黒末アプコ","description": "判子エロ絵師とはわたしのことです","sameAs": "https://nijie.info/members.php?id=1943","image": "http://pic04.nijie.info/members_picture/thumbnail/1943_1542569693.gif"},"datePublished": "Wed Nov 19 12:57:57 2014","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "ニジエがgifに対応したんだってね 奥さん","sameAs": "https://nijie.info/view.php?id=9537"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "ひっ さくや様! ガタガタガタ ","author": {"@type": "Person","name": "黒末アプコ","description": "判子エロ絵師とはわたしのことです","sameAs": "https://nijie.info/members.php?id=1943","image": "http://pic04.nijie.info/members_picture/thumbnail/1943_1542569693.gif"},"datePublished": "Thu Apr 19 20:48:02 2012","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "ニジエがgifに対応したんだってね 奥さん","sameAs": "https://nijie.info/view.php?id=9537"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "さっ、最高です!!","author": {"@type": "Person","name": "黒末アプコ","description": "判子エロ絵師とはわたしのことです","sameAs": "https://nijie.info/members.php?id=1943","image": "http://pic04.nijie.info/members_picture/thumbnail/1943_1542569693.gif"},"datePublished": "Thu Apr 19 20:35:19 2012","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "ニジエがgifに対応したんだってね 奥さん","sameAs": "https://nijie.info/view.php?id=9537"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "ぎょっ 新着コメントがtopに表示されないバグ しこっていただけてさいわいです","author": {"@type": "Person","name": "黒末アプコ","description": "判子エロ絵師とはわたしのことです","sameAs": "https://nijie.info/members.php?id=1943","image": "http://pic04.nijie.info/members_picture/thumbnail/1943_1542569693.gif"},"datePublished": "Sun Apr 8 14:04:52 2012","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "ニジエがgifに対応したんだってね 奥さん","sameAs": "https://nijie.info/view.php?id=9537"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "BreadcrumbList","itemListElement":[{"@type": "ListItem","position": 1,"item":{"@id": "https://nijie.info/members.php?id=1943","name": "黒末アプコ"}},{"@type": "ListItem","position": 2,"item":{"@id": "https://nijie.info/members_illust.php?id=1943","name": "黒末アプコさんのイラスト一覧"}},{"@type": "ListItem","position": 3,"item":{"@id": "https://nijie.info/view.php?id=9537","name": "ニジエがgifに対応したんだってね 奥さん"}}]}</script>
|
||||
</body></html>
|
||||
|
30
tests/fixture/Nijie/testMp4MovieResponse.html
Normal file
30
tests/fixture/Nijie/testMp4MovieResponse.html
Normal file
File diff suppressed because one or more lines are too long
12
tests/fixture/Nijie/testMultiplePictureResponse.html
Normal file
12
tests/fixture/Nijie/testMultiplePictureResponse.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><link rel="alternate" media="handheld" href="http://mb.nijie.info/view.php?id=202707" /><link rel="alternate" media="only screen and (max-width: 640px)" href="https://sp.nijie.info/view.php?id=202707" /><link rel="canonical" href="https://nijie.info/view.php?id=202707" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=970" /><meta name="format-detection" content="telephone=no" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Content-Style-Type" content="text/css; charset=utf-8" /><meta http-equiv="Content-Script-Type" content="text/javascript" /><meta http-equiv="Content-Language" content="ja" /><meta name="description" content="ニジエに投稿された、ニジエ運営のイラスト「ニジエ壁紙」です。この画像はニジエ壁紙,ニジエ運営,ニジエたん,壁紙,に関連があります。「ニジエのPCとiphone用(4.7inch推奨)の壁紙です。
|
||||
保存してご自由にお使いくださいませ。」" /><meta name="keywords" content="ニジエ壁紙,ニジエ運営,ニジエたん,壁紙," />
|
||||
<meta property="og:title" content="ニジエ壁紙 | ニジエ運営" /><meta property="og:type" content="article" /><meta property="og:description" content="ニジエのPCとiphone用(4.7inch推奨)の壁紙です。
|
||||
保存してご自由にお使いくださいませ。" /><meta property="og:url" content="https://nijie.info/view.php?id=202707" /><meta property="og:image" content="https://nijie.info/pic/logo/nijie_logo_og.png?201902161557" /><meta property="og:site_name" content="ニジエ壁紙 | ニジエ運営 | ニジエ" /><meta property="og:email" content="info@nijie.co.jp" /><link rel="alternate" href="https://nijie.info/view.php?id=202707" hreflang="x-default" /><link rel="shortcut icon" href="https://nijie.info/icon/favicon.ico?201902161557" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="https://nijie.info/pic/icon/nijie.png?201902161557" /><title>ニジエ壁紙 | ニジエ運営 | ニジエ</title></head>
|
||||
<body>
|
||||
<!-- pickup some JSON-LD -->
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "ImageObject","name": "ニジエ壁紙","description": "ニジエのPCとiphone用(4.7inch推奨)の壁紙です。
|
||||
保存してご自由にお使いくださいませ。","text": "ニジエのPCとiphone用(4.7inch推奨)の壁紙です。
|
||||
保存してご自由にお使いくださいませ。","interactionCount": "2301 UserPlays, 4 UserComments","datePublished": "Thu Feb 9 18:58:03 2017","uploadDate": "Thu Feb 9 18:58:03 2017","dateModified": "Thu Feb 9 18:58:03 2017","copyrightYear": "2017","genre":"Image","contentLocation":"Japan","width":160,"height":90,"thumbnailUrl": "https://pic03.nijie.info/__rs_l160x160/nijie_picture/38_20170209185801_0.png","author": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "https://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"creator": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "https://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"editor": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "https://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"copyrightHolder": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "https://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "やったぜ!","author": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "http://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"datePublished": "Fri Feb 17 01:31:00 2017","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "ニジエ壁紙","sameAs": "https://nijie.info/view.php?id=202707"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "ぺろぺろしたいです","author": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "http://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"datePublished": "Fri Feb 17 01:30:54 2017","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "ニジエ壁紙","sameAs": "https://nijie.info/view.php?id=202707"}}</script>
|
||||
</body></html>
|
16
tests/fixture/Nijie/testStandardPictureResponse.html
Normal file
16
tests/fixture/Nijie/testStandardPictureResponse.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><link rel="alternate" media="handheld" href="http://mb.nijie.info/view.php?id=66384" /><link rel="alternate" media="only screen and (max-width: 640px)" href="https://sp.nijie.info/view.php?id=66384" /><link rel="canonical" href="https://nijie.info/view.php?id=66384" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=970" /><meta name="format-detection" content="telephone=no" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Content-Style-Type" content="text/css; charset=utf-8" /><meta http-equiv="Content-Script-Type" content="text/javascript" /><meta http-equiv="Content-Language" content="ja" /><meta name="description" content="ニジエに投稿された、ニジエ運営のイラスト「チンポップくんの日常ep.1「チンポップくんと釣り」」です。この画像はチンポップくんの日常ep.1「チンポップくんと釣り」,ニジエ運営,ニジエたん,釣り,チンポップ君の日常,公式漫画,に関連があります。「メールマガジン漫画のバックナンバー第一話です!
|
||||
最新話はメールマガジンより配信中です。」" /><meta name="keywords" content="チンポップくんの日常ep.1「チンポップくんと釣り」,ニジエ運営,ニジエたん,釣り,チンポップ君の日常,公式漫画," /><meta property="og:title" content="チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営" /><meta property="og:type" content="article" /><meta property="og:description" content="メールマガジン漫画のバックナンバー第一話です!
|
||||
最新話はメールマガジンより配信中です。" /><meta property="og:url" content="https://nijie.info/view.php?id=66384" /><meta property="og:image" content="https://nijie.info/pic/logo/nijie_logo_og.png?201902161557" /><meta property="og:site_name" content="チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営 | ニジエ" /><meta property="og:email" content="info@nijie.co.jp" /><link rel="alternate" href="https://nijie.info/view.php?id=66384" hreflang="x-default" /><link rel="shortcut icon" href="https://nijie.info/icon/favicon.ico?201902161557" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="https://nijie.info/pic/icon/nijie.png?201902161557" /><title>チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営 | ニジエ</title></head>
|
||||
<body>
|
||||
<!-- pickup only json -->
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "ImageObject","name": "チンポップくんの日常ep.1「チンポップくんと釣り」","description": "メールマガジン漫画のバックナンバー第一話です!
|
||||
最新話はメールマガジンより配信中です。","text": "メールマガジン漫画のバックナンバー第一話です!
|
||||
最新話はメールマガジンより配信中です。","interactionCount": "13634 UserPlays, 24 UserComments","datePublished": "Sat Nov 30 15:56:26 2013","uploadDate": "Sat Nov 30 15:56:26 2013","dateModified": "Sat Nov 30 15:56:26 2013","copyrightYear": "2013","genre":"Image","contentLocation":"Japan","width":160,"height":90,"thumbnailUrl": "https://pic04.nijie.info/__rs_l160x160/nijie_picture/38_20131130155623.png","author": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "https://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"creator": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "https://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"editor": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "https://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"copyrightHolder": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "https://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "ミルコ字幕","author": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "http://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"datePublished": "Tue Jan 27 08:58:02 2015","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "チンポップくんの日常ep.1「チンポップくんと釣り」","sameAs": "https://nijie.info/view.php?id=66384"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "ティッシュ","author": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "http://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"datePublished": "Tue Aug 26 17:56:41 2014","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "チンポップくんの日常ep.1「チンポップくんと釣り」","sameAs": "https://nijie.info/view.php?id=66384"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "ヨダレもの","author": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "http://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"datePublished": "Mon Jun 23 10:17:29 2014","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "チンポップくんの日常ep.1「チンポップくんと釣り」","sameAs": "https://nijie.info/view.php?id=66384"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "おまわりさんこっちです","author": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "http://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"datePublished": "Thu Mar 27 10:49:56 2014","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "チンポップくんの日常ep.1「チンポップくんと釣り」","sameAs": "https://nijie.info/view.php?id=66384"}}</script>
|
||||
<script type="application/ld+json">{"@context": "http://schema.org","@type": "Review","reviewBody": "めちゃシコ","author": {"@type": "Person","name": "ニジエ運営","description": "ニジエンジョイ!","sameAs": "https://nijie.info/members.php?id=38","image": "http://pic04.nijie.info/members_picture/thumbnail/38_1511696698.png"},"datePublished": "Sat Feb 15 18:47:22 2014","contentLocation": "Japan","itemReviewed": {"@type" : "ImageObject","name" : "チンポップくんの日常ep.1「チンポップくんと釣り」","sameAs": "https://nijie.info/view.php?id=66384"}}</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user