Giter Site home page Giter Site logo

zerojudge_exporter's Introduction

ZeroJudge_Exporter

一鍵匯出您在高中生解題系統上所有 AC 的程式碼

Screenshot


在高中生解題系統上寫了好多程式,但是有的有的用電腦寫,有的用手機寫,還有的在學校電腦寫。想要分享傳承給學弟們,卻發覺整理實在有夠麻煩? 所以,「ZeroJudge Exporter」誕生了!

需求

  • Python 3
  • selenium
  • beautifulsoup4
  • chromedriver

功能

登入

Login 因為 ZeroJudge 不提供 API 且登入時必須通過 reCAPTCHA,故使用 selenium + chromedriver 讓使用者手動登入後將 jsessionid 保存後再以 requests 把程式碼抓下來。

Recaptcha

不曉得是不是由於使用 selenium 所以感覺人機驗證特別難過。也可以用 Google 登入,只是我的 Google 有 2FA。

亦支援從已登入的瀏覽器中提出 jsessionid 快速登入。請按 F12 叫出開發者工具。Chrome 在 Application 分頁中有個 cookies,找到長度為 32 的 hex 字串 jsessionid 複製並選擇自訂 cookies。 Fast Cookies

檢視

以列表檢視程式碼。 List

匯出

將程式碼全部下載匯出到指定資料夾 Dialog Success Folde

zerojudge_exporter's People

Contributors

ncchen99 avatar nevikw39 avatar

Stargazers

蔡帛翰 avatar Chun-Mu, Weng avatar  avatar  avatar Sam  avatar  avatar  avatar b0ring avatar LE37 avatar Wei-Lun Tsai avatar

Watchers

James Cloos avatar  avatar

Forkers

ncchen99

zerojudge_exporter's Issues

執行時發生 NotImplementedError: Only the following pseudo-classes are implemented: nth-of-type. 錯誤

環境:python3.6 (anaconda3)
OS:mac(已自行安裝chorme driver)

執行時發生錯誤,traceback如下

Traceback (most recent call last):
  File "ZeroJudge_Exporter.py", line 110, in <module>
    if '沒有發現任何資料!!' in soup.select_one('body > div.container > div > table > tr:nth-child(2) > td').text:
  File "/Users/chen/anaconda3/lib/python3.6/site-packages/bs4/element.py", line 1403, in select_one
    value = self.select(selector, limit=1)
  File "/Users/chen/anaconda3/lib/python3.6/site-packages/bs4/element.py", line 1609, in select
    for candidate in _use_candidate_generator(tag):
  File "/Users/chen/anaconda3/lib/python3.6/site-packages/bs4/element.py", line 1570, in recursive_select
    for i in tag.select(next_token, recursive_candidate_generator):
  File "/Users/chen/anaconda3/lib/python3.6/site-packages/bs4/element.py", line 1528, in select
    'Only the following pseudo-classes are implemented: nth-of-type.')
NotImplementedError: Only the following pseudo-classes are implemented: nth-of-type.

94行那邊爛掉惹🐻 

偶改成醬子還是不行🦧
a = browser.find_element_by_xpath( "/html/body/div[3]/div/div[1]/div/div[2]/div[3]/a")
//這應該是解題列表的按鈕
🐴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.