Skip to content

Instantly share code, notes, and snippets.

@eugenehp
Created June 26, 2012 15:37
Show Gist options
  • Save eugenehp/2996479 to your computer and use it in GitHub Desktop.
Save eugenehp/2996479 to your computer and use it in GitHub Desktop.
Sample HTML POST form for API for scrapper
<form action="http://localhost:3000/api/v1" method="post">
<p>Your url here</p>
<input id="url"
style="width:800px"
type="text" value="'http://www.patrickhyundai.com/browse-new-hyundais.aspx'"/>
<br>
<p>jQuery Selector</p>
<textarea name="selector" style="width:400px;height:100px">
var s = [];
$('h2 a').each(function(){ s.push($(this).attr('href')) });
console.log(s);
</textarea>
<br>
<p>AJAX page turn</p>
<textarea name="turn">123</textarea>
<br>
<p>MAX number of page</p>
<input name="pages" type="text" value="10"/>
<br>
<br>
<button type="submit">GRUB the DATA</button>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment