Consistency: the function should be named after the long command name: "--generate-url" → "generate_url()", "--search-url" → "search_url()"
All the parameters (url, name, season and number) should be passed separately for readability purposes (plus global variables are evil)