v = env.ref('website.layout') arch = v.arch_db start = arch.find('') + 9 print(arch[start:end]) else: print("Header not found in website.layout")