Merge branch 'countrylist-module'
This commit is contained in:
@@ -157,9 +157,17 @@ class CountryList():
|
|||||||
else:
|
else:
|
||||||
singles_section = self.wikicode.get_sections( matches="Singles" )[0]
|
singles_section = self.wikicode.get_sections( matches="Singles" )[0]
|
||||||
|
|
||||||
|
# Since we have multiple categories in some countrys we need
|
||||||
|
# to select the first wrapping template
|
||||||
|
try:
|
||||||
|
wrapping_template = next( singles_section.ifilter_templates(
|
||||||
|
matches="Nummer-eins-Hits" ) )
|
||||||
|
except StopIteration:
|
||||||
|
raise CountryListError( "Wrapping template is missing!")
|
||||||
|
|
||||||
# Select the last occurence of template "Nummer-eins-Hits Zeile" in
|
# Select the last occurence of template "Nummer-eins-Hits Zeile" in
|
||||||
# "Singles"-section
|
# Wrapper-template
|
||||||
for self.entry in singles_section.ifilter_templates(
|
for self.entry in wrapping_template.get("Inhalt").value.ifilter_templates(
|
||||||
matches="Nummer-eins-Hits Zeile" ):
|
matches="Nummer-eins-Hits Zeile" ):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user