![]() |
PCDVD數位科技討論區
(https://www.pcdvd.com.tw/index.php)
- 疑難雜症區
(https://www.pcdvd.com.tw/forumdisplay.php?f=34)
- - 關於perl的post過後問題
(https://www.pcdvd.com.tw/showthread.php?t=916892)
|
---|
關於perl的post過後問題
小弟最近在利用perl做自動登入擷取網頁資訊的perl程式
程式碼如下: 代碼:
use strict; use LWP::UserAgent; my $browser = LWP::UserAgent->new; my $resp = HTTP::Request->new(POST => 'http://www.tvboxnow.com/logging.php?action=login&loginsubmit=yes'); $resp->content_type('application/x-www-form-urlencoded'); $resp->content('loginsubmit=true&username=test&password=test'); my $response=$browser->request($resp)->as_string; my $url="http://www.tvboxnow.com/index.php"; $resp = HTTP::Request->new(GET => $url); print $browser->request($resp)->as_string; 在前半段部分已經成功登入,從$response可得知 但是接下來要擷取網頁資訊的時候又變成登出狀態了 因此我在猜想會不會是不同session 該如何解決這個問題呢?有能人幫忙解答嗎?謝謝~ |
所有的時間均為GMT +8。 現在的時間是03:23 PM. |
vBulletin Version 3.0.1
powered_by_vbulletin 2025。