net.http_POST

The_Silencer

Developer
Jan 29, 2013
48
0
0
N/A
I have login working and cookie stored, now there is a form I would like to pass a url than re.search for the output.
I am struggling with it.

Here is the POST area: not much in it
Code:
<form name="import" action="" method="POST" enctype="multipart/form-data">

<p><textarea id="download_links" name="download_links" style="width:98%;resize:none;" rows="12" placeholder="Enter your links here (one link per line)"></textarea></p>
<p>
action="" I am not sure about that

Here is what I am trying to code:
Code:
posturl = url "url is passed for the page"
        link = 'link to send'
        form = {"not sure", 'download_links' : link} *not sure about the post data to send and how properly
        net.set_cookies(cookiejar) 
        content.net.http_POST(posturl, form)
after you submit a link it is verified under the form box, and need to research for the following:

match=re.search('<span class="resultvalid">(.+?)</span>', content)
return match
I need this match but I am not submitting the form properly. Is this even possible?
 

voinage

Banned
May 9, 2012
574
0
0
You will have to use wireshark to find the relevant values then include them in the POST...
Download and install wireshark. Open your browser to the login page.
Run wireshark then logon on your browser....
Wait until loaded then stop wireshark.
Type http in the search area then look for POST
Check the data you will see the exact formed sent information.

Just do the same remembering that the , = & and the : is = so...

login=test&pass=frog&value=1

{'login':'test','pass':'frog','value':'1'}