⬆️ ⬇️

What happens when a programmer selects cars

My friend and I have opened a company for the selection of used cars. If you have never heard of such - we help people not to buy a “bucket” . Alas, in Moscow most of the cars offered on the secondary market deserve such an assessment.



To find a decent copy you have to process sometimes over a hundred ads . It happens like this: we look at the photos, the description, note some nuances, then we call the seller and ask more than twenty questions. Then we decide whether to watch the car live.



image

')



And now closer to the scripts



First, we recorded the results of a conversation with sellers on paper . The disadvantages are obvious: a heap of scattered records on different sheets, and if someone from the sellers will call back himself, then there is no chance to find his ad and our records about him.



Logical was the transition to Google-table . In order not to copy-paste manually the mileage, price and other information from the ad, I wrote a parser for auto.ru and Avito. It worked like this: you go to a page with an ad, click a bookmarklet, the seller’s phone number automatically opens, all information is tabulated into a text field, from where it is easily copied and pasted into the Google-table via columns.



Technical difficulties
  1. On auto.ru is Content Security Policy, which prohibits the loading of scripts through an unprotected connection.

    Solution: received an SSL certificate on your hosting.
  2. Later on auto.ru generally banned the download of scripts from foreign domains.

    Solution: go to the Firefox browser, type about: config , find the security.csp.enable item, set false. I did not find such an opportunity in other browsers, therefore the Fire Fox has become the main browser.
  3. In principle, you can not even go to the ad page yourself, and charge it to a virtual browser on the server. But here, sooner or later, the captcha got out, and we have already considered it inappropriate to fight it. Moreover, it is necessary to evaluate the announcement, add your comment.




As a result, we had an impressive table for each order: there were a lot of columns (for each characteristic of the car, for each question asked by the seller) and dozens of lines (by the number of ads). We began to give access to this table to our clients , to make it easier to communicate and to immediately see why we are not going to watch this or that “not broken, not painted” car.



image



It would be possible to use the Google-tables API to immediately parse the ads into them. I almost started to learn the API, but I realized the path is dead-end: when there are ads in the table for a hundred, it’s almost impossible to work with it. In addition, Google-tables have a lot of redundant functionality, but we don’t have what we need. One employee even bought a new laptop, but it did not help - the tables still braked terribly .



By the way, a few words about the organization of our work. At some point I was very tired of calling ads, running into these endless commissions, asking the same questions. We decided to hire remote telephone call employees for this job.



There were guys, I taught everyone how to identify fraud, how to properly ask about the suspension, about the number of owners, etc. They saved the sellers' answers through the Google-form, then I checked the answers and inserted them into the main table that the client had already seen. Too much action.



My hands were itching for a long time, until recently I was hoping to do without creating my own interface, which would take days and nights ...



So the interface appeared



It consists of two main pages:



  1. Home Page. Here we keep records of current orders, write down the criteria, insert references to the issuance of ads on these criteria, etc.



    image



  2. Order page. Here are all the ads added to the database and assigned to this order. Attaching to the order takes place at the time of parsing automatically, according to the car model. Photos from the ad are immediately displayed , now everything is available from one place.



    image



And the salt is all in the questionnaire. It is under each announcement, there are many questions and, accordingly, fields. With instant saving and attribution. I spent the mouse on someone else's message - it brightened. Read it means. The questionnaire also serves as a checklist for checking the car, so as not to forget to check the presence in one of the pledge bases, etc. The client monitors our work through personal access, for each ad sees our resume.



The assignment of statuses in the interface is done with one button, with the ability to filter ads by status. Here, diagnosticians write their reports after the inspection. But if the car falls into the “need to take” category, the customer will immediately call - good cars go in a matter of hours, the decision to buy and leave a prepayment must be made quickly.



image



Autocode



In Moscow and the region there is an official portal Avtokod, where you can see the history of the car, such as: the number of owners and dates of ownership, recorded accidents and insurance claims, year of release and the presence of restrictions. This information saves us from vain skating around the city.



image



Naturally, like a real bummer, I have embedded the AutoCode check into my interface. It works like this: the state number / VIN and the number of the JTS is entered into the appropriate fields, then a request is sent to the server, where the PhantomJS virtual browser is authenticated on the portal from one of five accounts (so that it pops up less often), it writes the car details, parses the answer and at the same time does screenshot. You say that for nonsense? After all, you can go and check it out! Yes, but when you “punch” dozens of cars a day, a script once written saves a lot of time .



The main goal of the interface and the work of the telephone operators: our diagnostician should be the first to inspect the best car . That is, while the diagnostician checks the car, the dialer from home calls up the latest announcements and selects the next option for inspection, even from another order. The competition, for example, is not so: the diagnostician is given an order and forward. Found something - well done. Were the options better? Who knows…



One day, a diagnostician who worked with competitors wanted to work for us. He said that if the car was suitable, but the seller did not bargain by phone, then he didn’t go to him at all, because the company paid him a percentage of the bargaining. However, this is another topic.



Preliminary analysis



image



How does the selection of a dream car begin? In most cases, you really do not be offended, with the procedure of "rejection". That is, if the client wants the Camry XV50 for 900 thousand rubles, then we patiently explain that these are cars of the lower price category in the appropriate condition. To determine which budget is sufficient for the purchase of a car, we again resort to our parser. He takes the prices of all cars in the issuance of auto.ru and considers for each year of production the average and median values . Based on these numbers, it is much easier for us to determine whether to take on the selection in a particular budget. Yes, there are exceptions and anomalies, but better with numbers than without.



PS

The client calls, says he downloaded a screenshot from this article, enlarged it, and found the “Dream Car” in small letters. Scored on Google and so found.

In general, you can consider this advertising, but it will be easier for someone: Car Mechty.rf

Source: https://habr.com/ru/post/372989/



All Articles