You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
512 B
19 lines
512 B
from sample.util.util import findnth, get_items
|
|
|
|
|
|
def __find_part_name(parts_list, idx):
|
|
return parts_list[idx][(parts_list[idx].find('<td><b>') + 7):findnth(parts_list[idx], '</b>', 1)]
|
|
|
|
|
|
def get_part_names(url):
|
|
items = get_items(url)
|
|
part_numbers = []
|
|
|
|
for i in range(len(items)):
|
|
current_part = __find_part_name(items, i)
|
|
if "<" in current_part:
|
|
continue
|
|
elif i >= 4:
|
|
part_numbers.append(current_part)
|
|
|
|
return part_numbers |