diff --git a/instDownloader.py b/instDownloader.py index 044d265..fa44bb8 100644 --- a/instDownloader.py +++ b/instDownloader.py @@ -29,11 +29,13 @@ def get_instruction_links(set_id): v29_links = [] for alt_text, href in found_tags: if "V29" in alt_text or "V 29" in alt_text: + print(alt_text) # Check for x/y format or assign sequential numbers if missing if '/' in alt_text: - parts = alt_text.split('/')[0] + parts = alt_text.split('/') + try: - numbers = [int(num) for num in parts.replace("-", " ").split() if num.isdigit()] + numbers = [int(parts[0][-1]),int(parts[1][0])] #[int(num) for num in parts.replace("-", " ").split() if num.isdigit()] if len(numbers) == 2: x, y = numbers if x <= 10 and y <= 10: # Only consider valid x/y pairs