Do you have the right referer being sent?
Been running into an issue with a script I'm working on, can't seem to figure it out. It should be accepting items, but it doesn't look like the POST request is actually doing anything.
Printout of what the postdata looks like upon submitting:Code:itemnames = [] postdata = {} html = acc.get("http://www.neopets.com/items/transfer_list.phtml") startpos = 0 while html.find("'><br><b>", startpos) != -1: pos1 = html.find("'><br><b>", startpos) + 9 pos2 = html.find("<", pos1) - 1 pos3 = html.find("input type='radio' name='", pos2) + 25 pos4 = html.find("'", pos3) startpos = pos4 itemid = urllib.quote_plus(html[pos3:pos4]) postdata[itemid] = "accept" itemnames.append(html[pos1:pos2]) html = acc.post("http://www.neopets.com/items/transfer_list.phtml", postdata)
Code:{'itemgiven%5B14154130660334%2C191782743%2Crzerox%2Cdylamn%5D': 'accept'}
Do you have the right referer being sent?
(you need an account to see links)
(you need an account to see links)(you need an account to see links)
------------------------
[02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
------------------------
I should, I have tried both of these, though I'd assume either would work.
(you need an account to see links)
(you need an account to see links)
I'm posting to 'http://www.neopets.com/items/transfer_list.phtml' as well, since that's what the form action is set as.
Code:<form name='transfer_form' action='/items/transfer_list.phtml' method='post'>
Is there an error? Try sending the Referrer field
Try posting to (you need an account to see links) so you can see what the HTTP request looks like.
Done @(you need an account to see links)
{
"args": {},
"data": "",
"files": {},
"form": {
"itemgiven%5B14154130660334%2C191782743%2Crzerox%2 Cdylamn%5D": "accept",
"itemgiven%5B14154633856655%2C191790778%2Crzerox%2 Cabril_1999__83%5D": "accept"
},
"headers": {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "en-us,en;q=0.5",
"Connect-Time": "1",
"Connection": "close",
"Content-Length": "161",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "httpbin.org",
"Referer": "http://www.neopets.com/items/transfer_list.phtml",
"Total-Route-Time": "0",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1",
"Via": "1.1 vegur",
"X-Request-Id": "a5d04a92-0864-4b3a-945d-0be203b56386"
},
"json": null,
"origin": "184.75.218.9",
"url": "http://httpbin.org/post"
}
Edit: not sure why it's showing a space in the formdata, that doesn't show up in the shell.
Last edited by Ghosts; 11-09-2014 at 07:55 PM.
if u pm me contents of the html string after the get ill find the bug :p.
Not sure why its failing tbh an u send me a account with gifts on? Everything looks like its working but for some reason its just not processing , probably something small. If you dont wanna do that , try charles proxy and set your browsers proxy to localhost:8888 then do the same in ur script and compare the request.