xalanq / cf-tool

:bar_chart: Codeforces CLI (Submit, Parse, Test, etc.). Support Contests, Gym, Groups, acmsguru, Windows, macOS, Linux, 7 MB
MIT License
1.32k stars 227 forks source link

It doesn't work on new Codeforces. #158

Open wang904 opened 2 years ago

wang904 commented 2 years ago

Because of the highlight of the test cases,the sample it fetchs includes some HTML tags. When I ran cf test a.cpp,the input is
<div class="test-example-line test-example-line-even test-example-line-0">4</div><div class="test-example-line test-example-line-odd test-example-line-1">3 1</div><div class="test-example-line test-example-line-odd test-example-line-1">2 3 1</div><div class="test-example-line test-example-line-even test-example-line-2">3 3</div><div class="test-example-line test-example-line-even test-example-line-2">1 2 3</div><div class="test-example-line test-example-line-odd test-example-line-3">4 2</div><div class="test-example-line test-example-line-odd test-example-line-3">3 4 1 2</div><div class="test-example-line test-example-line-even test-example-line-4">1 1</div><div class="test-example-line test-example-line-even test-example-line-4">1</div><div class="test-example-line test-example-line-even test-example-line-4"></div>

Hope someone can fix it.

SHAHNUR00 commented 2 years ago

I also faced the same issue. You can delete the content of in1.txt and copy-paste the inputs. That's the way.

woshiluo commented 2 years ago

I try to fix it, is there anyone can test it?

https://github.com/woshiluo/cf-tool/releases/tag/v1.0.2

dianhsu commented 2 years ago

I fix it by parsing html document tree, I think it better than solutions based on regex. https://github.com/dianhsu/cf-tool

izlyforever commented 2 years ago

Maybe https://github.com/izlyforever/cf-tool/releases/tag/v1.0.5 is one of answer