Xbmc: The sections movies, shows and kids show no results

Created on 27 Jul 2019  ·  15Comments  ·  Source: Sandmann79/xbmc

I guess Amazon changed again the html. The watchlist and the search function still work, but I noticed that when I try to browse the other sections (movies, shows and kids) it displays an empty list.
There's no error in the log.

Most helpful comment

I attach the patched primevideo.py:

primevideo.zip

I also have this repo with my modifications:
https://github.com/Paco8/kodi-repo/tree/master/packages

All 15 comments

Probable, which is why we're moving away from it. I'm just not done with it though.

I fixed it partially with this patch:

--- primevideo-orig.py  2019-07-31 22:13:40.175048136 +0200
+++ primevideo.py   2019-07-31 22:14:00.402793839 +0200
@@ -609,7 +609,7 @@

             for t in [('\\\\n', '\n'), ('\\n', '\n'), ('\\\\"', '"'), (r'^\s+', '')]:
                 cnt = re.sub(t[0], t[1], cnt, flags=re.DOTALL)
-            if None is not re.search('<div id="Storefront">', cnt):
+            if None is not re.search('<div\s+class="DVWebNode-storefront-wrapper|<div id="Storefront">', cnt):
                 ''' Categories list '''
                 Log('Storefront page', Log.DEBUG)
                 from BeautifulSoup import BeautifulSoup
@@ -648,7 +648,8 @@
                             else:
                                 # Widow carousel with movies/TV series. Most information has been stripped away from
                                 # the carousel, so we can't do more than just forwarding a request
-                                requestURLs.append((link, o[title], ExtractURN(link), True))
+                                if None is re.search(r'/search/', link):
+                                    requestURLs.append((link, o[title], ExtractURN(link), True))
                     else:
                         ''' The carousel has explore link '''
                         NotifyUser(getString(30253).format(title))

I didn't fix the "Genres/Categories" links.

I also noticed another problem, the addon crashes when scanning shows with a single season. This is because amazon changed class="_2XnrBy" with class="_3yWnmV _2XnrBy".

I fixed it by replacing "_2XnrBy" with ".*?_2XnrBy"

--- primevideo-orig.py  2019-07-31 22:13:40.175048136 +0200
+++ primevideo.py   2019-07-31 23:09:12.033161007 +0200
@@ -762,7 +762,7 @@
                     else:
                         ''' Episode list '''
                         # Find out what page revision we're in
-                        if None is not re.search(r'(class="_2XnrBy"|for="[^"]*-season-selector)', cnt):
+                        if None is not re.search(r'(class=".*?_2XnrBy"|for="[^"]*-season-selector)', cnt):
                             revision = 3
                         elif None is not re.search(r'<ol[^>]*>\s*<li id="[ap]v-ep-', cnt, flags=re.DOTALL):
                             revision = 2
@@ -836,7 +836,7 @@
                                         thumbnail = MaxSize(Unescape(gpr['catalogMetadata']['images']['imageUrls']['title']))
                                         self._videodata[refUrn]['metadata']['artmeta'] = {'thumb': thumbnail, 'poster': thumbnail, 'fanart': bgimg}
                                     if 'title' not in self._videodata[refUrn]:
-                                        bSingle = None is not re.search(r'(class="_2XnrBy"|[ap]v-season-single|DigitalVideoWebNodeDetail_seasons__single)', cnt)
+                                        bSingle = None is not re.search(r'(class=".*?_2XnrBy"|[ap]v-season-single|DigitalVideoWebNodeDetail_seasons__single)', cnt)
                                         self._videodata[refUrn]['title'] = Unescape(re.search([
                                             r'<span class="[^"]*[ap]v-season-single[^"]*">\s*(.*?)\s*(?:</a>|</span>)',  # r0 single
                                             r'<a class="[^"]*[ap]v-droplist--selected[^"]*"[^>]*>\s*(.*?)\s*</a>',  # r0 multi
@@ -844,7 +844,7 @@
                                             r'<div class="[^"]*dv-node-dp-seasons.*?<label[^>]*>\s*<span[^>]*>\s*(.*?)\s*</span>\s*</label>',  # r1 multi
                                             r'<span class="[^"]*[ap]v-season-single[^"]*">\s*(.*?)\s*(?:</a>|</span>)',  # r2 single
                                             r'<label class="[^"]*[ap]v-select-trigger[^"]*"[^>]*>\s*(.*?)\s*</label>',  # r2 multi
-                                            r'<span class="_2XnrBy">\s*<span>\s*(.*?)\s*</span>',  # r3 single
+                                            r'<span class=".*?_2XnrBy">\s*<span>\s*(.*?)\s*</span>',  # r3 single
                                             r'<label[^>]*\s+for="[^"]*-season-selector"[^>]*>\s*<span>\s*(.*?)\s*</span>',  # r3 multi
                                         ][(revision << 1) + (0 if bSingle else 1)], cnt, flags=re.DOTALL).group(1))
                                     if 'parent' not in self._videodata[refUrn]:

How do you install and use patch? I also have movies, shows and kids show no results. When typing in Star Trek, it says in the top right corner that it found Into Darkness but, does not appear in results list.

@Paco8
How and where do you put your patches?
Gracias.

I attach the patched primevideo.py:

primevideo.zip

I also have this repo with my modifications:
https://github.com/Paco8/kodi-repo/tree/master/packages

Thanks @Paco8 working perfecto.
Gracias!!!!

Hi @Paco8,
Thanks for the updated Amazon VOD repository. This refreshes all movie contents flawlessly.
However while playing movies, I find that no Video is displayed. Instead the screen is filled with colours with some static disturbance at the top. I tried to toggle with the video settings to no avail. Audio works pefectly. Will be grateful if you have any suggestion for this. I am accessing from India. Thanks in advance.

Update: Got this solved. It was in Kodi Video settings. This video helped. https://youtu.be/rR3sENo_e3Q

I attach the patched primevideo.py:

primevideo.zip

I also have this repo with my modifications:
https://github.com/Paco8/kodi-repo/tree/master/packages

Hello Paco8, how to install the patches please? With FTP and which folders?

Thank you.

Extract primevideo.py from primevideo.zip, and copy it to plugin.video.amazon-test/resources/lib/ replacing the original one.

@Paco8 I have put a link to this topic in the kodi forum. I hope that doesn't create any problem ...
https://forum.kodi.tv/showthread.php?tid=331136&pid=2877470#pid2877470

I attach the patched primevideo.py:

primevideo.zip

I also have this repo with my modifications:
https://github.com/Paco8/kodi-repo/tree/master/packages

Thanks @Paco8 working perfecto.
Gracias!!!! eres un fenomeno

how do i install on kodi? You can help me? @paco8

By the way, it seems amazon made changes again and I think the code which gets the season number from the episode list is broken again.

I made a patch which gets the season number from the json data in case the regular expressions above fail. I attach the patch and the modified primevideo.py

primevideo-fix.zip

Hi all

I had installed the path of August and it worked.
After an absence, I had another mistake.
So I installed the patch of September.
I have no more error but the directory is empty ...
Thanks for your help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Paco8 picture Paco8  ·  12Comments

AlCalzone picture AlCalzone  ·  15Comments

Goommer picture Goommer  ·  9Comments

Morguito picture Morguito  ·  17Comments

jreybert picture jreybert  ·  6Comments