主要变更: 1. 重命名 ygp_crawler.py -> main.py 2. API参数优化: - tradingProcess 固定传 "513,2C52,3C52" 精准筛选中标结果 - pageSize 固定为 50 提高抓取效率 - 通过 publishStartTime/publishEndTime 传入时间范围 3. 默认查询最近3个月(原为当天) 4. 增量爬取改为默认开启(移除 -i 参数) 5. CSV文件添加 UTF-8 BOM,Excel可直接打开 6. 更新 README.md 文档 7. 添加前端 JS 代码参考文件到 assets/ 目录 使用方法: - 增量更新:python main.py - 全量查询:rm results.csv && python main.py Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2 lines
1.5 KiB
JavaScript
2 lines
1.5 KiB
JavaScript
import{H as i}from"./index-f1c6abff.js";const t=i(),r=i("yhzx"),s=new Map,o=new i("qrcode"),d={getNoticeUrl:(e,a="v2")=>t.get(`trading-notice/${a}/url`,{params:e}),getTradingDetailV2:(e,a="v2")=>t.get(`trading-notice/${a}/detail`,{params:e}),getFileList:(e,a="v2")=>t.get(`trading-notice/${a}/file/${e}`),getYgpCodeRequestParam:e=>t.get("trading-notice/new/qrcode/getRequestParam",{params:e}),getYgpUrl:e=>t.get("trading-notice/qrCode",{params:e}),getNodeList:e=>t.get("trading-notice/new/nodeList",{params:e}),getSingleNode:e=>t.get("trading-notice/new/singleNode",{params:e}),getNewDetailData:e=>t.get("trading-notice/new/detail",{params:e}),getAgendaData:e=>t.get("trading-notice/new/agenda/fetch",{params:e}),getRefDataset:e=>t.get("trading-notice/new/fetch/refDataset",{params:e}),getCorrelationDataset:e=>t.get("trading-notice/new/query/correlationDataset",{params:e}),getSubscribed:e=>r.get(`apis/user-subscribe/getIdByNoticeId/${e}`),subscribe:e=>r.post("apis/user-subscribe",e),unsubscribe:e=>r.post(`apis/user-subscribe/remove/${e}`),getDict:async(e,a="v2")=>{const n=s.get(e);if(n)return n;{const g=await t.get(`trading-notice/${a}/dict`,{params:{tradingProcess:e}});return s.set(e,g),g}},generateQrcode:e=>o.post("generate-qrcode",e,{noNeedTip:!0}),refreshQrcode:e=>o.post("refresh-qrcode",e,{noNeedTip:!0})},p=i("search"),c=new i("mhyy"),l={getTradeTypes:e=>c.get(`/cms/trade/public/${e}`),getAreas:e=>c.get(`/cms/trade/public/areas/${e}`),getJyggList:e=>p.post("v2/items",e),...d};export{l as y};
|