Adding the Year in the Item Date Format

You want to create an RSS feed from a web page that publishes company news releases. However, the year is listed separately, and the section where the news is posted only has a date format like “9/19” (correctly representing his September 19, 2023).
Is there a way to add the year and define the month and day using the feed author’s item date format in this case?

sample:

<h1>2023</h1>
<p class="spot_post_date">9.19 <span class="lt_bar"><span>news release article</span>read</span></p>

An url to that page would be helpful.

Did you try the ‘item-date-format’ field in ‘advanced selector’?

Try:
item date selector: p.spot_post_date
item date format: m.d or m.d+

That will of course, not respect the year in <h1> but I hope it would use the current year instead.

Thank you for your prompt response.
I’m interested in customizing the ‘item-date-format’ for the ‘advanced selector.’
Based on your advice, I tried below, but it displayed the year as 1970. Is it possible to add the fixed year 2023 using this ‘item-date-format’?

https://createfeed.fivefilters.org/extract.php?url=https%3A%2F%2Fwww.nnlife.co.jp%2Fcompany%2Fnews&item=tr&item_title=a&item_date=td&item_date_format=m*d*&max=5&order=document&guid=0

By the way, here is the link to the web page I want to scrape.
It’s a Japanese web page, so it might be a bit challenging to understand, but the year 2023 is mentioned independently, and each news release article only displays the month and day.

url

@fivefilters: could we extract the date from the URL?

I tried with selector: a @href and :scope @href
with format: ‘*/Y/*md_+’

but no success.
The links directing to PDFs and the year in the filename varies between 2 and 4 digits

@kskok could you live with a short date within the title?
item title selector = :scope

It would be possible to extract the date from the URL if the date formats were consistent, but they are not. As you say @HolgerAusB, the combination of 2 and 4 digit years makes it difficult to do.

And Feed Creator does not default to the current year when no year is present because it has no memory of old items. So when the year changes (e.g. 2023 to 2024), we don’t want the year to suddenly become 2024 on items that were published in 2023. So in Feed Creator you currently need the year to be present in a way that can be targetted with the item date format field.

In our Feed Control product, we store items in a database. So there is an option to have the current date apply to the item when it’s detected.

Use date item added as publication date

This feature is intended for use with the Webpage-to-RSS feature. When your source is items on a webpage, often the new items pulled in won’t have a date associated with them. If you enable this option, Feed Control will use the date and time it detected the new item as its publication date.

This is necessary when the application reading the feed requires item dates be present. IFTTT is an example of a service that recommends feeds include item dates.

This option can also be used with any feed that doesn’t include item dates or in situations where you want the item date to be replaced by the date and time the new item was detected by Feed Control.

1 Like