发布时间:2022-08-09 文章分类:编程知识 投稿人:王小丽 字号: 默认 | | 超大 打印

Pyphantomjs makes python crash


up vote
2
down vote
favorite

1

share [g+]
share [fb]
share [tw]

I'm just trying to open a web page with pyphantomjs, but it makes python crash. I don't know if there is a problem or if I am just using it wrong, as the documentation is one of the crappiest I've seen...

My code:

from pyphantomjs import webpage
if __name__ =='__main__':
  wp = webpage.WebPage()
  wp.open("www.google.com")
  print wp.content()

My crash report.

I'm running python 2.7 on Snow Leopard.