主題: 如何抓取網頁資料
顯示結果從 21 到 29 共計 29 條
-
07-04-2013 #21
我想這帖應該是沉了
-
07-04-2013 #22
這是我在成績顯示欄點右鍵,選檢視頁框原始碼所顯示的,所有個資的部分,我用xxx來代替,請大家幫幫我吧
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script type="text/javascript">
<!--
if (navigator.appName.indexOf("Internet Explorer") != -1)
document.onmousedown = noSourceExplorer;
function noSourceExplorer() {
if (event.button == 2 | event.button == 3) {
alert("版權所有,請勿擅自複製!");
}
}
//-->
</script>
<meta http-equiv="Content-Language" content="zh-tw" />
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<meta name="author" content="ShinHer Information Co.,Ltd." />
<meta name="keywords" content="欣河資訊" />
<meta name="description" content="線上查詢系統" />
<meta name="copyright" content="Copyright © 1988-2013 ShinHer Information Co.,Ltd. All rights reserved." />
<meta name="Pragma" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta name="Cache-Control" content="no-cache, must-revalidate" />
<meta name="Cache-Control" content="post-check=0, pre-check=0" />
<meta name="Cache-Control" content="private" />
<meta http-equiv="Expires" content="-1" />
<title>xxx各式成績</title>
<link href="../css/page_all.css?20130704231029634511744" rel="stylesheet" type="text/css" />
</head>
<style type="text/css">
table.t02 tr.rowalt
{
background-color: #f0f0f0;
}
</style>
<table align="right">
<tr>
<td valign="top">
<input type="Button" onclick="javascript: window.print();" style="font-size: 12px" value="列印">
</td>
</tr>
</table>
<font color="#0000ff">
【一年 1班 】[101下] 期末考成績
</font>
<hr />
<br />
<div align="center">學號:xxxx 姓名:xxxx 班級:一年 1班 </div>
<table width="450" border="0" cellspacing="2" cellpadding="2" align="center" ID="Table1" class="t02">
<tr>
<td align="center" valign="top" bgcolor="#0000FF" style="font-size: 15px;color:#ffffff;" nowrap>考 試 科 目</td>
<td bgcolor="#0000ff" align="center" valign="top" style="font-size: 15px;color:#ffffff;">考 試 成 績</td>
<td bgcolor="#0000ff" align="center" valign="top" style="font-size: 15px;color:#ffffff;" nowrap>全 班 平 均</td>
</tr>
<tr >
<td valign="top" style="font-size:15px">國文</td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#ff0000">53</font></td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">62.36</font>
</td>
</tr>
<tr class="rowalt">
<td valign="top" style="font-size:15px">英文</td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">84</font></td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">89.73</font>
</td>
</tr>
<tr >
<td valign="top" style="font-size:15px">數學</td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">72</font></td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">74.36</font>
</td>
</tr>
<tr class="rowalt">
<td valign="top" style="font-size:15px">歷史</td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">88</font></td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">86.49</font>
</td>
</tr>
<tr >
<td valign="top" style="font-size:15px">地理</td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">84</font></td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">79.47</font>
</td>
</tr>
<tr class="rowalt">
<td valign="top" style="font-size:15px">公民與社會</td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">60</font></td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">67.93</font>
</td>
</tr>
<tr >
<td valign="top" style="font-size:15px">基礎物理</td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">67</font></td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">80.69</font>
</td>
</tr>
<tr class="rowalt">
<td valign="top" style="font-size:15px">基礎生物</td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">64</font></td>
<td valign="top" align="right" width="120" style="font-size:15px">
<font color="#0000ff">77.07</font>
</td>
</tr>
<tr>
<td colspan=3></td>
</tr>
</table>
<hr />
<table width="600" align="center" cellspacing="2" cellpadding="2" border="0" style="font-size:16px">
<tr>
<td width="50">總分:</td>
<td></td>
<td width="50">平均:</td>
<td></td>
<td width="50">排名:</td>
<td></td>
<td width="100">類組排名:</td>
<td></td>
</tr>
</table>
<br /><br /><br /><br />
</body>
</html>
-
07-05-2013 #23
應該是去取得導向這網頁的URL
如果是有附加參數的GET請求就不難
-
07-05-2013 #24
他好像是用javascript去做的,要如何去找出它導向的網址?
-
07-05-2013 #25
1.瀏覽器的URL欄位
2.解析JavaScript
範例網頁是用JavaScript動態產生超鏈結網址。
點擊超鏈結後該網址會在瀏覽器URL欄位中,除非redirect其它頁面否則不會變動。
對JavaScript沒深入研究。Server端會有避免URL外洩的保護機制,就看應用程式有無運用。
-
07-05-2013 #26
他的瀏覽器url都不會變,去解析javascript,好像找不到
另外他的網頁,手機也不是全然都不能看,只有是javascript 的 onclick的事件才會沒反應
-
07-05-2013 #27
最後終於解決了,好像手機的java並不完全支援電腦的java,所以我去下載puffin,讓遠端的電腦幫我作運算就搞定了
-
07-06-2013 #28
恭喜你找到解決的辦法
不過java跟JavaScript是不一樣的
範例網頁中相似的選單
http://www.shin-her.com.tw:8080/onli...tion=selection
部份的原始碼如下:
<select name="cs_popup_name_2" onchange="CSURLPopupShow('cs_popup_name_2', 'cs_popup_name_2', 'right_below');" size="8" style="width:381px;font-size:12pt;">
<option> 請 您 點 選 以 下 年 級 成 績</option>
<option value="year_accomplishment.asp?action=selection_underside_year&year_class=一&number=1">侯小如一年級歷年成績</option>
<option value="year_accomplishment.asp?action=selection_underside_year&year_class=二&number=2">侯小如二年級歷年成績</option>
<option value="year_accomplishment.asp?action=selection_underside_year&year_class=三&number=3">侯小如三年級歷年成績</option>
<option value="year_accomplishment.asp?action=selection_underside_year&year_class=四&number=4">侯小如四年級歷年成績</option>
</select>
所以選擇侯小如一年級歷年成績
url會是http://www.shin-her.com.tw:8080/onli...ction_student/year_accomplishment.asp?action=selection_underside_year&year_class=%A4*&number=1
此種?後附帶請求參數是GET請求,用於向server取得資料。
只要知道此url就可以直接取得資料,不過server會有檢查身份的安全機制來阻止直接取得資料,像是使用cookie。此篇文章於 07-06-2013 11:33 被 cct.taiwann 編輯。
-
07-06-2013 #29
謝謝大家的幫忙
相似的主題
-
[求助] 如何取回 iPhone 內的資料
由tommynghk論壇中iPhone 疑難雜症發問區回覆: 1最後發表: 08-10-2012, 01:08 -
[已解決] 如何移動Mail的資料庫到網路伺服器上面?
由Forrest論壇中Mac 硬體疑難雜症區回覆: 3最後發表: 01-07-2012, 03:26 -
[求助] 請問要如何把不同資料夾的照片資料夾一起丟進IPHONE4裡?
由dunhillgu論壇中iPhone 疑難雜症發問區回覆: 3最後發表: 10-21-2010, 14:07 -
[求助] 不想看到「已關閉行動資料開啟行動資料或使用wi-fi來取用資料」
由anicca66論壇中iPhone 疑難雜症發問區回覆: 0最後發表: 10-20-2010, 01:08 -
瀏覽網頁 有些網頁整頁中文都是亂碼 請問該如何解決?
由ethanchen論壇中iPhone 疑難雜症發問區回覆: 0最後發表: 02-14-2008, 13:08