Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions booth_checker/booth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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]
return [author_image_url, author_name]
31 changes: 17 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: