def sniff_link(url):
protocol = None<EOL>link = url.strip()<EOL>if inurl(['<STR_LIT>', '<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>', '<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>', '<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>', '<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>', '<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>', '<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>'], link, '<STR_LIT:end>'):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>'], link):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>'], link, '<STR_LIT:end>'):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>', '<STR_LIT:html>', '<STR_LIT>'], link, '<STR_LIT:end>'):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif all([inurl(['<STR_LIT>'], link),<EOL>inurl(['<STR_LIT>'], link, '<STR_LIT:end>')]):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'],<EOL>link, '<STR_LIT:end>'):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>elif inurl(['<STR_LIT>', '<STR_LIT>'], link, '<STR_LIT:end>'):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>LOGGER.info('<STR_LIT>')<EOL><DEDENT>return protocol<EOL>
performs basic heuristics to detect what the URL is