Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教下url如何自定义传参 #258

Open
onestar1 opened this issue Jul 19, 2024 · 2 comments
Open

请教下url如何自定义传参 #258

onestar1 opened this issue Jul 19, 2024 · 2 comments

Comments

@onestar1
Copy link

protected override async Task InitializeAsync(CancellationToken stoppingToken = default)
{
AddDataFlow<DataParser>();
AddDataFlow(GetDefaultStorage);
await AddRequestsAsync(
new Request(
"https://news.cnblogs.com/n/page/1", new Dictionary<string, object> { { "网站", "博客园" } }));
}

这里面的 https://news.cnblogs.com/n/page/1 没有办法用传参的形式吗? 还是要修改源码
@zlzforever
Copy link
Collaborator

你指的传参的形式是指?

@sgf
Copy link

sgf commented Sep 20, 2024

protected override async Task InitializeAsync(CancellationToken stoppingToken = default) { AddDataFlow(); AddDataFlow(GetDefaultStorage); await AddRequestsAsync( new Request( "https://news.cnblogs.com/n/page/1", new Dictionary<string, object> { { "网站", "博客园" } })); }

这里面的 https://news.cnblogs.com/n/page/1 没有办法用传参的形式吗? 还是要修改源码

自己拼接下字符串不就完了么. 你是想要模板化变量化?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants