Skip to content

Commit

Permalink
Update sites #3
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdctop committed Aug 6, 2023
1 parent 9020aa0 commit 692ceef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ number_regexs =
update_check = 1

[priority]
website = javbus,airav,jav321,fanza,xcity,mgstage,fc2,avsox,dlsite,carib,madou,getchu,javdb,gcolle,javday,javmenu,pcolle,caribpr,msin
website = javbus,airav,fanza,xcity,mgstage,avsox,jav321,madou,javday,javmenu,javdb

[escape]
literals = \()/
Expand Down
15 changes: 7 additions & 8 deletions scrapinglib/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,22 @@ def insert(sources, source):
# move some web service to the beginning of the list
lo_file_number = file_number.lower()
if "carib" in sources and (re.search(r"^\d{6}-\d{3}", file_number)
):
sources = insert(sources, "carib")
elif "caribpr" in sources and (re.search(r"^\d{6}-\d{3}", file_number)
):
sources = insert(sources, "caribpr")
sources = insert(sources, "carib")
elif "item" in file_number or "GETCHU" in file_number.upper():
sources = ["getchu"]
elif "rj" in lo_file_number or "vj" in lo_file_number or re.search(r"[\u3040-\u309F\u30A0-\u30FF]+",
file_number):
elif "rj" in lo_file_number or "vj" in lo_file_number:
sources = ["dlsite"]
elif re.search(r"[\u3040-\u309F\u30A0-\u30FF]+", file_number):
sources = ["dlsite", "getchu"]
elif "pcolle" in sources and "pcolle" in lo_file_number:
sources = ["pcolle"]
elif "fc2" in lo_file_number:
sources = ["fc2", "msin"]
elif "mgstage" in sources and \
(re.search(r"\d+\D+", file_number) or "siro" in lo_file_number):
sources = insert(sources, "mgstage")
elif (re.search(r"\d+\D+", file_number) or "siro" in lo_file_number):
if "mgstage" in sources:
sources = insert(sources, "mgstage")
elif "gcolle" in sources and (re.search("\d{6}", file_number)):
sources = insert(sources, "gcolle")
elif re.search(r"^\d{5,}", file_number) or "heyzo" in lo_file_number:
Expand Down

0 comments on commit 692ceef

Please sign in to comment.