Sandmann79 / xbmc

Prime Video Addon for Kodi Media Center
https://forum.kodi.tv/showthread.php?tid=349255
GNU General Public License v3.0
759 stars 192 forks source link

video.amazon-test stuck on loding circle on startup / No JSON objects found in the page #696

Closed stei-f closed 11 months ago

stei-f commented 1 year ago

Addon used

Account type

System Setup (please provide the following information):

Upload Logs Debug-Log:

2023-06-30 18:40:31.467 T:1590    debug <general>: ------ Window Deinit (Home.xml) ------
2023-06-30 18:40:31.467 T:1590    debug <general>: FreeVisualisation() done
2023-06-30 18:40:31.488 T:1590    debug <general>: ------ Window Init (MyVideoNav.xml) ------
2023-06-30 18:40:31.488 T:1590     info <general>: Loading skin file: MyVideoNav.xml, load type: KEEP_IN_MEMORY
2023-06-30 18:40:31.545 T:1590    debug <general>: CGUIMediaWindow::GetDirectory (plugin://plugin.video.amazon-test/)
2023-06-30 18:40:31.545 T:1590    debug <general>:   ParentPath = [plugin://plugin.video.amazon-test/]
2023-06-30 18:40:31.545 T:2138    debug <general>: Thread waiting start, auto delete: false
2023-06-30 18:40:31.547 T:2137    debug <general>: CAddonDatabase::SetLastUsed[plugin.video.amazon-test] took 2 ms
2023-06-30 18:40:31.547 T:2138    debug <general>: CScriptRunner: running add-on script Amazon VOD('plugin://plugin.video.amazon-test/', '1', '')
2023-06-30 18:40:31.548 T:2139    debug <general>: Thread LanguageInvoker start, auto delete: false
2023-06-30 18:40:31.548 T:2139    debug <general>: initializing python engine.
2023-06-30 18:40:31.548 T:2139    debug <general>: CPythonInvoker(8, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): start processing
2023-06-30 18:40:31.585 T:2139    debug <general>: -->Python Interpreter Initialized<--
2023-06-30 18:40:31.585 T:2139    debug <general>:

2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): the source file to load is "/home/kodi/.kodi/addons/plugin.video.amazon-test/default.py"
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8): default python path:
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):   /usr/lib/python38.zip
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):   /usr/lib/python3.8
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):   /usr/lib/python3.8/lib-dynload
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):   /usr/local/lib/python3.8/dist-packages
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):   /usr/lib/python3/dist-packages
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8): adding path:
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/plugin.video.amazon-test
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.beautifulsoup4/lib
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.certifi/lib
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.chardet/lib
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.idna/lib
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.inputstreamhelper/lib
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.kodi-six/libs
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.mechanicalsoup/lib
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.pyautogui/lib
2023-06-30 18:40:31.585 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.pyxbmct/lib
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.requests/lib
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.six/lib
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.soupsieve/lib
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8):  /home/kodi/.kodi/addons/script.module.urllib3/lib
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8): adding args:
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8):  plugin://plugin.video.amazon-test/
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8):  1
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8):
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8):  resume:false
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): entering source directory /home/kodi/.kodi/addons/plugin.video.amazon-test
2023-06-30 18:40:31.586 T:2139    debug <general>: CPythonInvoker(8, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): instantiating addon using automatically obtained id of "plugin.video.amazon-test" dependent on version 3.0.0 of the xbmc.python api
2023-06-30 18:40:31.646 T:1590    debug <general>: ------ Window Init (DialogBusy.xml) ------
2023-06-30 18:40:32.354 T:2139    debug <CAddonSettings[0@plugin.video.amazon-test]>: trying to load setting definitions from old format...
2023-06-30 18:40:32.357 T:2139    debug <CSettingsManager>: requested setting (at_check) was not found.
2023-06-30 18:40:32.357 T:2139    debug <CSettingsManager>: requested setting (at_lang) was not found.
2023-06-30 18:40:32.357 T:2139    debug <CSettingsManager>: requested setting (country) was not found.
2023-06-30 18:40:32.357 T:2139    debug <CSettingsManager>: requested setting (drm_check) was not found.
2023-06-30 18:40:32.357 T:2139    debug <CSettingsManager>: requested setting (fallback_method) was not found.
2023-06-30 18:40:32.357 T:2139    debug <CSettingsManager>: requested setting (primevideo_area) was not found.
2023-06-30 18:40:32.357 T:2139    debug <CSettingsManager>: requested setting (save_login) was not found.
2023-06-30 18:40:32.358 T:2139    debug <CSettingsManager>: requested setting (set_login) was not found.
2023-06-30 18:40:32.358 T:2139    debug <CSettingsManager>: requested setting (sub_lang) was not found.
2023-06-30 18:40:32.358 T:2139    debug <CSettingsManager>: requested setting (subtitles) was not found.
2023-06-30 18:40:32.358 T:2139    debug <CSettingsManager>: requested setting (uhd_android) was not found.
2023-06-30 18:40:32.358 T:2139    debug <CSettingsManager>: requested setting (use_mfa) was not found.
2023-06-30 18:40:32.358 T:2139    debug <CSettingsManager>: requested setting (use_webapi) was not found.
2023-06-30 18:40:32.395 T:2139    debug <general>: [Amazon VOD] Requested {}
2023-06-30 18:40:32.399 T:1590    debug <general>: CGUIMediaWindow::GetDirectory (plugin://plugin.video.amazon-test/)
2023-06-30 18:40:32.399 T:1590    debug <general>:   ParentPath = [plugin://plugin.video.amazon-test/]
2023-06-30 18:40:32.400 T:1590  warning <general>: CGUIMediaWindow::OnMessage - updating in progress
2023-06-30 18:40:32.403 T:2137    debug <general>: Skipped 4 duplicate messages..
2023-06-30 18:40:32.403 T:2137    debug <general>: CAddonDatabase::SetLastUsed[plugin.video.amazon-test] took 3 ms
2023-06-30 18:40:32.403 T:2130    debug <general>: CScriptRunner: running add-on script Amazon VOD('plugin://plugin.video.amazon-test/', '2', '')
2023-06-30 18:40:32.403 T:2140    debug <general>: Thread LanguageInvoker start, auto delete: false
2023-06-30 18:40:32.403 T:2140    debug <general>: initializing python engine.
2023-06-30 18:40:32.403 T:2140    debug <general>: CPythonInvoker(9, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): start processing
2023-06-30 18:40:32.429 T:2139     info <general>: [Amazon VOD] Version: 0.9.9~beta
2023-06-30 18:40:32.429 T:2139     info <general>: [Amazon VOD] Unicode filename support: False
2023-06-30 18:40:32.429 T:2139     info <general>: [Amazon VOD] Locale: de-de / Language: de
2023-06-30 18:40:32.465 T:1590  warning <general>: CGUIMediaWindow::OnMessage - updating in progress
2023-06-30 18:40:32.481 T:2140    debug <general>: -->Python Interpreter Initialized<--
2023-06-30 18:40:32.481 T:2140    debug <general>:

2023-06-30 18:40:32.481 T:2140    debug <general>: CPythonInvoker(9, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): the source file to load is "/home/kodi/.kodi/addons/plugin.video.amazon-test/default.py"
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9): default python path:
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):   /usr/lib/python38.zip
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):   /usr/lib/python3.8
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):   /usr/lib/python3.8/lib-dynload
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):   /usr/local/lib/python3.8/dist-packages
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):   /usr/lib/python3/dist-packages
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9): adding path:
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/plugin.video.amazon-test
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.beautifulsoup4/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.certifi/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.chardet/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.idna/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.inputstreamhelper/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.kodi-six/libs
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.mechanicalsoup/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.pyautogui/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.pyxbmct/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.requests/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.six/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.soupsieve/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  /home/kodi/.kodi/addons/script.module.urllib3/lib
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9): adding args:
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  plugin://plugin.video.amazon-test/
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  2
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9):  resume:false
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): entering source directory /home/kodi/.kodi/addons/plugin.video.amazon-test
2023-06-30 18:40:32.482 T:2140    debug <general>: CPythonInvoker(9, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): instantiating addon using automatically obtained id of "plugin.video.amazon-test" dependent on version 3.0.0 of the xbmc.python api
2023-06-30 18:40:32.814 T:2139    debug <general>: [Amazon VOD] Download Time: 0.3567756929999746
2023-06-30 18:40:32.817 T:2139    error <general>: [Amazon VOD] No JSON objects found in the page
2023-06-30 18:40:32.817 T:2139    debug <general>: CPythonInvoker(8, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): script successfully run
2023-06-30 18:40:32.817 T:2139    debug <general>: onExecutionDone(8, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py)
2023-06-30 18:40:32.853 T:2139    debug <general>: .
2023-06-30 18:40:32.946 T:2139    debug <general>: Python interpreter stopped
2023-06-30 18:40:32.946 T:2139    debug <general>: Thread LanguageInvoker 140307169531648 terminating
2023-06-30 18:40:32.954 T:2138    error <general>: GetDirectory - Error getting plugin://plugin.video.amazon-test/
2023-06-30 18:40:32.954 T:2138    debug <general>: Thread waiting 140305927194368 terminating
2023-06-30 18:40:33.406 T:2140    debug <CAddonSettings[0@plugin.video.amazon-test]>: trying to load setting definitions from old format...
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (at_check) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (at_lang) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (country) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (drm_check) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (fallback_method) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (primevideo_area) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (save_login) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (set_login) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (sub_lang) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (subtitles) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (uhd_android) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (use_mfa) was not found.
2023-06-30 18:40:33.409 T:2140    debug <CSettingsManager>: requested setting (use_webapi) was not found.
2023-06-30 18:40:33.447 T:2140    debug <general>: [Amazon VOD] Requested {}
2023-06-30 18:40:33.466 T:1590  warning <general>: CGUIMediaWindow::OnMessage - updating in progress
2023-06-30 18:40:33.564 T:2140     info <general>: Skipped 5 duplicate messages..
2023-06-30 18:40:33.564 T:2140     info <general>: [Amazon VOD] Version: 0.9.9~beta
2023-06-30 18:40:33.564 T:2140     info <general>: [Amazon VOD] Unicode filename support: False
2023-06-30 18:40:33.564 T:2140     info <general>: [Amazon VOD] Locale: de-de / Language: de
2023-06-30 18:40:33.582 T:1590  warning <general>: CGUIMediaWindow::OnMessage - updating in progress
2023-06-30 18:40:33.775 T:2140    debug <general>: [Amazon VOD] Download Time: 0.20696601600002396
2023-06-30 18:40:33.781 T:2140    error <general>: [Amazon VOD] No JSON objects found in the page
2023-06-30 18:40:33.781 T:2140    debug <general>: CPythonInvoker(9, /home/kodi/.kodi/addons/plugin.video.amazon-test/default.py): script successfully run

Describe the bug After opening the Amazon Video Addon Kodi get stuck on the loading circle forever. You cannon exit with any input.

stei-f commented 1 year ago

See also #695, I think this is the same. I didn't want to hijack his bug with my debug logs.

It seems like it retries multiple times and eventually end up stuck. I tired the current beta (logs) and the latest stable, both behave the same.

tux4you commented 1 year ago

same here xbian nexus amazon vod 0.9.8+matrix.1

same error: error : [Amazon VOD] No JSON objects found in the page

looks like it stuck ... in tcpdump i do not see any connection retries

Sandmann79 commented 1 year ago

Amazon now interposes an anti-robot captcha for normal page requests, which the addon does not currently support. Now it would be easy to integrate the captcha query into the addon, but since this would complicate the handling of the addon, it would be better to know why the captcha appears in the addon and not when using a web browser.

tux4you commented 1 year ago

puh, ok ... sounds not so easy ... do you need help or have any ideas, how to integrate the captcha query into the addon?

tux4you commented 1 year ago

blind chicken ... please reproduce this: i started a browser on my pc, logged in amazon and started an video/movie via prime after that, i started your app and voila ... it works :/

Kampfader commented 1 year ago

"pc" is the same hardware that ubuntu runs on?

tux4you commented 1 year ago

"pc" is the same hardware that ubuntu runs on?

no, sorry, its a normal workstation and has nothing to do with kodi maybe there is some ip whitelisting on the amazon server, so if you logged in an opened something, you are trusted ... dont know i tested this 2 times now

stei-f commented 1 year ago

Amazon now interposes an anti-robot captcha for normal page requests, which the addon does not currently support. Now it would be easy to integrate the captcha query into the addon, but since this would complicate the handling of the addon, it would be better to know why the captcha appears in the addon and not when using a web browser.

What client_string/user_agent uses the addon? Empty http clients are almost every time send to the robot detection.

stei-f commented 1 year ago

"pc" is the same hardware that ubuntu runs on?

no, sorry, its a normal workstation and has nothing to do with kodi maybe there is some ip whitelisting on the amazon server, so if you logged in an opened something, you are trusted ... dont know i tested this 2 times now

When I do this (on the same client kodi is running), I can get one step further. The addon loads and presents the first selection screen. Upon selecting a "section" it start hanging in the load circle. I will try reverting to the last stable addon version.


UPDATE:

Stable version can get further down the tree (it seems). Getting sporadic errors of "Did not get answer from server":

2023-07-04 17:05:54.151 T:4796    error <general>: Skipped 5 duplicate messages..
2023-07-04 17:05:54.151 T:4796    error <general>: [Amazon VOD] Error reason: 503 error (TryAgain)
2023-07-04 17:05:54.152 T:4796     info <general>: [Amazon VOD] Attempt #2
2023-07-04 17:05:56.937 T:4796    error <general>: [Amazon VOD] No JSON objects found in the page
2023-07-04 17:05:56.943 T:4796    error <general>: [Amazon VOD] Unable to fetch the url: ...

hmm... Any support I can provide?

tux4you commented 1 year ago

yesterday was working ... today out ...

you need some help?

Ronny-nerd commented 1 year ago

Have you ever tried it with it...on Windows it works with it too...if you then under data source: instead of Web = Android and delete the cache.

https://github.com/Sandmann79/xbmc/issues/674#issuecomment-1455485306

screenshot3 screenshot4

tux4you commented 1 year ago

this is not working on debian linux/ xbian :( actually its not working anymore ... up to yesterday, it was working after 5-6 times trying ...

something to do? something, we can help you?

thanks

tux4you commented 1 year ago

to not push you to much ... but @Sandmann79 , do you think its possible to solve that problem?

fkoss commented 1 year ago

Same problem here! If I start a video on another machine, kodi will NOT stuck on loading and shows the prime menu.

tux4you commented 1 year ago

Same problem here! If I start a video on another machine, kodi will NOT stuck on loading and shows the prime menu.

not working anymore here ... anybody out there, who got it working?

cow-crash commented 1 year ago

Same problem since few weeks. Is anybody working on this?

nocreativi commented 1 year ago

Have you ever tried it with it...on Windows it works with it too...if you then under data source: instead of Web = Android and delete the cache.

Changing the data source to "Android" and then back to "web" + deleting the cache works for me (kodi 20.2 Raspi4).

tux4you commented 1 year ago

one other question ... somebody tried browser launcher and firefox or chomium? is that usable/working?

@Sandmann79 i tried a little bit with http proxy, but did not see anything, expect this url ... maybe you see there something .... dont know TCP_MISS/503 7834 POST http://127.0.0.1:41921/gpr/https%3A%2F%2Fatv-ps-eu.amazon.de%2Fcdp%2Fcatalog%2FGetPlaybackResources%3Fasin%3DB00V412SFY%26deviceTypeID%3DAOAGZA014O5RE%26firmware%3D1%26deviceID%3Dcdc6dbc7477c496cad11164dd59cc72b%26marketplaceID%3DA1PA6795UKMFR9%26format%3Djson%26version%3D2%26gascEnabled%3Dfalse%26subtitleFormat%3DTTMLv2%26resourceUsage%3DImmediateConsumption%26consumptionType%3DStreaming%26deviceDrmOverride%3DCENC%26deviceStreamingTechnologyOverride%3DDASH%26deviceProtocolOverride%3DHttps%26deviceBitrateAdaptationsOverride%3DCVBR%252CCBR%26audioTrackId%3Dall%26languageFeature%3DMLFv2%26videoMaterialType%3DFeature%26desiredResources%3DPlaybackUrls%2CSubtitleUrls%2CForcedNarratives%2CTransitionTimecodes%26supportedDRMKeyScheme%3DDUAL_KEY

cow-crash commented 1 year ago

On my system kodi 18.9 raspi3 the data source can't change. It's grayed. Clean cache has no effect.

behemoth38 commented 1 year ago

@cowcrash, gleiches bei mir

Sandmann79 commented 1 year ago

Captcha support is already built in. But it comes every two hours, which of course is not very user-friendly. Next, I don't understand why the captcha appears in the addon - if the same http request is executed only with the same user-agent and cookie in curl, a response comes without captcha. Even a minimal code rebuild in python worked without problems. Maybe @Varstahl has an idea what the problem could be? He definitely has more experience in this field :wink:

But since I'm not getting anywhere at this point, I've decided to continue working on the Android Api for now. There will be a beta to test in the next few days.

tux4you commented 1 year ago

@Sandmann79 i do not understand ... did you built it captcha for the actual problem now? will there come a new version? you are right ... "not very user-friendly" ... but better than nothing :)

if you need help with the api, tell us.

Sandmann79 commented 1 year ago

@tux4you sorry for the confusion, i meant in my not yet published builds

tux4you commented 1 year ago

hehe ... no problem :) waiting for public builds ... everything is better than nothing

thank you for the great work

tux4you commented 1 year ago

@Sandmann79 will test tomorrow ... are you german? gute arbeit, vielen dank und einen schönen abend https://www.kodinerds.net/thread/44211-release-amazon-prime-instant-video/?postID=725403#post725403

Sandmann79 commented 1 year ago

@tux4you Yes I am. Since a little more info is needed here comes the announcement about the beta only now.

Included in the beta is a solver for the simple Amazon Captchas. This should make the Web-API usable again. This is realized by a separate module, which is only executable from Kodi 19 and higher. It is mandatory to install the module before installing the beta, otherwise an error will occur. With Kodi 18 or if the captcha is not recognized, it must be solved manually.

In the beta, the Android-API is also unlocked. Feedback from PrimeVideo users would be important here, as I could not test this properly due to a limited account and thus my watchlist is not displayed. Please be sure to test this. The Android Api can be activated at Settings > Data Source. There you can also activate the coloring of the content, but this does not work one hundred percent for Freevee and Live content.

Important notes about the Android-API:

Downloads: Captcha Solver Module for Kodi 19 and higher: script.module.amazoncaptcha-0.5.11+matrix.1.zip Beta 2 for Kodi 19 and higher: plugin.video.amazon-test-0.9.9~beta2+matrix.1.zip Fixed Beta 2 for Kodi 18: plugin.video.amazon-test-0.9.9~beta2+leia.zip

cow-crash commented 1 year ago

@ Sandmann79 thanks for your work. i've tested 'plugin.video.amazon-test-0.9.9~beta2+leia.zip' do i have to install the captcha plugin 'script.module.amazoncaptcha-0.5.11+matrix.1.zip' or is there a separate zip for leia? I got following error on starting: 2023-07-27 16:21:10.569 T:1404040064 NOTICE: [Amazon VOD] MFA, DCQ or Captcha form 2023-07-27 16:21:10.861 T:1416590208 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

Sandmann79 commented 1 year ago

@cow-crash as already written, the Captcha module only runs from Kodi 19 onwards. A fix for the bug in Kodi 18 is on the way…

fkoss commented 1 year ago

Dear Mr. @Sandmann79

I'd like to confirm that your addons script.module.amazoncaptcha-0.5.11+matrix.1.zip and plugin.video.amazon-test-0.9.9~beta2+matrix.1.zip are doing well on my Kodi 19.

I'm using PrimeVideo in a German region. Since Kodi is running on a RaspberryPi, I'm using Input Stream. So if I temporarily set the app to Android, launching the PrimeVideo addon and switching back to Input Stream, it works. After a while (I did recognize it on the next day) I will have to do the same thing to get the menu an videos back.

Oh, i forgot... The watchlist entries are shown correctly!

And a few minutes later... I found, that it throws an error like "Catalogue not found", if I stay in the menu after watching a movie and want to quit the menu a few hours later. Quitting the Amazon addon and open it again let me see the menu again without switching between Android and Input Stream.

Sandmann79 commented 1 year ago

@fkoss Maybe I don't quite understand the question or you are confusing things. The setting where Inputstream / Browser / Script / Android can be selected is for the playback method of the videos and not for the menu content. To my knowledge, only Inputstream works on the RasPi (unless you have Android installed). The source for the menu content can be changed in the settings under data source.

fkoss commented 1 year ago

@Sandmann79 Oh boy! All I wanted was to give you the requestet feedback as a Amazon Prime user...

I did never touch the data source settings the last 2 years, since I'm using Kodi. I only knew the Android setting in the playback section, so I thought I have to change the settings there to enable your workaround. But more confusion came in, as switching between Android and InputStream let me watch videos (temporarily), again...

Now, I've changed the data source to Android and got a completely new user experience! It seems your 0.9.9b2 Version is working. Let me know if I can do some tests (especially Amazon Prime).

Thank you for opening up new horizons and of course for your great work! :-)

rocktobe commented 1 year ago

@Sandmann79 I read you posts carrefully but I cant make amazon prime work sinds january.. I installed the latest addon Fixed Beta 2 for Kodi 18. I tried input source Android or input stream, enabled register device for 4k playback ... But it still doesnt work ! Error : "amazon vod error, check the log for more information" My configuration : rpi3, librelec, kodi 18 (leia). Here is my logfile : 2023-07-31 23:06:53.456 T:1698616192 NOTICE: [Amazon VOD] Service: Proxy bound to 127.0.0.1:58521 2023-07-31 23:06:54.378 T:1698616192 NOTICE: [Amazon VOD] Service: Proxy server started 2023-07-31 23:06:54.379 T:1698616192 NOTICE: [Amazon VOD] Service started 2023-07-31 23:07:03.725 T:1523909504 NOTICE: [Amazon VOD] Login 2023-07-31 23:07:23.378 T:1523909504 NOTICE: [Amazon VOD] Connect to SignIn Page 2023-07-31 23:07:23.817 T:1523909504 NOTICE: [Amazon VOD] MFA, DCQ or Captcha form 2023-07-31 23:07:23.842 T:1523909504 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.NotImplementedError'> Error Contents: Cannot execute CSS selectors because the soupsieve package is not installed. Traceback (most recent call last): File "/storage/.kodi/addons/plugin.video.amazon-test/default.py", line 5, in EntryPoint() File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/startup.py", line 84, in EntryPoint exec('{}()'.format(mode)) File "", line 1, in File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/network.py", line 694, in LogIn if not _findElem(br, link={'class': 'nav-show-sign-in'}, log='bu'): File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/network.py", line 598, in _findElem br = MFACheck(br, email, soup) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/network.py", line 415, in MFACheck form = br.select_form('form[name="signIn"]') File "/storage/.kodi/addons/script.module.mechanicalsoup/lib/mechanicalsoup/stateful_browser.py", line 215, in select_form limit=nr + 1) File "/storage/.kodi/addons/script.module.beautifulsoup4/lib/bs4/element.py", line 1871, in select "Cannot execute CSS selectors because the soupsieve package is not installed." NotImplementedError: Cannot execute CSS selectors because the soupsieve package is not installed. -->End of Python script error report<-- 2023-07-31 23:07:23.969 T:1523909504 WARNING: CPythonInvoker(5, /storage/.kodi/addons/plugin.video.amazon-test/default.py): the python script "/storage/.kodi/addons/plugin.video.amazon-test/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon7xbmcgui6DialogE,N14PythonBindings31XBMCAddon_xbmc_Monitor_DirectorE,N9XBMCAddon9xbmcaddon5AddonE 2023-07-31 23:07:23.970 T:1707008896 ERROR: GetDirectory - Error getting plugin://plugin.video.amazon-test/ 2023-07-31 23:07:23.971 T:1936805952 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.amazon-test/) failed

Can you help me make it work plz? Im desperate and stuck sinds january :-(

Thanks in advance

DDuck007 commented 1 year ago

… works on Kodi Omega Libreelec 12 (nightly 20230727) with inputstream.adaptive 21.1.2 but crashes Kodi when using actual 21.1.3 version …

juic3pow3rs commented 1 year ago

beta2 works on my RPi 4 running osmc which is built upon Kodi v20 Nexus.

Installed the captcha module first the beta2 second.

Thanks for your great work 🙏🏻

Atomisirsi commented 1 year ago

Thanks for your great work!

I tested the new Android API the last few days and recognized two things:

But the experience is already much better than with the Web API!

cow-crash commented 1 year ago

currently the program mostly starts after some tries and then it works correctly. But i have to do multiple restarts and ignore the failures.

Atomisirsi commented 1 year ago

Little update, maybe also related to

currently the program mostly starts some tries and then it works correctly. But i have to do multiple restarts and ignore the failures.

During startup of Amazon VOD I get an exception, though everything seems to work normal afterwards:

...
2023-08-02 20:28:26.887 T:3727     INFO <general>: CAddonMgr::FindAddons: plugin.video.amazon-test v0.9.9~beta2+matrix.1 installed
...
023-08-02 20:28:26.890 T:3727     INFO <general>: CAddonMgr::FindAddons: script.module.amazoncaptcha v0.5.11+matrix.1 installed
...
2023-08-02 20:28:35.754 T:3963     INFO <general>: [Amazon VOD] Service: Proxy bound to 127.0.0.1:40751
2023-08-02 20:28:35.758 T:3963     INFO <general>: [Amazon VOD] Service: Proxy server started
2023-08-02 20:28:35.758 T:3963     INFO <general>: [Amazon VOD] Service started
2023-08-02 20:28:35.765 T:3963     INFO <general>: [Amazon VOD] Service: Exporting the Watchlist
...
2023-08-02 20:28:41.019 T:4088    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'AttributeError'>
                                                   Error Contents: 'PrimeVideo' object has no attribute 'Browse'
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.amazon-test/default.py", line 5, in <module>
                                                       EntryPoint()
                                                     File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/startup.py", line 80, in EntryPoint
                                                       g.pv.Browse('root/Watchlist/watchlist', export=5)
                                                   AttributeError: 'PrimeVideo' object has no attribute 'Browse'
                                                   -->End of Python script error report<--                                                                                                                                                     
Sandmann79 commented 1 year ago

Future beta versions will now be made available at #700. Please post bugs and questions about the beta versions there.

rocktobe commented 1 year ago

Hi guys, I finally decided to upgrade my kodi (leia 18) to kodi 19 because no captcha patch was available... I succeeded with a lot o struggle to make amazon prime work again. For that I needed to upgrade Libreelec 9 to 10 and thus to Kodi 19.5. I had also to reinstall the inputstream adaptive.

unfortunately, now I am facing a new problem !

With LE10 installed, I cannot make my spdif soundcard work ! It is supposed to be selected in kodi sound settings but only the PCM 2.0 or HDMI work. As i have an old DENON amplifier without HDMI I still need to use the spdif output to get dolby digital from amazon prime ! I found that threat on libreelec forum : No more audio after upgrading from LE9 to LE10 (generic x64 build). "Audio device in LE9 was ALSA/SPDIF device with SPDIF passthrough enabled. Can no longer be selected in LE10, only PulseAudio/BlueTooth device listed (greyed out). I don't remember seeing PulseAudio/BlueTooth device there in LE9 (but I might be wrong; was definitely never used)." https://forum.libreelec.tv/thread/24602-no-audio-or-no-remote-since-le10/

Unfortunately The procedure described doesnt work for me. I'm not a computer geek specialist and I do not know how to edit the /storage/.config/system.d/kodi.service file. I opened a session in raspbian and I cannot edit or create the file (I dont find it either). The system files in PI directory and storage directories seem to be protected for writing. Can you please provide me any help to make the spdif work again on LE10 (kodi 19).

Thanks in advance

cow-crash commented 1 year ago

I've update the old version (leia beta 3). After start i have to process the captcha. After that all seem to be okay. @Sandmann79 thanx for your work