G
G
Georgy Bolshakov2020-05-21 17:39:41
Python
Georgy Bolshakov, 2020-05-21 17:39:41

How to send a request if the element does not have a name tag?

Greetings.
I'm trying to solve the following problem: I need to get a list of dealerships from the site https://services.audi.ru/dealer-search/
The site has a field where you can specify the name of the city and there is a switch to the list view.
The problem is that the search field does not have a name tag and it is not possible to pass a value to it.

<input type="text" id="search" class="filter-item__input" placeholder="Поиск по городу или дилеру">

And how to approach the switch there are no ideas at all.
Please tell me with a solution or at least a direction where to look. I've been learning Python for a while now. For the solution, I used the requests library for sending requests and beautysoup for parsing.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
galaxy, 2020-05-21
@invader33k

Nothing is sent there, the search is done by javascript according to the loaded full list.
The list itself is here (XML)

S
Sergey Karbivnichy, 2020-05-21
@hottabxp

See what the browser sends and receives. It is worth paying attention to xhr requests:
https://services.audi.ru/api/dealer/list.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question