Skip to content

Instantly share code, notes, and snippets.

@nbcchen
Created December 31, 2024 16:18
Show Gist options
  • Save nbcchen/da0dd4efa9c1396fd8c1e726a7cdc238 to your computer and use it in GitHub Desktop.
Save nbcchen/da0dd4efa9c1396fd8c1e726a7cdc238 to your computer and use it in GitHub Desktop.
const brands = ["Toyota", "Jeep", "Mazda", 'Volvo', 'Ford'].map(brand => {
const url = new URL(
"https://www.atlanticchevrolet.com"
);
url.searchParams.append("compositeType", "preowned");
url.searchParams.append("make", brand);
url.pathname = '/all-inventory/index.htm';
console.log(url.href);
});
const vehicles = Array.from($(".vehicle-card-title"));
for (const v of vehicles) {
console.log(v.children[0].children[1].innerText);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment