From bdf9f162fce36c439b6128f7dd993acc5737586f Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 8 Jun 2023 16:00:42 +0000 Subject: automatic import of python-baiduspider --- .gitignore | 1 + python-baiduspider.spec | 825 ++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 827 insertions(+) create mode 100644 python-baiduspider.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..a3a1606 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/BaiduSpider-1.0.2.6.tar.gz diff --git a/python-baiduspider.spec b/python-baiduspider.spec new file mode 100644 index 0000000..a9c7a89 --- /dev/null +++ b/python-baiduspider.spec @@ -0,0 +1,825 @@ +%global _empty_manifest_terminate_build 0 +Name: python-BaiduSpider +Version: 1.0.2.6 +Release: 1 +Summary: BaiduSpider,一个爬取百度的利器 +License: Free for non-commercial use +URL: https://github.com/BaiduSpider/BaiduSpider +Source0: https://mirrors.aliyun.com/pypi/web/packages/56/b9/6fe01e26ffa410faefa9a399981d3dcc72c8e03d6372d68996655b0e5409/BaiduSpider-1.0.2.6.tar.gz +BuildArch: noarch + + +%description + + + + + + +[![Contributors][contributors-shield]][contributors-url] +[![Forks][forks-shield]][forks-url] +[![Stargazers][stars-shield]][stars-url] +[![Issues][issues-shield]][issues-url] +[![MIT License][license-shield]][license-url] + + + + +
+

+ + Logo + + +

BaiduSpider

+ +

+ 一个爬取百度的利器 +
+ 简体中文 + | + 繁體中文 + | + English +
+ 快速上手 » +
+
+ 查看示例 + · + 报告问题 + · + 请求需求 +

+

+ + + + +
+ 目录 +
    +
  1. + 关于本项目 + +
  2. +
  3. + 起步 + +
  4. +
  5. 简单使用
  6. +
  7. 项目路线图
  8. +
  9. 项目共建
  10. +
  11. 开源协议
  12. +
  13. 联系方式
  14. +
  15. 免责声明
  16. +
  17. 贡献者
  18. +
  19. 致谢
  20. +
+
+ + + + + + +## 关于本项目 + +[![项目截图][product-screenshot]](https://baiduspider.github.io) + +搜索引擎是一个十分强大的工具,如果能让其他工具集成搜索引擎的众多强大功能,那么这些工具必将变得更加强大。但目前我没有找到一个可以精准提取搜索引擎搜索结果的开源爬虫。于是,我便编写了这个爬取百度搜索引擎的项目:BaiduSpider。 + +BaiduSpider 的独特功能: +* 节省提取数据的时间,对于类似深度学习项目的数据模型建立与训练起到了良好的帮助。 + +* 精准提取数据,并删除广告。 + +* 搜索结果大而全,支持多种搜索类型,支持多种返回类型。 + +当然,没有一个项目是完美的。任何一个项目的发展都需要社区的帮助。你可以通过发布 Issue 或提交 PR 来帮助 BaiduSpider 进步!:smile: + +一些比较有帮助的文档或工具将在最后的致谢部分中列出。 + +### 依赖库 + +一些 BaiduSpider 使用的主要开源依赖库。 + +* [BeautifulSoup 4](https://www.crummy.com/software/BeautifulSoup/) +* [requests](https://docs.python-requests.org/zh_CN/latest/) + + + + +## 起步 + +为了安装 BaiduSpider,请按照以下几个步骤操作。 + +### 预先条件 + +在安装 BaiduSpider 之前,请确保你安装了`Python3.6+`: + +```sh +$ python --version +``` + +若版本小于`3.6.0`,请到[Python官网](https://www.python.org/downloads/)下载并安装 Python。 + +### 安装 + +#### 使用`pip`安装 + +请在命令行中键入: + +```sh +$ pip install baiduspider +``` + +#### 从 GitHub 手动安装 + +```sh +$ git clone git@github.com:BaiduSpider/BaiduSpider.git + +# ... + +$ python setup.py install +``` + + + +## 简单使用 + +你可以使用以下代码,通过 BaiduSpider 获取百度的网页搜索结果: + +```python +# 导入BaiduSpider +from baiduspider import BaiduSpider +from pprint import pprint + +# 实例化BaiduSpider +spider = BaiduSpider() + +# 搜索网页 +pprint(spider.search_web(query='Python')) +``` + +_更多样例和配置,请参照[文档](https://baiduspider.github.io)_ + + + + +## 项目路线图 + +请参考 [Opening Issues](https://github.com/BaiduSpider/BaiduSpider/issues) 以获取最新的项目规划以及已知问题。 + + + + +## 项目共建 + +社区的贡献是开源项目的灵魂所在,也是整个开源社区学习、交流、获得灵感的方式。我们**极力欢迎**任何人参与本项目的开发与维护。 + +具体参与步骤如下: + +1. Fork 此项目 +2. 创建 Feature 分支 (`git checkout -b NewFeatures`) +3. 在每次修改代码后,提交你的更改 (`git commit -m 'Add some AmazingFeature'`) +4. 将更改推送到自己的远程仓库 (`git push origin username/BaiduSpider`) +5. 在 GitHub 上打开你的仓库,根据指引提交 PR + + + + +## 开源协议 + +本项目基于`GPL-V3`开源,详情请参见`LICENSE`。 + + + + +## 联系方式 + +samzhangjy - [@samzhangjy](https://twitter.com/samzhangjy) - samzhang951@outlook.com + +项目链接:[https://github.com/BaiduSpider/BaiduSpider](https://github.com/BaiduSpider/BaiduSpider) + + +## 免责声明 + +此项目仅作为学习用途,不可商用或用于爬取百度大量数据。此外,本项目使用`GPL-V3`版权协议,意味着涉及(使用)此项目的任何其它项目必须开源且注明出处,并且本项目作者不承担滥用导致的任何法律风险。特此说明,违者后果自负。 + + +## 贡献者 + + + + + + + +## 致谢 +* [BeautifulSoup 4](https://www.crummy.com/software/BeautifulSoup/) +* [Requests](https://docs.python-requests.org/zh_CN/latest/) +* [Img Shields](https://shields.io) +* [Gitmoji](https://gitmoji.dev/) +* [Best-README-Template](https://github.com/othneildrew/Best-README-Template) +* [Choose an Open Source License](https://choosealicense.com) +* [GitHub Pages](https://pages.github.com) + + + + + + + +[contributors-shield]: https://img.shields.io/github/contributors/BaiduSpider/BaiduSpider?style=for-the-badge +[contributors-url]: https://github.com/BaiduSpider/BaiduSpider/graphs/contributors +[forks-shield]: https://img.shields.io/github/forks/BaiduSpider/BaiduSpider?style=for-the-badge +[forks-url]: https://github.com/BaiduSpider/BaiduSpider/network/members +[stars-shield]: https://img.shields.io/github/stars/BaiduSpider/BaiduSpider?style=for-the-badge +[stars-url]: https://github.com/BaiduSpider/BaiduSpider/stargazers +[issues-shield]: https://img.shields.io/github/issues/BaiduSpider/BaiduSpider?style=for-the-badge +[issues-url]: https://github.com/BaiduSpider/BaiduSpider/issues +[license-shield]: https://img.shields.io/github/license/BaiduSpider/BaiduSpider?style=for-the-badge +[license-url]: https://github.com/BaiduSpider/BaiduSpider/blob/master/LICENSE +[product-screenshot]: https://i.loli.net/2021/04/22/V7gGrmTDlfR5U24.png + + + +%package -n python3-BaiduSpider +Summary: BaiduSpider,一个爬取百度的利器 +Provides: python-BaiduSpider +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-BaiduSpider + + + + + + +[![Contributors][contributors-shield]][contributors-url] +[![Forks][forks-shield]][forks-url] +[![Stargazers][stars-shield]][stars-url] +[![Issues][issues-shield]][issues-url] +[![MIT License][license-shield]][license-url] + + + + +
+

+ + Logo + + +

BaiduSpider

+ +

+ 一个爬取百度的利器 +
+ 简体中文 + | + 繁體中文 + | + English +
+ 快速上手 » +
+
+ 查看示例 + · + 报告问题 + · + 请求需求 +

+

+ + + + +
+ 目录 +
    +
  1. + 关于本项目 + +
  2. +
  3. + 起步 + +
  4. +
  5. 简单使用
  6. +
  7. 项目路线图
  8. +
  9. 项目共建
  10. +
  11. 开源协议
  12. +
  13. 联系方式
  14. +
  15. 免责声明
  16. +
  17. 贡献者
  18. +
  19. 致谢
  20. +
+
+ + + + + + +## 关于本项目 + +[![项目截图][product-screenshot]](https://baiduspider.github.io) + +搜索引擎是一个十分强大的工具,如果能让其他工具集成搜索引擎的众多强大功能,那么这些工具必将变得更加强大。但目前我没有找到一个可以精准提取搜索引擎搜索结果的开源爬虫。于是,我便编写了这个爬取百度搜索引擎的项目:BaiduSpider。 + +BaiduSpider 的独特功能: +* 节省提取数据的时间,对于类似深度学习项目的数据模型建立与训练起到了良好的帮助。 + +* 精准提取数据,并删除广告。 + +* 搜索结果大而全,支持多种搜索类型,支持多种返回类型。 + +当然,没有一个项目是完美的。任何一个项目的发展都需要社区的帮助。你可以通过发布 Issue 或提交 PR 来帮助 BaiduSpider 进步!:smile: + +一些比较有帮助的文档或工具将在最后的致谢部分中列出。 + +### 依赖库 + +一些 BaiduSpider 使用的主要开源依赖库。 + +* [BeautifulSoup 4](https://www.crummy.com/software/BeautifulSoup/) +* [requests](https://docs.python-requests.org/zh_CN/latest/) + + + + +## 起步 + +为了安装 BaiduSpider,请按照以下几个步骤操作。 + +### 预先条件 + +在安装 BaiduSpider 之前,请确保你安装了`Python3.6+`: + +```sh +$ python --version +``` + +若版本小于`3.6.0`,请到[Python官网](https://www.python.org/downloads/)下载并安装 Python。 + +### 安装 + +#### 使用`pip`安装 + +请在命令行中键入: + +```sh +$ pip install baiduspider +``` + +#### 从 GitHub 手动安装 + +```sh +$ git clone git@github.com:BaiduSpider/BaiduSpider.git + +# ... + +$ python setup.py install +``` + + + +## 简单使用 + +你可以使用以下代码,通过 BaiduSpider 获取百度的网页搜索结果: + +```python +# 导入BaiduSpider +from baiduspider import BaiduSpider +from pprint import pprint + +# 实例化BaiduSpider +spider = BaiduSpider() + +# 搜索网页 +pprint(spider.search_web(query='Python')) +``` + +_更多样例和配置,请参照[文档](https://baiduspider.github.io)_ + + + + +## 项目路线图 + +请参考 [Opening Issues](https://github.com/BaiduSpider/BaiduSpider/issues) 以获取最新的项目规划以及已知问题。 + + + + +## 项目共建 + +社区的贡献是开源项目的灵魂所在,也是整个开源社区学习、交流、获得灵感的方式。我们**极力欢迎**任何人参与本项目的开发与维护。 + +具体参与步骤如下: + +1. Fork 此项目 +2. 创建 Feature 分支 (`git checkout -b NewFeatures`) +3. 在每次修改代码后,提交你的更改 (`git commit -m 'Add some AmazingFeature'`) +4. 将更改推送到自己的远程仓库 (`git push origin username/BaiduSpider`) +5. 在 GitHub 上打开你的仓库,根据指引提交 PR + + + + +## 开源协议 + +本项目基于`GPL-V3`开源,详情请参见`LICENSE`。 + + + + +## 联系方式 + +samzhangjy - [@samzhangjy](https://twitter.com/samzhangjy) - samzhang951@outlook.com + +项目链接:[https://github.com/BaiduSpider/BaiduSpider](https://github.com/BaiduSpider/BaiduSpider) + + +## 免责声明 + +此项目仅作为学习用途,不可商用或用于爬取百度大量数据。此外,本项目使用`GPL-V3`版权协议,意味着涉及(使用)此项目的任何其它项目必须开源且注明出处,并且本项目作者不承担滥用导致的任何法律风险。特此说明,违者后果自负。 + + +## 贡献者 + + + + + + + +## 致谢 +* [BeautifulSoup 4](https://www.crummy.com/software/BeautifulSoup/) +* [Requests](https://docs.python-requests.org/zh_CN/latest/) +* [Img Shields](https://shields.io) +* [Gitmoji](https://gitmoji.dev/) +* [Best-README-Template](https://github.com/othneildrew/Best-README-Template) +* [Choose an Open Source License](https://choosealicense.com) +* [GitHub Pages](https://pages.github.com) + + + + + + + +[contributors-shield]: https://img.shields.io/github/contributors/BaiduSpider/BaiduSpider?style=for-the-badge +[contributors-url]: https://github.com/BaiduSpider/BaiduSpider/graphs/contributors +[forks-shield]: https://img.shields.io/github/forks/BaiduSpider/BaiduSpider?style=for-the-badge +[forks-url]: https://github.com/BaiduSpider/BaiduSpider/network/members +[stars-shield]: https://img.shields.io/github/stars/BaiduSpider/BaiduSpider?style=for-the-badge +[stars-url]: https://github.com/BaiduSpider/BaiduSpider/stargazers +[issues-shield]: https://img.shields.io/github/issues/BaiduSpider/BaiduSpider?style=for-the-badge +[issues-url]: https://github.com/BaiduSpider/BaiduSpider/issues +[license-shield]: https://img.shields.io/github/license/BaiduSpider/BaiduSpider?style=for-the-badge +[license-url]: https://github.com/BaiduSpider/BaiduSpider/blob/master/LICENSE +[product-screenshot]: https://i.loli.net/2021/04/22/V7gGrmTDlfR5U24.png + + + +%package help +Summary: Development documents and examples for BaiduSpider +Provides: python3-BaiduSpider-doc +%description help + + + + + + +[![Contributors][contributors-shield]][contributors-url] +[![Forks][forks-shield]][forks-url] +[![Stargazers][stars-shield]][stars-url] +[![Issues][issues-shield]][issues-url] +[![MIT License][license-shield]][license-url] + + + + +
+

+ + Logo + + +

BaiduSpider

+ +

+ 一个爬取百度的利器 +
+ 简体中文 + | + 繁體中文 + | + English +
+ 快速上手 » +
+
+ 查看示例 + · + 报告问题 + · + 请求需求 +

+

+ + + + +
+ 目录 +
    +
  1. + 关于本项目 + +
  2. +
  3. + 起步 + +
  4. +
  5. 简单使用
  6. +
  7. 项目路线图
  8. +
  9. 项目共建
  10. +
  11. 开源协议
  12. +
  13. 联系方式
  14. +
  15. 免责声明
  16. +
  17. 贡献者
  18. +
  19. 致谢
  20. +
+
+ + + + + + +## 关于本项目 + +[![项目截图][product-screenshot]](https://baiduspider.github.io) + +搜索引擎是一个十分强大的工具,如果能让其他工具集成搜索引擎的众多强大功能,那么这些工具必将变得更加强大。但目前我没有找到一个可以精准提取搜索引擎搜索结果的开源爬虫。于是,我便编写了这个爬取百度搜索引擎的项目:BaiduSpider。 + +BaiduSpider 的独特功能: +* 节省提取数据的时间,对于类似深度学习项目的数据模型建立与训练起到了良好的帮助。 + +* 精准提取数据,并删除广告。 + +* 搜索结果大而全,支持多种搜索类型,支持多种返回类型。 + +当然,没有一个项目是完美的。任何一个项目的发展都需要社区的帮助。你可以通过发布 Issue 或提交 PR 来帮助 BaiduSpider 进步!:smile: + +一些比较有帮助的文档或工具将在最后的致谢部分中列出。 + +### 依赖库 + +一些 BaiduSpider 使用的主要开源依赖库。 + +* [BeautifulSoup 4](https://www.crummy.com/software/BeautifulSoup/) +* [requests](https://docs.python-requests.org/zh_CN/latest/) + + + + +## 起步 + +为了安装 BaiduSpider,请按照以下几个步骤操作。 + +### 预先条件 + +在安装 BaiduSpider 之前,请确保你安装了`Python3.6+`: + +```sh +$ python --version +``` + +若版本小于`3.6.0`,请到[Python官网](https://www.python.org/downloads/)下载并安装 Python。 + +### 安装 + +#### 使用`pip`安装 + +请在命令行中键入: + +```sh +$ pip install baiduspider +``` + +#### 从 GitHub 手动安装 + +```sh +$ git clone git@github.com:BaiduSpider/BaiduSpider.git + +# ... + +$ python setup.py install +``` + + + +## 简单使用 + +你可以使用以下代码,通过 BaiduSpider 获取百度的网页搜索结果: + +```python +# 导入BaiduSpider +from baiduspider import BaiduSpider +from pprint import pprint + +# 实例化BaiduSpider +spider = BaiduSpider() + +# 搜索网页 +pprint(spider.search_web(query='Python')) +``` + +_更多样例和配置,请参照[文档](https://baiduspider.github.io)_ + + + + +## 项目路线图 + +请参考 [Opening Issues](https://github.com/BaiduSpider/BaiduSpider/issues) 以获取最新的项目规划以及已知问题。 + + + + +## 项目共建 + +社区的贡献是开源项目的灵魂所在,也是整个开源社区学习、交流、获得灵感的方式。我们**极力欢迎**任何人参与本项目的开发与维护。 + +具体参与步骤如下: + +1. Fork 此项目 +2. 创建 Feature 分支 (`git checkout -b NewFeatures`) +3. 在每次修改代码后,提交你的更改 (`git commit -m 'Add some AmazingFeature'`) +4. 将更改推送到自己的远程仓库 (`git push origin username/BaiduSpider`) +5. 在 GitHub 上打开你的仓库,根据指引提交 PR + + + + +## 开源协议 + +本项目基于`GPL-V3`开源,详情请参见`LICENSE`。 + + + + +## 联系方式 + +samzhangjy - [@samzhangjy](https://twitter.com/samzhangjy) - samzhang951@outlook.com + +项目链接:[https://github.com/BaiduSpider/BaiduSpider](https://github.com/BaiduSpider/BaiduSpider) + + +## 免责声明 + +此项目仅作为学习用途,不可商用或用于爬取百度大量数据。此外,本项目使用`GPL-V3`版权协议,意味着涉及(使用)此项目的任何其它项目必须开源且注明出处,并且本项目作者不承担滥用导致的任何法律风险。特此说明,违者后果自负。 + + +## 贡献者 + + + + + + + +## 致谢 +* [BeautifulSoup 4](https://www.crummy.com/software/BeautifulSoup/) +* [Requests](https://docs.python-requests.org/zh_CN/latest/) +* [Img Shields](https://shields.io) +* [Gitmoji](https://gitmoji.dev/) +* [Best-README-Template](https://github.com/othneildrew/Best-README-Template) +* [Choose an Open Source License](https://choosealicense.com) +* [GitHub Pages](https://pages.github.com) + + + + + + + +[contributors-shield]: https://img.shields.io/github/contributors/BaiduSpider/BaiduSpider?style=for-the-badge +[contributors-url]: https://github.com/BaiduSpider/BaiduSpider/graphs/contributors +[forks-shield]: https://img.shields.io/github/forks/BaiduSpider/BaiduSpider?style=for-the-badge +[forks-url]: https://github.com/BaiduSpider/BaiduSpider/network/members +[stars-shield]: https://img.shields.io/github/stars/BaiduSpider/BaiduSpider?style=for-the-badge +[stars-url]: https://github.com/BaiduSpider/BaiduSpider/stargazers +[issues-shield]: https://img.shields.io/github/issues/BaiduSpider/BaiduSpider?style=for-the-badge +[issues-url]: https://github.com/BaiduSpider/BaiduSpider/issues +[license-shield]: https://img.shields.io/github/license/BaiduSpider/BaiduSpider?style=for-the-badge +[license-url]: https://github.com/BaiduSpider/BaiduSpider/blob/master/LICENSE +[product-screenshot]: https://i.loli.net/2021/04/22/V7gGrmTDlfR5U24.png + + + +%prep +%autosetup -n BaiduSpider-1.0.2.6 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-BaiduSpider -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Jun 08 2023 Python_Bot - 1.0.2.6-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..8dae4f4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +fe8c6372a56fa65e4777610464b4eca5 BaiduSpider-1.0.2.6.tar.gz -- cgit v1.2.3