There are several ways to search for a template, but the easiest way to use it is CSS selector:
for img in soup.select('div.separator > a > img'):
print img
Demo:
>>> from bs4 import BeautifulSoup
>>> data = """
... <div>
... <div class="separator">
... <a>
... <img src="test1"/>
... </a>
... </div>
...
... <div class="separator">
... <a>
... <img src="test2"/>
... </a>
... </div>
...
... <div>test3</div>
...
... <div>
... <a>test4</a>
... </div>
... </div>
... """
>>> soup = BeautifulSoup(data)
>>>
>>> for img in soup.select('div.separator > a > img'):
... print img.get('src')
...
test1
test2
I understand that, strictly speaking, the solution will not work if it divhas more than one child aor if athere is something other than the tag inside the tag img. If so, the solution can be improved with additional checks (edit the answer if necessary).