В этих случаях я обычно автоматизирую настоящий браузер и извлекаю обработанный HTML оттуда.
Edit:
Вот пример автоматизации InternetExplorer для перехода по URL-адресу и получения заголовка и местоположения после загрузки страницы.
from win32com.client import Dispatch
from ctypes import Structure, pointer, windll
from ctypes import c_int, c_long, c_uint
import win32con
import pywintypes
class POINT(Structure):
_fields_ = [('x', c_long),
('y', c_long)]
def __init__( self, x=0, y=0 ):
self.x = x
self.y = y
class MSG(Structure):
_fields_ = [('hwnd', c_int),
('message', c_uint),
('wParam', c_int),
('lParam', c_int),
('time', c_int),
('pt', POINT)]
def wait_until_ready(ie):
pMsg = pointer(MSG())
NULL = c_int(win32con.NULL)
while True:
while windll.user32.PeekMessageW(pMsg, NULL, 0, 0, win32con.PM_REMOVE) != 0:
windll.user32.TranslateMessage(pMsg)
windll.user32.DispatchMessageW(pMsg)
if ie.ReadyState == 4:
break
ie = Dispatch("InternetExplorer.Application")
ie.Visible = True
ie.Navigate("http://google.com/")
wait_until_ready(ie)
print "title:", ie.Document.Title
print "location:", ie.Document.location