From 5823476f627a35da9e1b831028c68e347ae98cc3 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Sun, 8 Apr 2018 21:37:34 -0400 Subject: [PATCH] make str make search and data str in case of int. --- reporting/plex_netflix_check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reporting/plex_netflix_check.py b/reporting/plex_netflix_check.py index a793a1f..eacb613 100644 --- a/reporting/plex_netflix_check.py +++ b/reporting/plex_netflix_check.py @@ -109,7 +109,7 @@ def instantwatch_search(name, media_type, site, search_limit): for data in results['span']: if data['@class'] == 'title' and search_limit is not 0: - if data['a']['$'].lower().startswith(name.lower()): + if str(data['a']['$']).lower().startswith(name.lower()): if amazon_id: if data['a']['@data-title-id'] == amazon_id: print('Match found on Amazon for {}'.format(data['a']['$'])) @@ -196,7 +196,7 @@ def main(): parser.add_argument('-l', '--library', metavar='', choices=sections_lst, nargs='+', help='Space separated list of case sensitive names to process. Allowed names are:\n' '(choices: %(choices)s)') - parser.add_argument('-s', '--search', metavar='', nargs='?', + parser.add_argument('-s', '--search', metavar='', nargs='?', type=str, help='Search any name.') parser.add_argument('-m', '--media_type', metavar='', choices=['movie', 'show'], nargs='?', help='Refine search for name by using media type.\n'