December 3, 2022
I am reading the list of cars from Craigslist Miami using VBA. The code is working fine with printing the links for each vehicle and price. The only issue when I select a different city for instance, Los Angeles, the URL sysntax changes and I am not sure how to read the class name. Code below works fine for Miami link (in the code), but does not work for this link: https://losangeles.craigslist......1~list~1~0
Please see attached.
Thank you for helping.
October 5, 2010
Crossposted here
excel - How Can I Extract list of prices from website using VBA? - Stack Overflow
Please read these Forum Rules
October 5, 2010
Hi,
Have you tried using the updated code provided on Stack Overflow? I tried it and it looks like it works. You just need to incorporate your original code loop or each location you want to get data from.
I don't see that the url changes beyond the location name at the start or the URL so it's no different to dealing with different page numbers for each page of search results.
Phil
December 3, 2022
Hi Phil - Sorry for the delayed response.
I tried the code on Stack Overflow, but it s super slow. My original code in the file I shared is very fast and works exactly how I want it. I was thinking if I can use a Case Statement with expression checks the format of the URL. I just need to figure out how to update the URL Syntax, class names, etc..
It would be great if you can take a look at file attached.
Thanks
1 Guest(s)