2013-08-13, 21:36
Hi, I'm creating my own scraper using tvdb.xml file to help.
My scraper connect to my local application web for documentaries (I know http://thetvdb.com/ have documentary series but I prefer this way)
When I scraper for a documentary, all the information is downloaded except fanarts (banners, season covers, etc...).
I don't know what I'm doing wrong.
Scraper XML
http://pastebin.com/N4NTFxRS
Debug Log
http://pastebin.com/JNrBEApk
My PHP Controller
Any help is appreciated. Thanks in advance.
My scraper connect to my local application web for documentaries (I know http://thetvdb.com/ have documentary series but I prefer this way)
When I scraper for a documentary, all the information is downloaded except fanarts (banners, season covers, etc...).
I don't know what I'm doing wrong.
Scraper XML
http://pastebin.com/N4NTFxRS
Debug Log
http://pastebin.com/JNrBEApk
My PHP Controller
PHP Code:
/**
* @Route("/api/assets/{id}{_ext}", name="api_asset_show", defaults={"_locale" = "es", "_ext" = ".jpg"})
*/
public function showAction($id)
{
$asset = $this->container->get('doctrine.orm.entity_manager')->getRepository('DocumentalisCoreBundle:Asset')->find($id);
if (empty($asset)) {
throw new HttpException(404, "Asset not found");
}
$file = $asset->getFile();
$content = \stream_get_contents($file);
$response = new Response($content, 200);
$response->headers->add(array(
'Content-Type' => $asset->getContentType(),
'Cache-Control' => 'public, max-age=604800'
));
return $response;
}
Any help is appreciated. Thanks in advance.