https://xiaoxue.iis.sinica.edu.tw/ccdb
以小篆資料庫為例:
https://xiaoxue.iis.sinica.edu.tw/xiaozhuan?kaiOrder=1
- root url: https://xiaoxue.iis.sinica.edu.tw
- root之後的第一個segment
xiaozhuan
表示為小篆資料庫,其他資料庫以此類推 - 參數
kaiOrder
代表字號,小篆從1開始編,推測有9831個字(參考網頁說明:本資料庫共收錄小篆字頭9831個,字形11101個。)
- font: 字型, ex: xiaozhuan
- limit: 收錄字數
- size: 圖片大小(pixel)
- save_path: 存檔路徑的root folder
- root_url: 小學堂資料庫網頁的root,抓圖會用到
- target_url: 目標資料庫網址,ex: https://xiaoxue.iis.sinica.edu.tw/xiaozhuan?kaiOrder=%d。
kaiOrder
參數填入%d
,讓程式碼可以動態塞入參數。
- 程式會依照
font
參數建立資料夾,以小篆為例:. └── xiaozhuan ├── [ 657] 998_0.png ├── [1.0K] 998_1.png ├── [ 976] 999_1.png └── [150K] xiaozhuan.jsonl
pip install selenium