Button Press Simulation... [modified]
-
Hello. I am trying to make my own (freeware) Rapidshare downloader in C# and I need a way to do the button press simulation (for the "Free User" button on the rapidshare page). Below is the HTML code for the 2 available buttons (free & premium). Right now, I am using a WebClient to get the HTML page and I 've read on the net that I must make an http Request for the link placed in the value of
action
. However this is not enough (I return to the same page). I guess I must use theHttpWebRequest
, theaction="..."
and theid="ff"
to make it work. Can anyone tell me how exactly (because I have no idea yet... :(( ) ? (I mean... where do I put theid
) I 've found this: How to use HttpWebRequest and HttpWebResponse in .NET[^] but should I put theid
in thewebrequest.Headers
like that (?): webrequest.Headers.Add("id", "ff"); ???</script>
<h1>FILE DOWNLOAD</h1>
<div class="klappbox">
<p class="downloadlink">http://rapidshare.com/files/206907912/Stealth.rar <font style="color:#8E908F;">| 33 KB</font></p>
<center>
<table>
<tr valign="top">
<td width="300" style="text-align:center;">
<form id="ff" action="http://rs764.rapidshare.com/files/20600000/a.rar" method="post">
<input type="hidden" name="dl.start" value="Free" />
<img src="/img2/dl_langsam.gif">
<br />
<input type="submit" value="Free user" />
</form>
<script type="text/javascript">
<!--
if (window.location.hash == "#dlt")
document.getElementById("ff").action += "#dlt";
//-->
</script>
</td>
<td width="300" style="text-align:center;">
<form action="http://rs764.rapidshare.com/files/20600000/a.rar" method="post">
<input type="hidden" name="dl.start" value="PREMIUM" /> -
Hello. I am trying to make my own (freeware) Rapidshare downloader in C# and I need a way to do the button press simulation (for the "Free User" button on the rapidshare page). Below is the HTML code for the 2 available buttons (free & premium). Right now, I am using a WebClient to get the HTML page and I 've read on the net that I must make an http Request for the link placed in the value of
action
. However this is not enough (I return to the same page). I guess I must use theHttpWebRequest
, theaction="..."
and theid="ff"
to make it work. Can anyone tell me how exactly (because I have no idea yet... :(( ) ? (I mean... where do I put theid
) I 've found this: How to use HttpWebRequest and HttpWebResponse in .NET[^] but should I put theid
in thewebrequest.Headers
like that (?): webrequest.Headers.Add("id", "ff"); ???</script>
<h1>FILE DOWNLOAD</h1>
<div class="klappbox">
<p class="downloadlink">http://rapidshare.com/files/206907912/Stealth.rar <font style="color:#8E908F;">| 33 KB</font></p>
<center>
<table>
<tr valign="top">
<td width="300" style="text-align:center;">
<form id="ff" action="http://rs764.rapidshare.com/files/20600000/a.rar" method="post">
<input type="hidden" name="dl.start" value="Free" />
<img src="/img2/dl_langsam.gif">
<br />
<input type="submit" value="Free user" />
</form>
<script type="text/javascript">
<!--
if (window.location.hash == "#dlt")
document.getElementById("ff").action += "#dlt";
//-->
</script>
</td>
<td width="300" style="text-align:center;">
<form action="http://rs764.rapidshare.com/files/20600000/a.rar" method="post">
<input type="hidden" name="dl.start" value="PREMIUM" /> -
On second review, it seems that Rapidshare is well protected so that download-manager-makers have a hard time... Perhaps I should post a question here : http://www.hackforums.net[^] :sigh:
kostas KEL
You are trying to second guess rapidshare ( for that matter any other site ). What happens if they change they page or controls? you code will be easily broken.
Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
-
You are trying to second guess rapidshare ( for that matter any other site ). What happens if they change they page or controls? you code will be easily broken.
Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
Yes. That is a problem. However, if I learn how to do it once, then I could do it easier and faster the next time(s). And in the process of trying, I will learn new things. As a poet would say (I don't like poetry by the way...) it's more about the journey, not the destination. ;)
kostas KEL