Sorry if this is already been asked, though i couldn't find it. Im trying to detect if a website uses wordpress. here is the sample code.
url = input("Please enter the URL")
if 'http://' in url:
append = url
else:
append = 'http://' + url
r = requests.get(append + "/robots.txt")
response = r.text
if re.search(('/wp-includes/') | ('/wp-admin/'), response):
print("{0} --> Its Wordpress ".format(append))
sys.exit(0)
It says | operator cannot be used, in
if re.search(('/wp-includes/') | ('/wp-admin/'), response):
how can i search for multiple strings, with OR between them? i also tried using 'or' and tried this
if re.search('/wp-includes/' , '/wp-admin/'), response):
Thanks