#获取站点简称js文件

wget --user-agent="Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0" "https://kyfw.12306.cn/otn/resources/js/framework/station_name.js?station_version=1.8392" -O station_name.js --no-check-certificate

#使用gawk格式化处理

cat station_name.js | gawk '{split($0,b,"@");for(i=1;i<=length(b);++i)print b[i] }' | gawk '{split($0,c,"|");print c[2],c[3]}' > station_name.txt

Logo

更多推荐