commit
8c6800e626
|
@ -22,7 +22,7 @@ class BaseScraper(object):
|
|||
designed to make at least a decent guess for webpages that embed metadata
|
||||
'''
|
||||
can_scrape_hosts = False
|
||||
can_scrape_strings = [''] #should always return true
|
||||
can_scrape_strings = False
|
||||
@classmethod
|
||||
def can_scrape(cls, url):
|
||||
''' return True if the class can scrape the URL '''
|
||||
|
|
|
@ -22,7 +22,7 @@ class UbiquityScraper(BaseScraper):
|
|||
|
||||
def get_language(self):
|
||||
langlabel = self.doc.find(string='Language')
|
||||
lang = langlabel.parent.parent.find_next_sibling()
|
||||
lang = langlabel.parent.parent.find_next_sibling() if langlabel else ''
|
||||
lang = lang.get_text() if lang else ''
|
||||
lang = get_language_code(lang) if lang else ''
|
||||
if lang:
|
||||
|
|
Loading…
Reference in New Issue