File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ async def process_page_links(
8484class ImageScraper (BaseScraper [ImageResult ]):
8585 """Strategy for scraping album image pages."""
8686
87- XPATH_ALBUM = '//div[@class= "album-photo my-2" ]/img/@data-src'
88- XPATH_ALTS = '//div[@class= "album-photo my-2" ]/img/@alt'
87+ XPATH_ALBUM = '//div[contains( @class, "album-photo") ]/img/@data-src'
88+ XPATH_ALTS = '//div[contains( @class, "album-photo") ]/img/@alt'
8989 XPATH_VIP = ""
9090
9191 def __init__ (self , config : Config , album_tracker : AlbumTracker ) -> None :
@@ -209,11 +209,5 @@ async def process_page_links(
209209 )
210210
211211 def get_available_images (self , tree : html .HtmlElement ) -> list [bool ]:
212- album_photos = tree .xpath ("//div[@class='album-photo my-2']" )
213- image_status = [False ] * len (album_photos )
214-
215- for i , photo in enumerate (album_photos ):
216- if photo .xpath (".//img[@data-src]" ):
217- image_status [i ] = True
218-
219- return image_status
212+ album_photos = tree .xpath ('//div[contains(@class,"album-photo")][.//img[@data-src]]' )
213+ return [True ] * len (album_photos )
You can’t perform that action at this time.
0 commit comments