Browse Source

Do not add EOL releases to sitemap

Block out EOL releases from the sitemap.

also, lower value for lowest prio.

Change-Id: I1500ae1d602b9471cbacb62854f9c53f8378cb79
tags/1.6.0
Andreas Jaeger 2 years ago
parent
commit
fb838cf897
1 changed files with 15 additions and 22 deletions
  1. 15
    22
      sitemap/generator/spiders/sitemap_file.py

+ 15
- 22
sitemap/generator/spiders/sitemap_file.py View File

@@ -33,22 +33,6 @@ class SitemapItem(item.Item):
33 33
 class SitemapSpider(spiders.CrawlSpider):
34 34
     name = 'sitemap'
35 35
 
36
-    EOL_SERIES = [
37
-        'austin',
38
-        'bexar',
39
-        'cactus',
40
-        'diablo',
41
-        'essex',
42
-        'folsom',
43
-        'grizzly',
44
-        'havana',
45
-        'icehouse',
46
-        'juno',
47
-        'kilo',
48
-        'liberty',
49
-        'mitaka'
50
-    ]
51
-    EOL_RELEASES_PAT = re.compile('^/(' + '|'.join(EOL_SERIES) + ')/')
52 36
     MAINT_SERIES = [
53 37
         'newton',
54 38
         'ocata',
@@ -70,6 +54,19 @@ class SitemapSpider(spiders.CrawlSpider):
70 54
                 deny=[
71 55
                     r'/trunk/',
72 56
                     r'/draft/',
57
+                    r'/austin/',
58
+                    r'/bexar/',
59
+                    r'/cactus/',
60
+                    r'/diablo/',
61
+                    r'/essex/',
62
+                    r'/folsom/',
63
+                    r'/grizzly/',
64
+                    r'/havana/',
65
+                    r'/icehouse/',
66
+                    r'/juno/',
67
+                    r'/kilo/',
68
+                    r'/liberty/',
69
+                    r'/mitaka/'
73 70
                 ]
74 71
             ),
75 72
             follow=True, callback='parse_item'
@@ -97,13 +94,9 @@ class SitemapSpider(spiders.CrawlSpider):
97 94
             item['priority'] = '1.0'
98 95
             item['changefreq'] = 'weekly'
99 96
         elif self.LATEST_PAT.match(path):
100
-            # daily changefrequency and high priority for current files
101
-            item['priority'] = '0.8'
97
+            # daily changefrequency and normal priority for current files
98
+            item['priority'] = '0.5'
102 99
             item['changefreq'] = 'daily'
103
-        elif self.EOL_RELEASES_PAT.match(path):
104
-            # yearly changefrequency and lowest priority for old stable files
105
-            item['priority'] = '0.1'
106
-            item['changefreq'] = 'yearly'
107 100
         else:
108 101
             # These are unversioned documents
109 102
             # daily changefrequency and highest priority for current files

Loading…
Cancel
Save