1 Star 1 Fork 0

大胃Q/QSpider

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

QSpider

介绍

爬虫引擎,基于无头浏览器,支持多线程、分布式、流式处理、代理等功能。开箱即用,简单便捷,有常用操作helper。

软件架构

输入图片说明

安装教程

  1. 克隆到本地
  2. 修改Q.Spider.Sample项目Program.cs文件内注释代码代码
  3. 尝试运行淘票票或者Midjourney示例程序

使用说明

  1. 新建FlwoBase派生类
public class Midjourney : Core.FlowBase
{
    public override async Task RunAsync(FlowContext Context)
    {
          //无头引擎加载页面
          await Engine.StartLoad(Request.Uri.ToString());
          //业务代码
          //.....

          //上下文设置为爬取成功
          Context.State = FlowContextHandelState.成功;
    }
}
  1. 创建Request
var requestCity = new Request("https://discord.com/channels/662267976984297473/1008571152479826060")
{
    //指定流处理
    FlowTpyes = new List<Type>() { typeof(Midjourney) }
};
  1. 初始化引擎
var core = new QSpiderCore(new Config()
{
    EngineIsHeadless = false,
    EngineIsLoadImage = true,
    RequestMaxRetryCount = 3,
}.ConfigureLaunchOptions(null, option =>
{
    option.UserDataDir = "d:/userdata/";
}));

4.开始执行

//添加处理流
core.AddFlow(new Midjourney());
//添加测试请求
Midjourney.AddTestRequest(core);
core.Start();
Console.ReadLine();

未来计划

此项目是为了找工作,是从我写的一个爬虫项目里剥离出来的一部分代码,有需求或者bug可以发issues我有时间会进行处理。

  • :white_large_square: 重构各类Helper代码
  • :white_large_square: 分布式示例
  • :white_large_square: 多线程示例
  • :white_large_square: 分布式控制管理后台页面
  • :white_large_square: linux、mac支持(理论上已支持待测试)
  • :white_large_square: 多引擎(纯模拟、其他无头浏览器库)
  • :white_large_square: NueGet发布

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
MIT License Copyright (c) 2023 大胃Q Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

爬虫引擎,流式处理+无头浏览器 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ssawk/qspider.git
git@gitee.com:ssawk/qspider.git
ssawk
qspider
QSpider
master

搜索帮助

Cb406eda 1850385 E526c682 1850385