Comments (9)
@blafa I am working on a big re-factory:
- use Serilog instead of NLog, because there are a lot of extensions for Serilog like ES, Mongodb, MQ
- right now Env class are static and all config fields are static, i want to implement one spider use one Env, then if i changed config file will not impact the running spider.
- upgrade all methods to async
- add more test cases
So i think i will not update nuget-package very quickly. If you want to use the next one, you can build and push it to your private NUGET server or local nuget.
from dotnetspider.
Hi. Thanks for the Info. One small input: you could maybe inject ILogger (Microsoft.Extensions.Logging: https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger?view=aspnetcore-2.0) instead of hardcode Serilog dependency. Serilog provides and extension for Microsoft.Extensions.Logging (https://github.com/serilog/serilog-extensions-logging)
from dotnetspider.
Thanks, i will consider that.
from dotnetspider.
Hi. Can you estimate when your big refactoring is pushed? Have you tried to run dotnetspider in docker? :)
from dotnetspider.
Plan to push a new release this month. Didn't try it in docker, but i think it can work in docker.
from dotnetspider.
Wow cool! It works on docker except of one chromedriver issue. I will try it after the new release.
Maybe you can do the ChromeDriver path configurable if you didn't change it already ;-)
from dotnetspider.
thx for your reminder. i will have a test.
from dotnetspider.
@blafa right now, i split log module from downloader, pipeline, processor. Now you can use any log library like Nlog/ Serilog. Please see Appbase
static AppBase()
{
LoggerFactory = new LoggerFactory();
var loggerConfiguration = new LoggerConfiguration()
.MinimumLevel.Verbose()
.WriteTo.Console(theme: Theme)
.WriteTo.RollingFile("dotnetspider.log");
Log.Logger = loggerConfiguration.CreateLogger();
LoggerFactory.AddSerilog();
}
So if you want use NLog, then you can set the new LogFactory before run spider
Appbase.LoggerFactory = new LoggerFactory();
Appbase.LoggerFactory.AddNLog();
If any issue, please report to me. Thank you.
from dotnetspider.
@zlzforever perfect, thx!
- Could you make Path to ChromeDriver (Env.BaseDirectory) configurable? Could be important when running on docker. At the moment you must to put chromedriver.exe (resp. chromedriver for linux) in bin/Debug/netcoreapp2.1. Would be nicer to have this Path configurable..
- If possible provide options for "--no-sandbox" and "--disable-dev-shm-usage" (could also be important for docker-environment)
from dotnetspider.
Related Issues (20)
- 如何往界面元素上填账号密码,
- [问题]爬取列表页API的场景 HOT 2
- 下载的html乱码
- [feature] 框架是否能自动生成Host request header HOT 3
- 怎样在DotnetSpider中使用PuppeteerSharp? HOT 1
- 发现宝藏
- 怎么使用sqlserver数据库呢 HOT 3
- 请求问题原因:Could not load type 'MySql.Data.MySqlClient.MySqlDbType' from assembly 'MySqlConnector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d33d3e53aa5f8c92 HOT 1
- DotnetSpider.Portal项目的lib资源目录在哪里,源码里没找到? HOT 2
- 我该如何获取多个元素 HOT 2
- 爬取一个日语酒店数据都是乱码 HOT 1
- Builder无法引用 HOT 3
- 重试的request请求它的Properties和headers被清理掉了,请问怎么解决 HOT 3
- 请问能用一个Spider,然后通过数据库进行配置不同抓取规则,进行多个网站抓取吗? HOT 1
- 自定义储存数据库问题 HOT 1
- XPathSelector内存消耗过大 HOT 3
- DataParser解析HTML的BUG HOT 1
- 用Host形式启动后,执行所有任务后仍在运行, 请问完成后怎么关闭 HOT 4
- 怎么样获取js渲染后的结果
- Where can I find documentations? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnetspider.