Merge pull request #806 from Gluejar/fix-springer

new markup for title
pull/95/head
eshellman 2018-08-08 23:34:11 -04:00 committed by GitHub
commit 0f1889306d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -72,10 +72,14 @@ class SpringerScraper(BaseScraper):
value = ''
if el:
value = el.text.strip()
if value:
value = value.replace('\n', ': ', 1)
self.set('title', value)
if not value:
else:
el = self.doc.select_one('.page-title')
if el:
value = el.text.strip()
if value:
value = value.replace('\n', ': ', 1)
self.set('title', value)
else:
super(SpringerScraper, self).get_title()
def get_role(self):