#61 Allocine search doesn't work

closed-fixed
nobody
engines (42)
5
2007-08-23
2007-08-19
hj_fr
No

Hi,

The allocine (fr) search doesn't work any more. (The allocine site changed a little in 2007)

On each research, I have a "Nothing found" result. The link "Search yourself" is ok.

Discussion

  • hj_fr

    hj_fr - 2007-08-19

    screenshot

     
  • Andreas Goetz

    Andreas Goetz - 2007-08-19

    Logged In: YES
    user_id=391980
    Originator: NO

    Anybody taking care of the allocine engine?
    If yes, please fix not only the angine gut also provide a complete test case.

    Thanks,
    Andi

     
  • Ze

    Ze - 2007-08-19

    Logged In: YES
    user_id=29992
    Originator: NO

    Yes, I code a dedicated and generic library in PHP who extract information from Allocine. The lib will integrate unit test.

    After that I will rewrite allocine.php engine for videodb... lot of work but more easy to maintain.

     
  • Andreas Goetz

    Andreas Goetz - 2007-08-23
    • status: open --> closed-fixed
     
  • Andreas Goetz

    Andreas Goetz - 2007-08-30

    Logged In: YES
    user_id=391980
    Originator: NO

    Test case showing an error :(

     
  • tedemo

    tedemo - 2007-08-31

    Logged In: YES
    user_id=1294882
    Originator: NO

    Hello andi,

    I have no error on my side, could you give the text of the error ?

    Thanks,
    David

     
  • Andreas Goetz

    Andreas Goetz - 2007-08-31

    Logged In: YES
    user_id=391980
    Originator: NO

    Sorry, forgot that. Cast doesn't seem to be working for me with latest CVS:

    TestAllocine
    Fail: testMovie -> Pattern [/Ewan McGregor::Obi-Wan Kenobi::allocine:17043/s] not detected in [String: ] at [D:\htdocs\videodb\test\test_allocine.php line 47]

    Thanks,
    Andi

     
  • Andreas Goetz

    Andreas Goetz - 2007-08-31

    Logged In: YES
    user_id=391980
    Originator: NO

    PS.: Dont forget to put your name into the engine and test acse source files ;)

     
  • tedemo

    tedemo - 2007-08-31

    Logged In: YES
    user_id=1294882
    Originator: NO

    This problem seems only to happen under php5.
    Here's a patch which should fix it :

    Index: engines/allocine.php

    RCS file: /cvsroot/videodb/videodb/engines/allocine.php,v
    retrieving revision 1.4
    diff -u -r1.4 allocine.php
    --- engines/allocine.php 22 Aug 2007 19:32:18 -0000 1.4
    +++ engines/allocine.php 31 Aug 2007 14:13:01 -0000
    @@ -7,6 +7,7 @@
    * @package Engines
    * @author Douglas Mayle <douglas@mayle.org>
    * @author Andreas Gohr <a.gohr@web.de>
    + * @author tedemo <tedemo@free.fr>
    * @link http://www.allocine.fr Internet Movie Database
    * @version $Id: allocine.php,v 1.4 2007/08/22 19:32:18 andig2 Exp $
    */
    @@ -355,7 +356,6 @@
    // fetch credits
    $resp = httpClient($allocineServer.'/film/casting_gen_cfilm='.$allocineID.'.html', 1);
    if (!$resp['success']) $CLIENTERROR .= $resp['error']."\n";
    - $resp['data'] = preg_replace('/.*?Cast<\/B><\/A>(.*?)<\/TABLE>.*/is', '$1', $resp['data']);

    // Cast
    preg_match('/(<b>Acteur.*?<b>(Acteur.*?<b>)?)/is', $resp['data'], $Section);
    Index: test/test_allocine.php
    ===================================================================
    RCS file: /cvsroot/videodb/videodb/test/test_allocine.php,v
    retrieving revision 1.2
    diff -u -r1.2 test_allocine.php
    --- test/test_allocine.php 30 Aug 2007 17:38:52 -0000 1.2
    +++ test/test_allocine.php 31 Aug 2007 14:13:01 -0000
    @@ -6,6 +6,7 @@
    *
    * @package Test
    * @author Andreas Götz <cpuidle@gmx.de>
    + * @author tedemo <tedemo@free.fr>
    * @version $Id: test_allocine.php,v 1.2 2007/08/30 17:38:52 andig2 Exp $
    */

     
  • Andreas Goetz

    Andreas Goetz - 2007-12-16

    Logged In: YES
    user_id=391980
    Originator: NO

    Could you recheck test case? Current version is throwing php and search errors for me:

    TestAllocine
    Fail: testMovie -> Equal expectation fails at character 5 with [Star Wars : Episode I] and [Star wars : épisode I] at [D:\htdocs\videodb\test\test_allocine.php line 35]
    Fail: testMovie -> Equal expectation fails as [NULL] does not match [String: Adventure,Fantasy,Sci-fi] at [D:\htdocs\videodb\test\test_allocine.php line 46]
    Exception: testMovie -> Unexpected PHP error [sort() expects parameter 1 to be array, string given] severity [E_WARNING] in [D:\htdocs\videodb\test\test_allocine.php line 45]
    Exception: testMovie -> Unexpected PHP error [join() [<a href='function.join'>function.join</a>]: Invalid arguments passed] severity [E_WARNING] in [D:\htdocs\videodb\test\test_allocine.php line 46]

    Thanks,
    Andi

     
  • tedemo

    tedemo - 2007-12-17

    Logged In: YES
    user_id=1294882
    Originator: NO

    Hello,

    I do not have all these warnings, the following patch for test_allocine.php should fix the first failure. It has been tested with succeed here. Does it work for you ?

    http://dl.free.fr/hWwFoJbdA/test_allocine.patch

     
  • Andreas Goetz

    Andreas Goetz - 2007-12-17

    Logged In: YES
    user_id=391980
    Originator: NO

    Thanks, fixed in CVS. Other errors where actually mine in local utf8
    upgrade- good we ahve test cases ;)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks