mirror of
https://github.com/mza921/Plex-Auto-Collections
synced 2024-11-14 00:07:18 +00:00
Fix for IMDb lists with 1000+ items
This commit is contained in:
parent
d38f0f636e
commit
e0420aca53
1 changed files with 2 additions and 2 deletions
|
@ -43,8 +43,8 @@ def imdb_get_ids(plex, imdb_url):
|
|||
results = re.search('(?<=<div class="desc lister-total-num-results">).*?(?=</div>)', str(r.content))
|
||||
total = 100 if results is None else re.search('(\\d+)', results.group(0).replace(',', '')).group(1)
|
||||
else:
|
||||
results = re.search('<span>\\d+-\\d+ of \\d+ titles.</span>', str(r.content))
|
||||
total = 100 if results is None else re.findall('(\\d+)', results.group(0).replace(',', ''))[2]
|
||||
results = re.search('<span>\\d+-\\d+ of \\S+ titles.</span>', str(r.content))
|
||||
total = 100 if results is None else re.findall('(\\d+)', results.group(0).replace(',', ''))[-1]
|
||||
for i in range(1, math.ceil(int(total) / 100)):
|
||||
if imdb_url.startswith("https://www.imdb.com/list/ls"):
|
||||
r = requests.get(imdb_url + '?page={}'.format(i + 1), headers={'Accept-Language': library_language})
|
||||
|
|
Loading…
Reference in a new issue