zhuzemin / pixiv_sort_by_popularity

pixiv_sort_by_popularity.user.js
12 stars 1 forks source link

Popularity ranking of pixiv app #2

Open ouka312 opened 4 years ago

ouka312 commented 4 years ago

Would you share the Authorization in the pixiv app so that it can view the sort by popular in the app?

zhuzemin commented 4 years ago

Would you share the Authorization in the pixiv app so that it can view the sort by popular in the app?

That is a interesting request, I have do some research about it in past 2 day, thankful already had people cracked encrypt algorithm, so make it work in app not so difficult~ , , I only tested use "mitmproxy", if you using "QuantumultX" or other mitm app, you may need write rule by yourself (I have not bought these app)

rule should do a "redirect":

//this is request url when press button "Oldest" in pixiv app: 'https://app-api.pixiv.net/v1/search/illust?search_target=partial_match_for_tags&sort=date_asc&word=([^=&]*)&filter=for_ios'

//then your rule should redirect to: 'https://proud-surf-e590.zhuzemin.workers.dev/ajax/https://app-api.pixiv.net/v1/search/illust?search_target=partial_match_for_tags&sort=date_asc&word=([^=&]*)&filter=for_ios'

then result sort by popularity will show in pixiv app.

ouka312 commented 4 years ago

Would you share the Authorization in the pixiv app so that it can view the sort by popular in the app?

That is a interesting request, I have do some research about it in past 2 day, thankful already had people cracked encrypt algorithm, so make it work in app not so difficult~ , , I only tested use "mitmproxy", if you using "QuantumultX" or other mitm app, you may need write rule by yourself (I have not bought these app)

rule should do a "redirect":

//this is request url when press button "Oldest" in pixiv app: 'https://app-api.pixiv.net/v1/search/illust?search_target=partial_match_for_tags&sort=date_asc&word=([^=&]*)&filter=for_ios'

//then your rule should redirect to: 'https://proud-surf-e590.zhuzemin.workers.dev/ajax/https://app-api.pixiv.net/v1/search/illust?search_target=partial_match_for_tags&sort=date_asc&word=([^=&]*)&filter=for_ios'

then result sort by popularity will show in pixiv app.

That is great! But the data interface for the actual popular ranking request after I use surge to disguise the premium account in the pixiv app is:

//this is request url when press button "popularity" in pixiv app: https://app-api.pixiv.net/v1/search/illust?merge_plain_keyword_results=true&search_target=partial_match_for_tags&word=([^=&]*)&filter=for_ios&include_translated_tag_results=true&sort=popular_desc

The male ranking interface is:

//this is request url when press button "popularity(male)" in pixiv app: https://app-api.pixiv.net/v1/search/illust?merge_plain_keyword_results=true&sort=popular_male_desc&search_target=partial_match_for_tags&word=([^=&]*)&filter=for_ios&include_translated_tag_results=true

The female ranking interface is:

//this is request url when press button "popularity(female)" in pixiv app: https://app-api.pixiv.net/v1/search/illust?search_target=partial_match_for_tags&include_translated_tag_results=true&merge_plain_keyword_results=true&word=([^=&]*)&sort=popular_female_desc&filter=for_ios

Will you modify these interfaces?

zhuzemin commented 4 years ago

That's great! But the data interface for the actual popular ranking request after I use surge to disguise the premium account in the pixiv app is:

//this is request url when press button "popularity" in pixiv app: https://app-api.pixiv.net/v1/search/illust?merge_plain_keyword_results=true&search_target=partial_match_for_tags&word=([^=&]*)&filter=for_ios&include_translated_tag_results=true&sort=popular_desc

The male ranking interface is:

//this is request url when press button "popularity(male)" in pixiv app: https://app-api.pixiv.net/v1/search/illust?merge_plain_keyword_results=true&sort=popular_male_desc&search_target=partial_match_for_tags&word=([^=&]*)&filter=for_ios&include_translated_tag_results=true

The female ranking interface is:

//this is request url when press button "popularity(female)" in pixiv app: https://app-api.pixiv.net/v1/search/illust?search_target=partial_match_for_tags&include_translated_tag_results=true&merge_plain_keyword_results=true&word=([^=&]*)&sort=popular_female_desc&filter=for_ios

Will you modify these interfaces?

I don't think handle actual popular request was necessary, because as a non premium account, button 'Sort by popularity' will not be function like premium account, that's why I choice 'override' button 'Oldest'. and another reason because: lot third party app/script using pixiv app api, they may use my authorization, that will not be my wish for, I make this script just want lot people download, then maybe some of they admire my work, willing write feedback to me, or discuss programming with me.

ouka312 commented 4 years ago

That's great! But the data interface for the actual popular ranking request after I use surge to disguise the premium account in the pixiv app is: //this is request url when press button "popularity" in pixiv app: https://app-api.pixiv.net/v1/search/illust?merge_plain_keyword_results=true&search_target=partial_match_for_tags&word=([^=&]*)&filter=for_ios&include_translated_tag_results=true&sort=popular_desc The male ranking interface is: //this is request url when press button "popularity(male)" in pixiv app: https://app-api.pixiv.net/v1/search/illust?merge_plain_keyword_results=true&sort=popular_male_desc&search_target=partial_match_for_tags&word=([^=&]*)&filter=for_ios&include_translated_tag_results=true The female ranking interface is: //this is request url when press button "popularity(female)" in pixiv app: https://app-api.pixiv.net/v1/search/illust?search_target=partial_match_for_tags&include_translated_tag_results=true&merge_plain_keyword_results=true&word=([^=&]*)&sort=popular_female_desc&filter=for_ios Will you modify these interfaces?

I don't think handle actual popular request was necessary, because as a non premium account, button 'Sort by popularity' will not be function like premium account, that's why I choice 'override' button 'Oldest'. and another reason because: lot third party app/script using pixiv app api, they may use my authorization, that will not be my wish for, I make this script just want lot people download, then maybe some of they admire my work, willing write feedback to me, or discuss programming with me.

Oh, i got it. And thank you very much!

Now I modified the response body of pixiv so that the app mistakenly thought that I logged in to a premium account to activate the popularity button. I redirected the popularity buttons to your interface and it works fine now.

Thank you very much!!!

ouka312 commented 3 years ago

That's great! But the data interface for the actual popular ranking request after I use surge to disguise the premium account in the pixiv app is: //this is request url when press button "popularity" in pixiv app: https://app-api.pixiv.net/v1/search/illust?merge_plain_keyword_results=true&search_target=partial_match_for_tags&word=([^=&]*)&filter=for_ios&include_translated_tag_results=true&sort=popular_desc The male ranking interface is: //this is request url when press button "popularity(male)" in pixiv app: https://app-api.pixiv.net/v1/search/illust?merge_plain_keyword_results=true&sort=popular_male_desc&search_target=partial_match_for_tags&word=([^=&]*)&filter=for_ios&include_translated_tag_results=true The female ranking interface is: //this is request url when press button "popularity(female)" in pixiv app: https://app-api.pixiv.net/v1/search/illust?search_target=partial_match_for_tags&include_translated_tag_results=true&merge_plain_keyword_results=true&word=([^=&]*)&sort=popular_female_desc&filter=for_ios Will you modify these interfaces?

I don't think handle actual popular request was necessary, because as a non premium account, button 'Sort by popularity' will not be function like premium account, that's why I choice 'override' button 'Oldest'. and another reason because: lot third party app/script using pixiv app api, they may use my authorization, that will not be my wish for, I make this script just want lot people download, then maybe some of they admire my work, willing write feedback to me, or discuss programming with me.

Now it produces an error: "Unexpected token e in JSON at position 0"