作者yshihyu (yshihyu)
看板Python
标题[问题] 爬取网站的excel档案
时间Wed Apr 3 02:07:23 2019
https://gist.github.com/shihyu/cafbf8feeb1dbb821084504fcd2c544b // 目前程式码
我想爬取
http://mopsfin.twse.com.tw/ 网站的excel 文件
目前是从 requests.post 出来结果不是chrome分析的那个页面
想请问一下可能原因是?
我看chrome 分析会有 jsessionid ? 是要产生这个才可以嘛?
Request URL:
http://mopsfin.twse.com.tw/compare/data;jsessionid=948EF4B129CCA4E8F4FA1A8991AC72F8
还有我看点选excel 下载好像是javascript 功能有办法透过直接下载嘛?
还是说javascript 必须要用 selenium?
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 106.104.121.78
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1554228447.A.E9A.html
※ 编辑: yshihyu (106.104.121.78), 04/03/2019 02:27:49