DEV Community

Discussion on: How to make an ethical crawler in Python

Collapse
 
bstivers profile image
Brandon Stivers

def ask_robots(url: str, useragent="*": str) -> bool:

Throws an invalid syntax error at the : after "*". Any idea why?

Collapse
 
miguelmj profile image
MiguelMJ

Try useragent: str = "*"
I might have gotten the type hinting syntax wrong with default arguments.