Get information from the Internet

I am working on a project with svyazannoy bluetooth and arduino. The algorithm looks like this:
If you press the button, Arduino sends the symbol "49" to the application.
If the application receives the symbol "49", then the application goes to the site and learns the time and uses html to copy the time and paste it into Label2.

The application receives and sends. The problem is, the app accessing the site does not receive the information. Please help me?

Everything seems to be a mistake in this block
A few months ago, everything worked. It seems that the structure of the site where I take information has changed.
Can you please help?
blocks (4)

This is not a mistake. I wrote you in another thread that the owner of the page you are trying to scrape has introduced protection and you will not get information from this page anymore. Look for another site from which you can get time, preferably not by scraping, but through the API

e.g. here:

1 Like

Can I use the same API in all applications?

Registered on the website World Time API - API Ninjas

I got the necessary API key, then what do I need to do?

I did it like this:

Please tell me where to insert the API?
Is returning:
{"error": "Missing API Key."}
Instead of "your_api_key" I inserted my API.
But it doesn't work

Every API page has FAQ or HOW TO information, you need to look on that site for how to build the query. You probably need to put the api key in the query.

When I get home, I'll try to help.

1 Like

Which response content do you get in the Web.GotText Event?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

Try this api, without registration and api_key....

We get the answer in JSON:


And with these blocks you can read the hours:

1 Like

Thanks! I did exactly the same, but I have this error

what do you get if you click this link
your response in the browser should look like this



1 Like

I get it if I click the link:

Those very same blocks worked fine here in New York when dragged from the board into AI2.

The web site might be fussy.

1 Like

Hello, it turns out I made a mistake with one block. Fixed it. I did the following:
When Label1 receives the time, the application via Bluetooth should only send the hour and minutes via one digit each. Every 50 ms seconds.
If the time is 10:30, Bluetooth sends:

1 (after 50 ms)
0 (after 50ms)
: (after 50ms)
3(after 50ms)
0(after 50ms)

I put together such a block, but there is some kind of error in it. Please tell me?

blocks (11)

What effect do you get? Try moving the block that disables the clock.

1 Like

I did exactly the same thing, but Bluetooth does not send the characters correctly and is very laggy

What do you mean it's not sending characters correctly? What do you get in arduino? Perhaps the bluetooth component takes more than 50ms to send data.

1 Like

Sometimes it sends characters, now it has stopped sending at all
Now even the time is not displayed on the label
50 ms for bluetooth is enough, I think, because it worked like that on another project

Arduino receives this message

The application receives this message