Skip to content

Commit b652375

Browse files
committed
fix capital letters bug again
1 parent f992384 commit b652375

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

database/scrape_trle_download.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,8 @@ def _get_trle_btb_download_info(trle_btb_url, lid):
192192
parted = trle_btb_url.split("BtB")
193193
btb_soup = None
194194
for case in ["web", "Web"]:
195-
btb_soup = scrape_common.get_soup(parted[0] + "BtB" + f"/{case}/downloads.html")
196-
if btb_soup:
197-
break # Stop when a valid response is found
195+
if parted[1] == f"/{case}/index.html" and len(parted) > 1:
196+
btb_soup = scrape_common.get_soup(parted[0] + "BtB" + f"/{case}/downloads.html")
198197

199198
if not btb_soup:
200199
print("Fucked up")

0 commit comments

Comments
 (0)