File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 128128 "subdirs" : [
129129 ""
130130 ],
131- "page_pattern" : "/html/body//a[regex:test(@href, '^[5-9][0-9][0-9]')]/@href"
131+ "page_pattern" : "/html/body//a[regex:test(@href, '^[5-9][0-9][0-9]|current ')]/@href"
132132 },
133133
134134 {
137137 "subdirs" : [
138138 ""
139139 ],
140- "page_pattern" : "/html/body//a[regex:test(@href, '^[5-9][0-9][0-9]')]/@href"
140+ "page_pattern" : "/html/body//a[regex:test(@href, '^[5-9][0-9][0-9]|current ')]/@href"
141141 },
142142
143143 {
146146 "subdirs" : [
147147 ""
148148 ],
149- "page_pattern" : "/html/body//a[regex:test(@href, '^[4-9][0-9][0-9]')]/@href"
149+ "page_pattern" : "/html/body//a[regex:test(@href, '^[4-9][0-9][0-9]|current ')]/@href"
150150 }
151151 ]
152152}
157157# links will be found automagically without needing to write any single line of
158158# code.
159159#
160- packages = {}
160+ urls = set ()
161161
162162if len (sys .argv ) < 2 or not sys .argv [1 ] in repos :
163163 sys .stderr .write ("Usage: " + sys .argv [0 ] + " <distro>\n " )
184184 rpms = html .fromstring (page ).xpath (repo ["page_pattern" ], namespaces = {"regex" : "http://exslt.org/regular-expressions" })
185185
186186 for rpm in rpms :
187- if not rpm in packages :
188- packages [rpm ] = source + rpm
187+ urls .add (source + rpm )
189188 except :
190189 continue
191190
192191#
193192# Print URLs to stdout
194193#
195- for rpm , url in packages . iteritems () :
194+ for url in urls :
196195 print (url )
You can’t perform that action at this time.
0 commit comments