Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using cURL to edit trashmail.net records

7 views
Skip to first unread message

Nomen Nescio

unread,
Jun 8, 2012, 3:50:05 PM6/8/12
to
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

unread,
Jun 17, 2012, 6:22:03 AM6/17/12
to
Nomen Nescio <nob...@dizum.com> wrote:
>
> 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'

Got my answer. There needs to be a:

--header Content-Type:"application/json"

> Also, is this the best newsgroup for web scraping types of questions?

I still don't have this answer.

0 new messages