in reply to Script doesn't return any error,but torrent isn't uploaded.
I haven't used WWW::Mechanize much but the first thing that leaps out at me is you are not doing any sort of error detection within the script. There are a couple of methods I'd suggest you read up on for the module the first being success() and the other being status()
$mech->get("http://localhost/TB_ALPHA/upload.php"); sleep 2; warn "wait"; $mech->field('file', $torrent_file); #input torrent file warn "wait $torrent_file"; $mech->field('name', $name); #file name warn "wait $name"; $mech->field('descr', $descr); #description warn "wait $descr"; $mech->value(3); #category warn "wait"; $mech->click_button(value => "Do it!"); #Clicks do it warn "wait";
That bit there makes me suspicious as well. I don't think it is doing what you think it is...
|
|---|