Bug: E621 site is being incorrectly reported by the API
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, go
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start by tracing how Monloader builds the e621 entry returned by GET /api/v1/sites, then inspect the e621 profile configuration that supplies its example URL and hosts. Check why the API reports e621.cc while the profile uses e621.net; done when the API reports the expected host and Monsender recognizes e621 as a booru without adding it as an extra host.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Setup:
- Web Browser: Brave v1.98.63
- Monloader: Docker, v1.14.0
- Monsender: Chrome Web Store version, v1.4.6
- gallery-dl: the version included in Monloader's Docker image (v1.32.19)
Steps to reproduce:
- In the web browser, open any post gallery page ("https://e621.net/posts[?tags=...]") or a single post page ("https://e621.net/posts/{id}")
- Open the Monsender extension popup
- The extension declares
not a known site - monloader will decide, as seen in this picture:
Expected:
Monsender should be able to recognize the site as a "booru".
Investigation and quick fix:
I first tried to fix the issue by adding "static1.e621.net" as an extra host in [Monloader Settings -> Sites -> e621 -> Edit -> General -> Extra hosts]. Nothing changed.
Then, seeing as Monsender asks Monloader via its API for the known list of sites, I decided to consult the API myself by doing a GET request to "http://localhost:8456/api/v1/sites" with a valid API token. The "e621" entry was reported as follows:
{'category': 'e621', 'subcategory': 'frontend', 'name': 'e621', 'example': 'https://e621.cc/?tags=TAG', 'hosts': ['static1.e621.net'], 'kind': 'booru', 'curated': True, 'configured': True, 'custom_profile': True, 'auth': 'api_optional'}
I noticed that the 'example' field had "e621.cc" as the host instead of "e621.net", even though the URLs in the Profile tab in the e621 Edit Settings page used the '.net' host. So I tried adding "e621.net" as another extra host, and then Monsender was finally able to recognize the site as a "booru".
I couldn't find why the base host is reported as 'e621.cc', however. gallery-dl's GitHub page says that it supports the "e621.net" site, not the "e621.cc" one.
Related issue:
As of the time of writing this issue report, right-clicking a post in a E621 post gallery page did not provide a "Send to monloader" context-menu option, to send an individual post's URL. I suspected it could be because of the way the post elements are structured at the HTML level.
So, as a temporary, quick-n-dirty solution that doesn't dwell into the Monsender code, I wrote a userscript that appends an HTML element to each post (labeled as "Send" in the screenshot below), to serve as a right-clickable target. Said element intentionally imitates the structure of a post element in a post gallery page at "rule34.xxx", seeing as the context-menu feature does work in said site.
While the "Send to monloader" context-menu option was available on this new element, Monsender was only sending the thumbnail image URL (as a directlink) instead of the actual post's URL, since Monloader wasn't properly indicating "e621.net" as a known site to Monsender.
Making Monloader recognize e621 as a known site by applying the fix described in the earlier section solved the sending issue over these newly-made elements; Monloader was receiving the actual post's URL and was then able to retrieve the full image and its tags.
- Ngôn ngữ chính
- Go
- Star
- 18
- Fork
- 6
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của monbooru/monloader
-
Pixiv source name mismatchĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Gelbooru: tag jobs fail with JSONDecodeError after 1,200 posts (API refuses offsets above 1,000)Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 72/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
Tất cả issue của monbooru/monloader
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
OneBusAway/watchdog#470 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: session
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
charmbracelet/crush#4484 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Resource]: HearthĐang mởresource-submission validation-passed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
hesreallyhim/awesome-claude-code#3713 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
expr-lang/expr#1037 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Provider Key: Sauberr/neckrezĐang mởprovider-key submission
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
opentofu/registry#6740 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày