Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 06ffb37d07 | |||
| f360deb1a0 | |||
| 03857c0236 | |||
| 3864c9013c |
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ class SummaryPageEntryTemplate():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
self.template = next( mwparser.parse(
|
self.template = next( mwparser.parse(
|
||||||
"{{/Eintrag|Liste=|Liste_Revision=|Interpret=|Titel=NN\
|
"{{Portal:Charts und Popmusik/Aktuelle Nummer-eins-Hits/Eintrag|Liste=|Liste_Revision=|Interpret=|Titel=NN\
|
||||||
|Chartein=|Korrektur=|Hervor=}}" ).ifilter_templates() )
|
|Chartein=|Korrektur=|Hervor=}}" ).ifilter_templates() )
|
||||||
|
|
||||||
def __getattr__( self, name ):
|
def __getattr__( self, name ):
|
||||||
|
|||||||
Reference in New Issue
Block a user