Skip to content

Commit b7538b2

Browse files
authored
To be consistent with PixivBatchHandler. Fix #844 (#845)
* To be consistent with PixivBatchHandler. Fix #844 * Rename type_data to type_mode
1 parent 3f7f3cc commit b7538b2

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

PixivBrowserFactory.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ def getSearchTagPage(self,
745745
member_id=None,
746746
sort_order='date_d',
747747
start_page=1,
748-
include_bookmark_data=False,
748+
use_bookmark_data=False,
749749
bookmark_count=0,
750750
type_mode="a",
751751
r18mode=False) -> Tuple[PixivTags, str]:
@@ -795,7 +795,7 @@ def getSearchTagPage(self,
795795
result.parseTags(response_page, tags, current_page)
796796

797797
# parse additional information
798-
if include_bookmark_data:
798+
if use_bookmark_data:
799799
idx = 0
800800
print("Retrieving bookmark information...", end=' ')
801801
for image in result.itemList:

PixivHelper.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ def generate_search_tag_url(tags,
775775
member_id=None,
776776
r18mode=False,
777777
blt=0,
778-
type_data="a"):
778+
type_mode="a"):
779779
url = ""
780780
date_param = ""
781781
page_param = ""
@@ -807,13 +807,13 @@ def generate_search_tag_url(tags,
807807
if blt is not None and blt > 0:
808808
bookmark_limit_premium = f'&blt={blt}'
809809

810-
if type_data == "i":
811-
type_data = "illust_and_ugoira"
812-
elif type_data == "m":
813-
type_data = "manga"
810+
if type_mode == "i":
811+
type_mode = "illust_and_ugoira"
812+
elif type_mode == "m":
813+
type_mode = "manga"
814814
else:
815-
type_data = "all"
816-
type_mode = f"&type={type_data}"
815+
type_mode = "all"
816+
type_mode = f"&type={type_mode}"
817817

818818
# https://www.pixiv.net/ajax/search/artworks/k-on?word=k-on&order=date_d&mode=all&p=1&s_mode=s_tag_full&type=all&lang=en
819819
url = f"{root_url}/{tags}?word={tags}{date_param}{page_param}{search_mode}{bookmark_limit_premium}{type_mode}"

0 commit comments

Comments
 (0)