mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[32] fix imdb_watchlist
This commit is contained in:
parent
428dbe6ba2
commit
c75e017009
2 changed files with 5 additions and 4 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.20.0-develop31
|
1.20.0-develop32
|
||||||
|
|
|
@ -189,9 +189,10 @@ class IMDb:
|
||||||
|
|
||||||
def _watchlist(self, user, language):
|
def _watchlist(self, user, language):
|
||||||
imdb_url = f"{base_url}/user/{user}/watchlist"
|
imdb_url = f"{base_url}/user/{user}/watchlist"
|
||||||
group = self._request(imdb_url, language=language, xpath="//span[@class='ab_widget']/script[@type='text/javascript']/text()")
|
for text in self._request(imdb_url, language=language , xpath="//div[@class='article']/script/text()")[0].split("\n"):
|
||||||
if group:
|
if text.strip().startswith("IMDbReactInitialState.push"):
|
||||||
return [k for k in json.loads(str(group[0]).split("\n")[5][35:-2])["titles"]]
|
jsonline = text.strip()
|
||||||
|
return [f for f in json.loads(jsonline[jsonline.find('{'):-2])["starbars"]]
|
||||||
raise Failed(f"IMDb Error: Failed to parse URL: {imdb_url}")
|
raise Failed(f"IMDb Error: Failed to parse URL: {imdb_url}")
|
||||||
|
|
||||||
def _total(self, imdb_url, language):
|
def _total(self, imdb_url, language):
|
||||||
|
|
Loading…
Reference in a new issue