Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch job strange behaviour. #777

Closed
pxssy opened this issue Aug 26, 2020 · 1 comment
Closed

Batch job strange behaviour. #777

pxssy opened this issue Aug 26, 2020 · 1 comment
Labels
More Info Req Need more information

Comments

@pxssy
Copy link

pxssy commented Aug 26, 2020

The issue is with wildcard and title_caption options. This is what i've observed pixiv does when i experiment with the options with downloading a particular tag:-

wildcard: T, and title_caption: T, i get 85 works.

I know there is more than 85 works if i enable wildcard on the site, so there's something wrong with enabling both.

wildcard: T, and title_caption: F, i get 578 works.

As expected, when i disable title_caption, it goes back to wildcard only and gives me the same result i see on the site.

The site doesn't let you enable search of both wildcard and title_caption, so i think this is why its giving me only 85 results with both on, it ignores the wildcard option.

Now here is where it gets strange.

Using My batch_job.json

{
"jobs": {
"job1": {
"enabled": true,
"job_type": "3",
"tags": "アークナイツ",
"start_page": 1,
"end_page": 0,
"wildcard": true,
"title_caption": false,
"start_date": "",
"end_date": "",
"bookmark_count": 10000,
"oldest_first": false,
"type_mode": "a",
"option": {
"filenameFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"filenameMangaFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"filenameInfoFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"filenameMangaInfoFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"avatarNameFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"useTagsAsDir": false,
"rootDirectory": "./10000/"
}
},
"job2": {
"enabled": true,
"job_type": "3",
"tags": "アークナイツ",
"start_page": 1,
"end_page": 0,
"wildcard": false,
"title_caption": true,
"start_date": "",
"end_date": "",
"bookmark_count": 10000,
"oldest_first": false,
"type_mode": "a",
"option": {
"filenameFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"filenameMangaFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"filenameInfoFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"filenameMangaInfoFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"avatarNameFormat": "%R-18%/%artist% (%member_id%)/%urlFilename% - %title%",
"useTagsAsDir": false,
"rootDirectory": "./10000/"
}
}
}
}

Best of both worlds right? I get both in 1 job. Wrong.

That batch_job.json gives me 85 for the first time it runs (i'm assuming its doing job1 first then job2), very strange. Job1 should give me 578 instead of 85. Either its doing job2 first for some reason, (i added a job3 with a different bookmark requirement and it still downloaded either job1/2 first) or there's some weird thing happening with stacking jobs like that,

Using the most recent pixiv. with premium account.

@Nandaka
Copy link
Owner

Nandaka commented Aug 26, 2020

I'm don't have premium, but I remember that I cannot search based on title_caption with wildcard. Can you provide the correct ajax call?

references:
&s_mode=s_tc => title&caption
&s_mode=s_tag_full => search full tag
&s_mode=s_tc => partial tag/wildcard, not sure why it missing

PixivUtil2/PixivHelper.py

Lines 725 to 735 in 5a8e489

root_url = 'https://www.pixiv.net/ajax/search/artworks'
search_mode = ""
if title_caption:
search_mode = '&s_mode=s_tc'
print_and_log(None, "Using Title Match (s_tc)")
elif wild_card:
# partial match
print_and_log(None, "Using Partial Match (s_tag)")
else:
search_mode = '&s_mode=s_tag_full'
print_and_log(None, "Using Full Match (s_tag_full)")

@Nandaka Nandaka added the More Info Req Need more information label Aug 27, 2020
@pxssy pxssy closed this as completed Oct 2, 2020
35122 pushed a commit to 35122/PixivUtil2 that referenced this issue Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
More Info Req Need more information
Projects
None yet
Development

No branches or pull requests

2 participants