Allocine plugin does not return results anymore

Bug #663709 reported by draxx31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Griffith
Fix Committed
Medium
Michael

Bug Description

Hello,

When you try to search a film with allocine plugin, no result is raised (i.e.: Matrix)

Revision history for this message
draxx31 (draxx31) wrote :
Revision history for this message
Michael (mikej06) wrote :

Fixed in rev. 1469
Wait for 0.12.1 or replace the old plugin with the newest one from the source code repo:
http://svn.berlios.de/svnroot/repos/griffith/trunk/lib/plugins/movie/PluginMovieAllocine.py

Changed in griffith:
assignee: nobody → Michael (mikej06)
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
draxx31 (draxx31) wrote :

That is ok for me.

Thank you

Revision history for this message
Pierre-Luc Lévy (pllevy) wrote :

The svn plugin works only if following change on certificate is applied :

    def get_classification(self):
        self.classification = ""
        if 'movieCertificate' in self.movie:
            #~ self.classification = self.movie['movieCertificate']['$'] # no longer valid
            self.classification = self.movie['movieCertificate']['certificate']['$'] # valid

Thanks message in forum http://forum.griffith.cc/index.php/topic,1589.msg5258.html#msg5258

Revision history for this message
Michael (mikej06) wrote :

Thanks for the info.
I checked in your changes with revision 1629 into the repository.

Revision history for this message
Pierre-Luc Lévy (pllevy) wrote :

Hi,
As the API AlloCine has been updated, it is neccessary to update the partner key in the plugin :

--- PluginMovieAllocine.py.before 2013-05-05 13:00:10.000000000 +0200
+++ PluginMovieAllocine.py 2013-05-05 13:00:19.000000000 +0200
@@ -41,7 +41,7 @@
 class Plugin(movie.Movie):
     def __init__(self, id):
         self.movie_id = id
- self.url = "http://api.allocine.fr/rest/v3/movie?partner=YW5kcm9pZC12M3M&format=json&profile=large&code=%s" % str(self.movie_id)
+ self.url = "http://api.allocine.fr/rest/v3/movie?partner=aXBhZC12MQ&format=json&profile=large&code=%s" % str(self.movie_id)
         self.encode = 'utf-8'

     def initialize(self):
@@ -169,8 +169,8 @@
 class SearchPlugin(movie.SearchMovie):

     def __init__(self):
- self.original_url_search = "http://api.allocine.fr/rest/v3/search?partner=YW5kcm9pZC12M3M&count=100&profile=small&format=json&filter=movie&q="
- self.translated_url_search = "http://api.allocine.fr/rest/v3/search?partner=YW5kcm9pZC12M3M&count=100&profile=small&format=json&filter=movie&q="
+ self.original_url_search = "http://api.allocine.fr/rest/v3/search?partner=aXBhZC12MQ&count=100&profile=small&format=json&filter=movie&q="
+ self.translated_url_search = "http://api.allocine.fr/rest/v3/search?partner=aXBhZC12MQ&count=100&profile=small&format=json&filter=movie&q="
         self.encode = 'utf-8'
         self.remove_accents = True

Revision history for this message
Pierre-Luc Lévy (pllevy) wrote :
Revision history for this message
Pierre-Luc Lévy (pllevy) wrote :

Well, Allocine API has changed and the plugin needs to be updated.
Any help would be appreciated because I'm not really fluent in python nor the griffith plugin development.
Here is a sample in PHP of the new API mechanism : https://github.com/gromez/allocine-api

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

That's pretty simple:
edit the file /usr/share/griffith/lib/movie.py

search for 'User-Agent', should be at line 470, you will found these 2 lines

       'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7',
        #'User-Agent': 'Dalvik/1.6.0 (Linux; U; Android 4.2.2; Nexus 4 Build/JDQ39E)',

comment the mozilla line and add this new line:
 'User-Agent': 'Dalvik/1.2.0 (Linux; U; Android 2.2.2; Huawei U8800-51 Build/HWU8800B635)',

this will revert the allociné plugin to work again.

source:
http://allocineapi.codeplex.com/discussions/444464

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

By the way, before that ensure to get the latest source code from svn:
- install svn: sudo apt-get install subversion

then follow the instruction for svn
http://griffith.cc/index.php?option=com_content&task=view&id=24&Itemid=40

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.