[問題] 網頁爬蟲 讀不到完整資料
大家好
我想讀下面網頁的表格
http://pchome.megatime.com.tw/stock/sto3/ock1/sid6505.html
雖然在在document的sid6505.html裡看得到需要的資料
但是程式讀出來卻讀不出來
只能讀到下面幾行
想請教這個問題該如何解決 非常謝謝
<html>
<head>
</head>
<body>
<form id='submit_form' name='submit_form'
action='http://pchome.megatime.com.tw/stock/sto3/ock1/sid6505.html'
method='post'>
<input type='hidden' name='is_check' value='1' />
</form>
<script type="text/javascript">
document.getElementById('submit_form').submit();
</script>
</body>
</html>
程式碼:
import requests
res =
requests.get("http://pchome.megatime.com.tw/stock/sto3/ock1/sid6505.html")
print (res.text)
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.192.239.185
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1485354796.A.810.html
※ 編輯: ckcy (123.192.239.185), 01/25/2017 22:57:26
→
01/25 23:38, , 1F
01/25 23:38, 1F
→
01/25 23:39, , 2F
01/25 23:39, 2F
→
01/26 00:40, , 3F
01/26 00:40, 3F
→
01/26 00:46, , 4F
01/26 00:46, 4F
→
01/26 00:48, , 5F
01/26 00:48, 5F
→
01/26 04:27, , 6F
01/26 04:27, 6F
→
01/26 21:00, , 7F
01/26 21:00, 7F
Python 近期熱門文章
PTT數位生活區 即時熱門文章