这个包可以让你的脚本抓取网站。类似jquery的api。
solidscraper的Python项目详细描述
solid scraper
==
易于使用jquery类api进行web抓取/爬行。它还支持
cookies和自定义用户代理。solidscraper与**python
2和3**.
+----+
1兼容。|
| Ins |
| tal |
| lat |
| ion |
+-----+
| ``p |
| ip |
| ins |
| tal |
| l s |
| oli |
| dsc |
| rap |
| er` |
| ` |
+-----+
2. "“Hello World”示例
--------
获取所有链接的所有URL:
…代码::python
import solidscraper a s ss
doc=ss.load(“https://www.example.com/the/path”)
代码::python
import solidscraper as ss
doc=ss.load(“https://www.example.com/the/path”)
其类是
“info”:
…代码::python
import solidscraper as ss
doc=ss.load(“https://www.example.com/the/path”)
如果您想用python 2运行它们,可以用python 2的print语句替换print()``函数
,或者添加以下导入行作为代码的第一个语句:
``from`future`import print``.
==
易于使用jquery类api进行web抓取/爬行。它还支持
cookies和自定义用户代理。solidscraper与**python
2和3**.
+----+
1兼容。|
| Ins |
| tal |
| lat |
| ion |
+-----+
| ``p |
| ip |
| ins |
| tal |
| l s |
| oli |
| dsc |
| rap |
| er` |
| ` |
+-----+
2. "“Hello World”示例
--------
获取所有链接的所有URL:
…代码::python
import solidscraper a s ss
doc=ss.load(“https://www.example.com/the/path”)
代码::python
import solidscraper as ss
doc=ss.load(“https://www.example.com/the/path”)
其类是
“info”:
…代码::python
import solidscraper as ss
doc=ss.load(“https://www.example.com/the/path”)
如果您想用python 2运行它们,可以用python 2的print语句替换print()``函数
,或者添加以下导入行作为代码的第一个语句:
``from`future`import print``.