Skip to content
Snippets Groups Projects

Merge branch 'fix_fnac_tests' into 'hotline'

Compare and
3 files
+ 5530
8091
Preferences
Compare changes
Files
3
@@ -52,11 +52,12 @@ class Class_WebService_Fnac extends Class_WebService_Abstract {
return '';
$suite = $this->httpGet($url_lire_la_suite);
return strip_tags($this->extractResumeFromHTML($suite));
return trim(strip_tags($this->extractResumeFromHTML($suite)));
}
public function getUrlLireLaSuite($data) {
xdebug_break();
$pos = ($pos = striPos($data,"summary")) ? $pos : striPos($data, 'resume');
if(!$pos)
return '';
@@ -71,7 +72,7 @@ class Class_WebService_Fnac extends Class_WebService_Abstract {
if($pos = striPos($html, 'resMarkContent'))
return $this->extractResumeFormBlk($html);
if ($pos = striPos($html, "avisEdContent"))
if ($pos = striPos($html, 'id="Opinions"'))
return $this->extractLireLaSuiteDivAvisEditeurFromHTML($html);
if ($pos = striPos($html, "ficheResume"))
@@ -122,7 +123,10 @@ class Class_WebService_Fnac extends Class_WebService_Abstract {
public function extractLireLaSuiteDivAvisEditeurFromHTML($html) {
$pos = strPos($html, "avisEdContent") + 15;
$pos = strPos($html, 'id="Opinions">') + 15;
$pos = strPos($html, '<div class="whiteContent', $pos) + 25;
$pos = strPos($html, '>', $pos) + 1;
$posfin = strPos($html, "</div>", $pos);
$resume = substr($html, $pos, ($posfin-$pos));
return trim($resume);