Indeed Scraper avatar
Indeed Scraper

Pricing

$5.00 / 1,000 results

Go to Store
Indeed Scraper

Indeed Scraper

Developed by

Misceres

Misceres

Maintained by Apify

Scrape jobs posted on Indeed. Get detailed information from this job portal about saved and sponsored jobs. Specify the search based on location with the output attributes position, location, and description.

4.3 (28)

Pricing

$5.00 / 1,000 results

325

Total users

9.4k

Monthly users

1.4k

Runs succeeded

>99%

Issues response

21 days

Last modified

a month ago

MR

Add actual date posted?

Closed

mr415 opened this issue
2 years ago

Is it possible for you to calculate the date the job is posted? It shows "Posted 3 days" ago, for example, but it would be great to use that to generate the actual date in a separate field called whatever you think makes sense. I can send you what I've used for another custom actor if you need some code to do this.

svpetrenko avatar

Hi. Yeah, would be cool. Send it and I'll take a look

MR

mr415

2 years ago

Sure, here is the code from another actor I use. You will need to modify the lines where I have made comments.

const result = {}; const currentDateTime = new Date(); const text = $('h6[itemprop="datePosted"],h6.date-posted').text().trim(); // CHANGE to however you are pulling in the posted x days ago

const daysMatch = text.match(/Posted (\d+) days ago/); const hoursMatch = text.match(/Posted (\d+) hours ago/);

if (daysMatch) { const daysAgo = parseInt(daysMatch[1], 10); currentDateTime.setDate(currentDateTime.getDate() - daysAgo); } else if (hoursMatch) { // If it's less than 24 hours ago, we can just use the current date }

// Format date to "mm/dd/yyyy" const formattedDate = (currentDateTime.getMonth() + 1).toString().padStart(2, '0') + '/' + currentDateTime.getDate().toString().padStart(2, '0') + '/' + currentDateTime.getFullYear();

result.posted = formattedDate; // CHANGE to whatever variable you like, but formattedDate has the value as 05/02/2022 for example

svpetrenko avatar

Hi again. Added this under postingDateParsed. It uses chrono-node lib. I've also noticed that in some cases the original postedAt might be missing in the results, but it seems to be a platform bug, so might be fixed later