Fixed issue with x/y numbers
This commit is contained in:
parent
a882dfc743
commit
60a61cf6ad
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user