Craigslist Scraper avatar

Craigslist Scraper

Try for free

2 hours trial then $25.00/month - No credit card required now

Go to Store
Craigslist Scraper

Craigslist Scraper

ivanvs/craigslist-scraper
Try for free

2 hours trial then $25.00/month - No credit card required now

Extract data from classified advertisements on Craigslist. Scrape contact details from jobs, housing, items wanted, items for sale, services, community service, gigs, events and resumes listed on Craigslist. Download listings data in JSON, XML, Excel, and other versatile

U8

location field doesn't pull correct data

Open

user-8E4QNYfcACnqSyPJF opened this issue
2 months ago

"location" field is often pulling a price value, and sometimes has a city name but no state/province

you can usually get the city name and state or province name from the addressLocality and addressRegion fields in the following section on listing screens:

{ "@type": "Product", "@context": "http://schema.org", "offers": { "priceCurrency": "...", "@type": "Offer", "availableAtOrFrom": { "address": { "addressLocality": "...", "streetAddress": "", "@type": "...", "addressRegion": "...", "postalCode": "...", "addressCountry": "..." } } } }

ivanvs avatar

Hi,

Thank you for raising this error ticket. I will take a look.

ivanvs avatar

I've improved method for location extraction for all housing categories.

Could you check if this helps you?

U8

user-8E4QNYfcACnqSyPJF

2 months ago

Any way to do this for non-housing categories?

U8

user-8E4QNYfcACnqSyPJF

2 months ago

here's an example of what i'm talking about

ivanvs avatar

Ok, I will investigate if there is some way to get better location.

We could get location from longitude and latitude, but reverse geocoding tools are not free, they are paid by request. So I don't see them as an real option for this public scraper.

U8

user-8E4QNYfcACnqSyPJF

2 months ago

I put on the original ticket the fields you can use to get location. Let me know if you have questions on those!

ivanvs avatar

Ok, I managed to do implementation of this. I just need to do some more testing. Tomorrow I will publish the version with this fix.

ivanvs avatar

New version is available. In result you will have address filed with information with location. Not all posts have this information.

U8

user-8E4QNYfcACnqSyPJF

a month ago

Okay, we're still not seeing it in the "Location" field in most results. Should we be looking in a different field?

U8

user-8E4QNYfcACnqSyPJF

a month ago

The addressLocality and addressRegions are the fields we care most about

ivanvs avatar

I've done some mapping:

postalCode -> postalCode streetAddress -> street addressLocality -> city addressRegion -> region addressCountry -> country

So you need to use region and city field in address object.

Not all ads have this information in it. Where there is, it will be extracted. Also not all categories have this data. This is currently only available on forSale, housing and jobs categories

Developer
Maintained by Community

Actor Metrics

  • 14 monthly users

  • 5 stars

  • >99% runs succeeded

  • 6.7 days response time

  • Created in Sep 2022

  • Modified 20 days ago