Discussion:
using cURL to edit trashmail.net records
(too old to reply)
Nomen Nescio
2012-06-08 19:50:05 UTC
Permalink
I have about given up in the struggle to send a command to
trashmail.net. I can login and get a cookie just fine using this
command:

curl -s --dump-header cookie.txt\
--data 'api=1&cmd=login&fe-login-user='${userid}'&fe-login-pass='${password}

But I cannot update an address. This is the command:

curl -s --cookie cookie.txt\
--data '{"data":[{"expire":14,"id":1234567}]}'\
'https://ssl.trashmail.net/?api=1&lang=en&cmd=update_dea'

That command matches what I have reverse engineered from header
captures, and the data string also matches the documentation.
However, it results in an unknown error:

{"success":false,"error_code":0}

Not even the website admin can figure this out. Any ideas?

Also, is this the best newsgroup for web scraping types of questions?
Nomen Nescio
2012-06-17 10:22:03 UTC
Permalink
Post by Nomen Nescio
curl -s --cookie cookie.txt\
--data '{"data":[{"expire":14,"id":1234567}]}'\
'https://ssl.trashmail.net/?api=1&lang=en&cmd=update_dea'
Got my answer. There needs to be a:

--header Content-Type:"application/json"
Post by Nomen Nescio
Also, is this the best newsgroup for web scraping types of questions?
I still don't have this answer.

Loading...