代码拉取完成,页面将自动刷新
wwm.leetcode.helper 是 C# 刷LeetCode帮助包 本仓库为wwm.leetcode.helper帮助包收集ISSUE仓库
wwm.leetcode.helper 特点:
# Create project
dotnet new console -n PlaywrightDemo
cd PlaywrightDemo
# Add project dependency
dotnet add package Microsoft.Playwright
# Build the project
dotnet build
# Install required browsers
pwsh bin\Debug\netX\playwright.ps1 install
方式一: 创建Console控制台应用程序,Program.cs 内容如下
//使用手动输入题目url的方式生成测试文件
Console.WriteLine($"Hello, {nameof(wwm.LeetCodeHelper)}");
List<string> problemUrls = new List<string>()
{
//"https://leetcode-cn.com/problems/repeated-string-match/"
};
if (problemUrls.Any())
await LeetCodeHelper.GetContentFromBrowserAsync(problemUrls, "Solutions", "Content", SlowMo: 1, Headless: true);
else
TestResultHelper.InvokeAllTest(typeof(Program).Assembly.GetName().Name);
Console.Write("按任意键退出...");
Console.ReadKey();
方式二:
//使用自动生成当天题目文件且自动测试的方式
await LeetCodeHelper.GetTodayRecordContentOrInvokeTestAsync(typeof(Program).Assembly.GetName().Name, "Solutions", "Content", SlowMo: 0, Headless: false);
Console.Write("按任意键退出...");
Console.ReadKey();
具体使用可参照作者本人刷leetcode仓库地址 https://gitee.com/wwmin/LeetCodeCSharp.git
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。