R
R
Ruzark2021-04-01 14:06:28
API
Ruzark, 2021-04-01 14:06:28

How to use site data in your program?

There is one site that generates Russian full names, before I just manually copied the result of the generation and scored it in my array in the program, then I thought about whether it was possible somehow to do all this not manually, but, say, automatically. There are a lot of things on the Internet about this, but there is really no structure in all this. I only understood that this is implemented using the site API, or using Parsing. But again, I didn’t find how it all works and how to use it, for example, api, or how to write a program that will parse the site I need and fill in my array, say, with names. Where can you teach this, read more about it and what do you need to know for this? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
1
12rbah, 2021-04-01
@12rbah

Site API
In fact, you need to send a post or get request, but usually the api is paid, on large sites they give from 1 to 10k requests for a free key per month, as a variant with curl to dig deeper, but most likely there are more modern ways to work with api. In your case, if there is no api, then you will have to simulate the generation process and parse the resulting page, but as for me, it’s easier to write your own generator for the full name.

P
Papa, 2021-04-01
Stifflera @PapaStifflera

And what is the difficulty in making a random selection from three pre-filled arrays (last name, first name, patronymic) and gluing everything together?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question