我应该使用什么纯Python库凑一个网站吗? [英] What pure Python library should I use to scrape a website?

查看:135
本文介绍了我应该使用什么纯Python库凑一个网站吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在有用来凑一些网站一些红宝石code。我使用Ruby因为我是用Ruby on Rails的一个网站的时候,它只是是有道理的。

I currently have some Ruby code used to scrape some websites. I was using Ruby because at the time I was using Ruby on Rails for a site, and it just made sense.

现在我想这个端口到谷歌应用程序引擎,并保持卡住。

Now I'm trying to port this over to Google App Engine, and keep getting stuck.

我移植的Python机械化与谷歌App Engine的工作,但它不支持使用XPath DOM检查。

I've ported Python Mechanize to work with Google App Engine, but it doesn't support DOM inspection with XPATH.

我试过了内置的ElementTree,但哽咽的第一个HTML的blob我给它时,它遇到了'和; MDASH

I've tried the built-in ElementTree, but it choked on the first HTML blob I gave it when it ran into '&mdash'.

难道我一直在试图破解的ElementTree在那里,或者我尽量用别的东西吗?

Do I keep trying to hack ElementTree in there, or do I try to use something else?

谢谢,
马克

推荐答案

美丽的汤。

这篇关于我应该使用什么纯Python库凑一个网站吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆