Потребовалось мне в одном скрипте разбирать html-странички, попутно выполняя на них JS.
Поискав более-менее готовые велосипеды, наткнулся на Ghost.py.
Установил через pip и… начались проблемы.
Сначала он вообще не импортировался, но я довольно быстро решил проблему, добавив две точки в __init__py, как описано здесь.
Но даже после этого он не заработал.
Попытка загрузить страницу заканчивается либо так:
page, resources = gh.open('http://python.su') --------------------------------------------------------------------------- Exception Traceback (most recent call last) <ipython-input-7-9da133e9efd9> in <module>() ----> 1 page, resources = gh.open('http://python.su/') C:\Dev\Python33\lib\site-packages\ghost\ghost.py in open(self, address, method, headers, auth, body) 428 self.main_frame.load(request, method, body) 429 self.loaded = False --> 430 return self.wait_for_page_loaded() 431 432 class prompt: C:\Dev\Python33\lib\site-packages\ghost\ghost.py in wait_for_page_loaded(self) 570 """ 571 self.wait_for(lambda: self.loaded, --> 572 'Unable to load requested page') 573 resources = self._release_last_resources() 574 page = None C:\Dev\Python33\lib\site-packages\ghost\ghost.py in wait_for(self, condition, timeout_message) 551 while not condition(): 552 if time.time() > (started_at + self.wait_timeout): --> 553 raise Exception(timeout_message) 554 time.sleep(0.01) 555 Ghost._app.processEvents() Exception: Unable to load requested page
page, resources = gh.open('http://yandex.ru') --------------------------------------------------------------------------- NameError Traceback (most recent call last) C:\Dev\Python33\lib\site-packages\ghost\ghost.py in _request_ended(self, reply) 635 """ 636 if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute): --> 637 self.http_resources.append(HttpResource(reply, self.cache)) 638 639 def _unsupported_content(self, reply): C:\Dev\Python33\lib\site-packages\ghost\ghost.py in __init__(self, reply, cache, content) 141 content = buffer.readAll() 142 try: --> 143 self.content = unicode(content) 144 except UnicodeDecodeError: 145 self.content = content NameError: global name 'unicode' is not defined
Последняя ошибка особенно удивляет, вроде как никаких unicode в Python 3 уже быть не должно.

Объясните, пожалуйста, кто имел дело с Ghost, что я делаю не так?..
И да, у меня Win7, Python 3.3, PyQt 4.
Спасибо.