Change Frequency Filter Options#
Example#
Let's imagine a basic sitemap with three URLs, each with different change frequencies:
sitemap.xml | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
With ChangeFrequency.DAILY
in the SitemapFilter
we can target any URLs that have a change frequency of daily
. Effectively, this will submit the URL https://example.com/page2
to IndexNow because only it has that change frequency:
Python | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Instead of the predefined ChangeFrequency
enumerations, you can also use basic string input:
11 |
|
Documentation#
ChangeFrequency
#
The change frequency of a sitemap URL, e.g. <changefreq>monthly</changefreq>
, and is used to indicate to a crawler how often the resource is expected to change. Find more inforation at www.sitemaps.org.
Attributes:
Name | Type | Description |
---|---|---|
ChangeFrequency.ALWAYS | Enum | The resource is always changing. |
ChangeFrequency.HOURLY | Enum | The resource changes every hour. |
ChangeFrequency.DAILY | Enum | The resource changes every day. |
ChangeFrequency.WEEKLY | Enum | The resource changes every week. |
ChangeFrequency.MONTHLY | Enum | The resource changes every month. |
ChangeFrequency.YEARLY | Enum | The resource changes every year. |
ChangeFrequency.NEVER | Enum | The resource never changes. |
Example
Get all URLs with a change frequency set to daily
:
Python | |
---|---|
1 2 3 |
|
Instead of the predefined ChangeFrequency
enumerations, you can also use basic string input:
3 |
|