一个简单的python web scraper
simplescraper的Python项目详细描述
python scraper
==
一个由python制作的简单web scraper,充满爱:
代码::sh
pip install simplescraper
用法:
----
对网页进行简单调用,让我们调用“www.test.com”
。代码::python
代码::javascript
{
url:'http://www.test.com',
source:'www.test.com',
image:'http://www.test.com/some/random/image.png',
title:'just a test page'
}
如果网页需要使用https协议才能访问,您可以将其称为:“https://www.test.com”,这不是必需的,因为scraper会检查是否需要该协议。
get iframe:
~~~~~~~~~~~~
……代码::python
result=test.get_scraped_data('https://www.youtube.com/watch?v=dqw4w9wgxcq')
输出:
~~~~~~~~
…代码::javascript
{
描述:'rick astley-永不放弃(官方音乐视频)-收听spotify:http://smarturl.it/astleyspotify下载rick的第一张专辑“50”-http…',
标题:'rick astley-永不放弃',
url:'http s://www.youtube.com/watch?
图片:http://i.ytimmg.com/vi/dqww4ww9wwwxcq/maxresdefault.jpg,
来源:www.youtube.com,
iframe:'<;iframe src=“http://www.youtube.com/embed/dqw4w9wwwxcq”height=“720”width=“1280”>;lt;iframe>;'
这是在“github”网站上,这是在“github”上,这是在“github”网站上,这是在“github”上,这是在“github”网站上,这是在“github”网站呃,让我们我
>知道我是否在某个地方断送了它。
>用来制造这件东西的东西:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`beautulsoup4<;http://github.com/getanewsleet/beautulsoup4>;``~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>超棒的HTML5解析器
==
一个由python制作的简单web scraper,充满爱:
代码::sh
pip install simplescraper
用法:
----
对网页进行简单调用,让我们调用“www.test.com”
。代码::python
代码::javascript
{
url:'http://www.test.com',
source:'www.test.com',
image:'http://www.test.com/some/random/image.png',
title:'just a test page'
}
如果网页需要使用https协议才能访问,您可以将其称为:“https://www.test.com”,这不是必需的,因为scraper会检查是否需要该协议。
get iframe:
~~~~~~~~~~~~
……代码::python
result=test.get_scraped_data('https://www.youtube.com/watch?v=dqw4w9wgxcq')
输出:
~~~~~~~~
…代码::javascript
{
描述:'rick astley-永不放弃(官方音乐视频)-收听spotify:http://smarturl.it/astleyspotify下载rick的第一张专辑“50”-http…',
标题:'rick astley-永不放弃',
url:'http s://www.youtube.com/watch?
图片:http://i.ytimmg.com/vi/dqww4ww9wwwxcq/maxresdefault.jpg,
来源:www.youtube.com,
iframe:'<;iframe src=“http://www.youtube.com/embed/dqw4w9wwwxcq”height=“720”width=“1280”>;lt;iframe>;'
这是在“github”网站上,这是在“github”上,这是在“github”网站上,这是在“github”上,这是在“github”网站上,这是在“github”网站呃,让我们我
>知道我是否在某个地方断送了它。
>用来制造这件东西的东西:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`beautulsoup4<;http://github.com/getanewsleet/beautulsoup4>;``~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>超棒的HTML5解析器