lewzer 1 Posted October 25, 2013 Report Share Posted October 25, 2013 Hey all, I'm having an issue trying to scrape the upload ID from this site in order to be able to http Post instead of through the browser. I'm not sure if this is even possible, here is the code from firebug and I can see the upload id but when I do a GET I'm only seeing " http://img4.imageporter.com/cgi-bin/upload.cgi?upload_id= " when scraping the Xpath. (/html/body/center/div/div[3]/div[2]/form)------------------------------------------------------------------------------------------------<form onsubmit="if(this.adult.value == '') { alert('Select file type'); return false; } return StartUpload2(this);" method="post" action="http://img4.imageporter.com/cgi-bin/upload.cgi?upload_id=695230272595&js_on=1&utype=reg&upload_type=file&X-Progress-ID=695230272595" enctype="multipart/form-data" name="file" target="xupload"><input type="hidden" value="file" name="upload_type"><input type="hidden" value="kf8cvn0pg3ki4juu" name="sess_id"><input type="hidden" value="http://img4.imageporter.com/tmp" name="srv_tmp_url">------------------------------------------------------------------------------------------------ Please let me know if this is even possible, or am I just wasting time, new to http so still trying to learn what I can. Quote Link to post Share on other sites
Steve 30 Posted October 25, 2013 Report Share Posted October 25, 2013 Not sure if this is what you are trying to accomplish, but this gets the upload_id from the code you provided: set(#page, "<form onsubmit=\"if(this.adult.value == \'\') \{ alert(\'Select file type\'); return false; \} return StartUpload2(this);\" method=\"post\" action=\"http://img4.imagepor...bin/upload.cgi?upload_id=695230272595&js_on=1&utype=reg&upload_type=file&X-Progress-ID=695230272595\" enctype=\"multipart/form-data\" name=\"file\" target=\"xupload\"> <input type=\"hidden\" value=\"file\" name=\"upload_type\"> <input type=\"hidden\" value=\"kf8cvn0pg3ki4juu\" name=\"sess_id\"> <input type=\"hidden\" value=\"http://img4.imageporter.com/tmp\" name=\"srv_tmp_url\">", "Global") set(#upload_id, $find regular expression(#page, "(?<=d\\=)[a-zA-Z0-9]+(?=\\&)"), "Global") Quote Link to post Share on other sites
lewzer 1 Posted October 25, 2013 Author Report Share Posted October 25, 2013 The issue is not grabbing it with regex , when I do a http get request it doesn't have any variables to scrape. Not sure if its loading from a java script. Quote Link to post Share on other sites
Steve 30 Posted October 29, 2013 Report Share Posted October 29, 2013 The issue is not grabbing it with regex , when I do a http get request it doesn't have any variables to scrape. Not sure if its loading from a java script. Without seeing the actual site, its hard to determine whats happening... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.