hopefully fixed letterboxed IDs

pull/351/head
meisnate12 3 years ago
parent f422f428e7
commit 88369c3802

@ -13,7 +13,7 @@ class Letterboxd:
def _parse_list(self, list_url, language): def _parse_list(self, list_url, language):
response = self.config.get_html(list_url, headers=util.header(language)) response = self.config.get_html(list_url, headers=util.header(language))
letterboxd_ids = response.xpath("//li[@class='poster-container']/div/@data-film-id") letterboxd_ids = response.xpath("//li[contains(@class, 'poster-container')]/div/@data-film-id")
items = [] items = []
for letterboxd_id in letterboxd_ids: for letterboxd_id in letterboxd_ids:
slugs = response.xpath(f"//div[@data-film-id='{letterboxd_id}']/@data-film-slug") slugs = response.xpath(f"//div[@data-film-id='{letterboxd_id}']/@data-film-slug")

Loading…
Cancel
Save