diff --git a/booth_checker/booth.py b/booth_checker/booth.py index b8502b1..3ee1d2e 100644 --- a/booth_checker/booth.py +++ b/booth_checker/booth.py @@ -9,7 +9,7 @@ def _extract_download_info(div, link_selector, filename_selector): if not download_link or not filename_div: return None - href = download_link.get("href") + href = download_link.get("data-href") filename = filename_div.get_text() if not href: @@ -72,8 +72,8 @@ def crawling(order_num, product_only, cookie, shortlist=None, thumblist=None): 'product_info_selector': 'a', 'product_info_index': 1, 'thumb_selector': 'img', - 'download_item_selector': 'div.legacy-list-item__center', - 'download_link_selector': 'a.nav-reverse', + 'download_item_selector': 'div.legacy-list-item__center, div[data-test="downloadable"]', + 'download_link_selector': 'a.nav-reverse, div.js-download-button', 'filename_selector': 'div.flex-\\[1\\] b' } return _crawling_base(url, cookie, selectors, shortlist, thumblist, product_only_filter=product_only) @@ -85,8 +85,8 @@ def crawling_gift(order_num, cookie, shortlist=None, thumblist=None): 'product_div_class': 'rounded-16 bg-white p-40 mobile:px-16 mobile:pt-24 mobile:pb-40 mobile:rounded-none', 'product_info_selector': 'div.mt-24.text-left a', 'thumb_selector': 'img', - 'download_item_selector': 'div.w-full.text-left', - 'download_link_selector': 'a.no-underline.flex.items-center.flex.gap-4', + 'download_item_selector': 'div.w-full.text-left, div[data-test="downloadable"]', + 'download_link_selector': 'a.no-underline.flex.items-center.flex.gap-4, div.js-download-button', 'filename_selector': "div[class='min-w-0 break-words whitespace-pre-line']" } return _crawling_base(url, cookie, selectors, shortlist, thumblist) @@ -112,4 +112,4 @@ def crawling_product(url): author_image_url = author_image.get("src") author_name = author_image.get("alt") - return [author_image_url, author_name] \ No newline at end of file + return [author_image_url, author_name] diff --git a/docker-compose.yml b/docker-compose.yml index 8daec39..780972d 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,27 +31,30 @@ services: max-file: "3" postgres: - image: postgres:18.0 + image: postgres:18.1 restart: unless-stopped environment: POSTGRES_DB: booth POSTGRES_USER: booth_user POSTGRES_PASSWORD: booth_password ports: - 5433:5432 + - "5433:5432" volumes: - postgres-data:/var/lib/postgresql + - postgres-data:/var/lib/postgresql logging: - driver: json-file - options: - max-size: 10m - max-file: "3" + driver: "json-file" + options: + max-size: "10m" + max-file: "3" chrome: - image: selenium/standalone-chrome:latest - restart: unless-stopped - logging: - driver: "json-file" - options: - max-size: "10m" - max-file: "3" + image: selenium/standalone-chrome:latest + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + +volumes: + postgres-data: