Small fixes
This commit is contained in:
parent
3910a39571
commit
6f35e17fdd
@ -49,7 +49,7 @@ class iTunes(BaseService):
|
||||
def cli(ctx, **kwargs):
|
||||
return iTunes(ctx, **kwargs)
|
||||
|
||||
def __init__(self, ctx, title: str, movie, checkall, sf: bool):
|
||||
def __init__(self, ctx, title: str, movie, checkall, sf: int):
|
||||
super().__init__(ctx)
|
||||
self.parse_title(ctx, title)
|
||||
|
||||
@ -296,7 +296,13 @@ class iTunes(BaseService):
|
||||
|
||||
def configure(self):
|
||||
#if not re.match(r"https?://(?:geo\.)?itunes\.apple\.com/", self.title):
|
||||
# raise ValueError("Url must be an iTunes URL...")
|
||||
# raise ValueError("Url must be an iTunes URL...")
|
||||
|
||||
cc = self.session.cookies.get_dict()["itua"]
|
||||
r = self.session.get("https://gist.githubusercontent.com/BrychanOdlum/2208578ba151d1d7c4edeeda15b4e9b1/raw/8f01e4a4cb02cf97a48aba4665286b0e8de14b8e/storefrontmappings.json").json()
|
||||
for g in r:
|
||||
if g['code'] == cc:
|
||||
self.storefront = g['storefrontId']
|
||||
|
||||
environment = self.get_environment_config()
|
||||
if not environment:
|
||||
|
||||
@ -71,8 +71,10 @@ def main(debug):
|
||||
if len(sys.argv) > 1 and sys.argv[1].lower() == "dl":
|
||||
sys.argv.pop(1)
|
||||
|
||||
sys.set_int_max_str_digits(10000) # This is necessary for str to int conversion to work
|
||||
|
||||
try:
|
||||
sys.set_int_max_str_digits(10000) # This is necessary for str to int conversion to work
|
||||
except:
|
||||
pass
|
||||
dl()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user