Discussions » Creation Requests

Script for Copart and Iaai websites

§
Posted: 15-12-2024

Hi,
Can anyone create this type of script: on these two examples (similar but different website) there are Lot(on iaai 'Stock') numbers, which we search in google and redirect to bid.cars website to check auction info. Can anyone make it easy that we not to need to search in google. e.g. If we click on lot/stock number it automatically show last sold price, or if it isn't possible , when we click on lot/stock number automatically redirect to bid.cars website with this lot number.(I have google extension but it will not work after 2024). If it isn't possible to create for both websites copart is priority. Thanks
https://www.copart.com/lot/84855114/salvage-2014-ford-fusion-se-hybrid-ca-hayward
https://bid.cars/en/lot/0-37802700/2014-Ford-Fusion-3FA6P0LU3ER306918
https://www.iaai.com/VehicleDetail/41584205~US
https://bid.cars/en/lot/0-41094087/2015-Honda-Civic-2HGFG4A50FH707001

§
Posted: 19-12-2024

// ==UserScript==
// @name Autofind on bid.cars
// @namespace http://tampermonkey.net/
// @version 2024-12-19
// @description Will find current car on bid,cars if 3 is clicked while on a car page of iaai.com
// @author TTT
// @match https://www.iaai.com/*
// @include /^https:\/\/www\.google\.com\/search\?q=https%3A%2F%2Fbid\.cars%2Fen%2Flot%2F.*/
// @icon https://www.google.com/s2/favicons?sz=64&domain=iaai.com
// @grant none
// ==/UserScript==
document.addEventListener('keydown', function(event) {
if (event.key === '3') {
const dataItems = document.querySelectorAll('.data-list__item');
const extractedTextSet = new Set();

dataItems.forEach(item => {
if (item.innerText.includes("Stock #:")) {
const text = item.innerText.replace(/Stock #:?\s*/i, '').trim();
if (text) {
extractedTextSet.add(text);
}
}
});

let extractedText = Array.from(extractedTextSet).join(' ');

extractedText = extractedText.trim().replace(/\s+/g, ' ');

const headerElement = document.querySelector('.pd-header--left');
let headerText = "";
if (headerElement) {
headerText = headerElement.innerText.trim().replace(/\s+/g, '-');
}

const url = `https://www.google.com/search?q=https%3A%2F%2Fbid.cars%2Fen%2Flot%2F${encodeURIComponent(extractedText)}%2F${encodeURIComponent(headerText)}`;

window.open(url, '_blank');
}
});
setInterval(() => {
if (window.location.href.includes("google.com")) {
const targetLink = Array.from(document.querySelectorAll('a'))
.find(link => link.href.includes("bid.cars") && !link.href.includes("google.com"));

if (targetLink) {
window.location.href = targetLink.href;
}
}
}, 500);

§
Posted: 19-12-2024

Big thanks , I didn't think that someone will do this job for free, I just tried. One question, it don't work on copart website, I changed iaai to copart in script text but don't work.

§
Posted: 19-12-2024

i was bored so checked script requests, and i'll do copart next, didnt realize that was the main request

§
Posted: 19-12-2024

i unfortunately cant make it work for copart since the vin number is partially cut and the the lot number is different, and those are really the only two viable ways to search them

§
Posted: 20-12-2024

OK, Big Thanks.

Post reply

Sign in to post a reply.