Response information jsonp_1 ({"***"}) format, how to extract information

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
Justso_
Posts: 7
Joined: 19 Sep 2019 14:43

Response information jsonp_1 ({"***"}) format, how to extract information

Post by Justso_ » 16 Jun 2020 02:20

example:
jsonp_1592191820948_64292({"code":"0","data":{"growth":"18","nutrients":"0","beanState":"2","beanImg":"https://m.360buyimg.com/mobilecms/jfs/t ... e51465.gif"}});

How to get the value of growth ?

Thank you for your help....

Horschte
Posts: 56
Joined: 03 Nov 2014 18:00

Re: Response information jsonp_1 ({"***"}) format, how to extract information

Post by Horschte » 22 Jun 2020 21:09

Try this:

Code: Select all

mytext='jsonp_1592191820948_64292({"code":"0","data":{"growth":"18","nutrients":"0","beanState":"2","beanImg":"https://m.360buyimg.com/mobilecms/jfs/t ... e51465.gif"}});';
match = findAll(mytext, ".*growth\":\"(.*)\",\"nut", true)[0][1];

Justso_
Posts: 7
Joined: 19 Sep 2019 14:43

Re: Response information jsonp_1 ({"***"}) format, how to extract information

Post by Justso_ » 23 Jun 2020 09:27

Horschte wrote:
22 Jun 2020 21:09
Try this:

Code: Select all

mytext='jsonp_1592191820948_64292({"code":"0","data":{"growth":"18","nutrients":"0","beanState":"2","beanImg":"https://m.360buyimg.com/mobilecms/jfs/t ... e51465.gif"}});';
match = findAll(mytext, ".*growth\":\"(.*)\",\"nut", true)[0][1];
Thank you !
Learning how to use

Micky Micky
Posts: 179
Joined: 16 Oct 2019 17:38

Re: Response information jsonp_1 ({"***"}) format, how to extract information

Post by Micky Micky » 26 Jun 2020 19:03

Hello,

Could you provide a link to the site which gave you that JSON response?

Many thanks

Micky
Crude but it works.

Post Reply