From my kad feeder:
Code:
def removeFromSDB(item):
#Search Item
html = acc.get("http://www.neopets.com/safetydeposit.phtml?obj_name=%s&category=0" % urllib.quote_plus(item),"http://www.neopets.com/safetydeposit.phtml")
#Check if the item was found on the SDB
if 'Not finding any items' in html:
return False
regex = '<td align="left"><b>%s<br><span class="medText">[\s\S]+?<td align="left"><b>([\w\s]+?)<\/b>[\s\S]+?back_to_inv\[(\d+?)\][\s\S]+?total_count=\'(\d+?)\'' % re.escape(item)
try:
category,code,amount = re.findall(regex,html)[0]
postData = ([
("back_to_inv["+code+"]",amount),
("pin",PIN), #Delete this if needed
("obj_name",urllib.quote_plus(item)),
("category","0"),
("offset","0")
])
html = acc.post("http://www.neopets.com/process_safetydeposit.phtml?checksub=scan",postData,"http://www.neopets.com/safetydeposit.phtml?obj_name=%s&category=0" % urllib.quote_plus(item))
return True
except IndexError:
#Only items that contain the item we wanted ("Mau Codestone" => "Mau Codestone Plushie")
return False
@(you need an account to see links) I can send you my SDB remover if you want. I think I updated it not long ago but forgot to upload here.
Edit:
The code it's copied&pasted from another program and I just noticed that if you want to remove the item "Mau Codestone" and you have 10 it'll remove all of them.