![]() |
VOOZH | about |
dotnet add package RuiJi.Net.Core --version 1.2.2
NuGet\Install-Package RuiJi.Net.Core -Version 1.2.2
<PackageReference Include="RuiJi.Net.Core" Version="1.2.2" />
<PackageVersion Include="RuiJi.Net.Core" Version="1.2.2" />Directory.Packages.props
<PackageReference Include="RuiJi.Net.Core" />Project file
paket add RuiJi.Net.Core --version 1.2.2
#r "nuget: RuiJi.Net.Core, 1.2.2"
#:package RuiJi.Net.Core@1.2.2
#addin nuget:?package=RuiJi.Net.Core&version=1.2.2Install as a Cake Addin
#tool nuget:?package=RuiJi.Net.Core&version=1.2.2Install as a Cake Tool
使用需从 https://github.com/zhupingqi/RuiJi.Net/tree/master/RuiJi.Net.Core 下载3个文字至运行目录 public_suffix_list.dat text_mime.dat mimes.dat
RuiJi.Net Documentation http://doc.ruijihg.com/
Fork me on github https://github.com/zhupingqi/RuiJi.Net
company web http://www.iotsys.net
RuiJi.Net.Core Sample crawl use local ip automatic
var crawler = new RuiJiCrawler(); var request = new Request("https://www.baidu.com"); var response = crawler.Request(request); crawl with special ip
var crawler = new RuiJiCrawler(); var request = new Request("https://www.baidu.com"); request.Ip = "192.168.31.196"; var response = crawler.Request(request); crawl with proxy
var crawler = new RuiJiCrawler(); var request = new Request("https://www.baidu.com"); request.Proxy = new RequestProxy("223.93.172.248", 3128);
var response = crawler.Request(request); extract url
var crawler = new RuiJiCrawler(); var request = new Request("https://www.oschina.net/blog");
var response = crawler.Request(request); var content = response.Data.ToString();
var parser = new RuiJiParser(); var eb = parser.ParseExtract("css a.blog-title-link[href]\nexp https://my.oschina.net//blog/"); var result = RuiJiExtractor.Extract(content, eb.Block); extract tile
var crawler = new RuiJiCrawler(); var request = new Request("http://www.ruijihg.com/archives/category/tech/bigdata");
var response = crawler.Request(request); var content = response.Data.ToString();
var parser = new RuiJiParser(); var eb = parser.ParseExtract(@"[tile]\ncss article:html
[meta] #title css .entry-header:text
#summary css .entry-header + p:text ex /Read more »/ -e");
var result = RuiJiExtractor.Extract(content, eb.Block); extract meta
var crawler = new RuiJiCrawler(); var request = new Request("https://my.oschina.net/zhupingqi/blog/1826317");
var response = crawler.Request(request); var content = response.Data.ToString();
var parser = new RuiJiParser(); var eb = parser.ParseExtract(@"[meta] #title css h1.header:text
#author css div.blog-meta .avatar + span:text
#date css div.blog-meta > div.item:first:text regS /发布于/ 1
#words_i css div.blog-meta > div.item:eq(1):text regS / / 1
#content css #articleContent:html");
var result = RuiJiExtractor.Extract(content, eb.Block); detect mine
var crawler = new RuiJiCrawler(); var request = new Request("http://img10.jiuxian.com/2018/0111/cd51bb851410404388155b3ec2c505cf4.jpg"); var response = crawler.Request(request);
var ex = response.Extensions; run js
var request = new Request("https://gitee.com/zhupingqi/RuiJi.Net"); request.RunJS = true;
var crawler = new RuiJiCrawler();
var response = crawler.Request(request); cookie
var request = new Request("https://gitee.com/zhupingqi/RuiJi.Net"); request.Cookie = "xxxxxx";
var crawler = new RuiJiCrawler();
var response = crawler.Request(request); More Feature please visit my github
RuiJi.Net Cluster is waitting for you RuiJi.Net is a dotnet distributed crawler framework written in c#.Major features include distribute crawler, distribute Extractor and managed cookie, support ip polling that using the server public network address and proxy server.
RuiJi.Net has extract model called RuiJi Expression,It divides the web page into block,tile and meta. you can extract web page by RuiJi Expression and save the expression with text file or database.
RuiJi.Net have more features including extract rule match by url wildcard and page feature, paging extract, url function, cookie manager and cookie channel,much selecors to clear data, ...
If you like , please star my project, It will give me more motivation to improve this project.
Javascript support If you want to run html page with javascript, please install chromium.
如果你想要使用ChromiumCrawler等待页面运行JS,请安装chromium。参考以下教程。
目前chromium版本号为555668
下载Ruiji.Net部署操作系统对应的zip
在编译后的运行目录里建立以下路径
编译后的运行目录.local-chromium{操作系统}-555668\
{操作系统}分别对应:
Linux64位系统:Linux
Windows32位系统:Win
Windows64位系统:Win64
Mac系统:Mac
将下载好的zip解压到创建好的目录中。
以linux为例 chromium所在路径为 运行目录.local-chromium\Linux-555668\chrome-linux
网盘地址:https://pan.baidu.com/s/1rsyCNnXxbobCBLZuPTiJHQ cr3e
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net472 net472 is compatible. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.2.2 | 1,230 | 8/21/2020 | |
| 1.2.1 | 1,218 | 8/21/2020 | 1.2.1 is deprecated because it has critical bugs. |
| 1.2.0 | 902 | 6/22/2020 | |
| 1.1.9 | 879 | 6/22/2020 | |
| 1.1.8 | 810 | 6/22/2020 | |
| 1.1.7 | 1,237 | 10/8/2018 | |
| 1.1.6 | 1,187 | 10/6/2018 | |
| 1.1.5 | 1,148 | 10/5/2018 | |
| 1.1.4 | 1,166 | 10/4/2018 | |
| 1.1.3 | 1,171 | 9/25/2018 | |
| 1.1.1 | 1,190 | 9/25/2018 | |
| 1.1.0 | 1,140 | 9/20/2018 | |
| 1.0.6-beta | 1,144 | 7/30/2018 | |
| 1.0.5-beta | 1,458 | 7/17/2018 | |
| 1.0.4-beta | 1,153 | 7/7/2018 | |
| 1.0.3-beta | 1,453 | 7/4/2018 | |
| 1.0.2-beta | 1,486 | 6/25/2018 | |
| 1.0.1-beta | 1,454 | 6/22/2018 |
url wildcard match