mirror of
https://github.com/obskyr/khinsider.git
synced 2025-08-28 23:40:50 +02:00
Adapted to new HTML for album images.
This commit is contained in:
@@ -319,9 +319,15 @@ class Soundtrack(object):
|
|||||||
|
|
||||||
@lazyProperty
|
@lazyProperty
|
||||||
def images(self):
|
def images(self):
|
||||||
anchors = [a for a in self._contentSoup('p')[1]('a') if a.find('img')]
|
table = self._contentSoup.find('table')
|
||||||
|
if not table:
|
||||||
|
# Currently, the table is always present, but if it's ever removed
|
||||||
|
# for imageless albums, it should be handled gracefully.
|
||||||
|
return []
|
||||||
|
anchors = [a for a in table('a') if a.find('img')]
|
||||||
urls = [a['href'] for a in anchors]
|
urls = [a['href'] for a in anchors]
|
||||||
images = [File(urljoin(self.url, url)) for url in urls]
|
images = [File(urljoin(self.url, url)) for url in urls]
|
||||||
|
print(images)
|
||||||
return images
|
return images
|
||||||
|
|
||||||
def download(self, path='', makeDirs=True, formatOrder=None, verbose=False):
|
def download(self, path='', makeDirs=True, formatOrder=None, verbose=False):
|
||||||
|
Reference in New Issue
Block a user