Extremely rudimentary Python script to scrape problems from vjudge.com
Difference between en2 and en3, changed 10 character(s)
Hi. I've got plenty of free time lately and I decide to make this script with the help of ChatGPT.↵

<spoiler summary="Here it is">↵
Apparently, I cannot send the raw code because of Cloudflare. Here's a pastebin link instead: [Extremely rudimentary Python script to scrape problems from vjudge.com](https://pastebin.ai/kn8mmjrefk)↵
</spoiler>↵

Usage:↵
- Copy the code given into a .py file↵
- Create two files in the same directory of the .py file, one named "urls.txt" with urls of problems on vjudge.com (one url on each line); and another one named "test.html" which will be the output of the program↵
- Run the script and witness the results↵
As you can clearly see, the scripts have lots of room for improvement↵
- CSS design is virtually non-existent or too abhorrent↵
- Cannot render out all pdf pages as pictures (Personally I think this is important because I intend to print this HTML)↵
- Bad code rendering↵
- HTML format is sluggish, non-standard ↵
- And even more ...↵

However, I believe the true value of this script lies in its ability to bundle problems so that i don't have to browse the web over and over again. You might not think that is necessary, but I ,for one, need to allocate my roaming data for much more important undertakings (i.e SHCD HUST K69 siuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu)↵

Any improvement or usage of the script is welcomed and encouraged. I will try to better the code, but do not ask me to help since the SHCD are really taking up a whole lot of my roaming data ... and time (maybe i don't have as much time as I imagined)↵

Anyway, thanks for reading↵




<spoiler summary=""What the hell is this SHCD thing?" I hear you asked (or not)">↵
If you know it, you know it. For the uninitiated, it is just orientation activities (with Vietnamese characteristics).↵
</spoiler>


History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English tranducbo 2024-09-05 12:23:05 10 Figure how to send the code
en2 English tranducbo 2024-09-05 12:21:20 215 Figure how to send the code
en1 English tranducbo 2024-09-05 12:18:23 1724 Initial revision (published)