lxml elements are lists so no need for list() calls.
Explicitly use just 'page' elements in the root.
Remove unnecessary indentation.

Find text element children rather than finding all children and
then ignoring those not text elements.
Remove unnecessary local variable.

pages is only used once, why not just make it in place.
Remove old debug code.
Remove old debug count.

Count wasn't being used, and was clearly just from earlier debug,
so it might as well go.
Remove more unnecessary indentation.

We're only interested in the text elements, so no need to loop
over pages at all.
Remove more old debug.
Use requests rather than urllib2.

I'd forgotten to import urllib2 when moving something, but let's
just get rid of it altogether and use requests instead.
Remove some unused variables.
Some PEP8ification.

(Just whitespace).
Make more concise.

More code tidying
  - make use of ternary operator
  - don't bother naming very simple regex.
Remove unused import
More PEP8 whitespace.
Remove unneeded variable.
More whitespace changes.
Remove unused return values.
Blank number2 if it's not found.

If nothing looking like number2 is found, blank it and warn.
Use groups in pattern5.

Simplify by using named groups in a regex rather than lots of
string partitioning afterwards.
Remove unneeded flag variable.

details1 was true or false exactly when session is, so it can go.