I have a web scraper, and I need the number to start at 000000001 as that's how the URL starts, however whenever I run it I get the "leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers" error - which I tried to use but that doesn't solve my issue.
Is there any way around this?
Excerpt:
results = []
START = 000000001
LIMIT = 100
END = START + LIMIT + 1
row = 1
for i in range(START, END):
URL = f"{url}{i}"
result = parse(URL)
if not result:
print("this url doesn't exist: ", URL)
continue
for column_number, column_value in enumerate(result):
worksheet.write(row, column_number, column_value)
row += 1