Closed Anthorty closed 4 years ago
Okay, I’ll look into this later. On Feb 26, 2020, 12:42 +0800, Alex notifications@github.com, wrote:
Hi ! I tried this program,it work correctly,but I just want to download ranking list illustration,because manga is too many. So how I change to achieve it? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
change this line to
download_illustrations(user, data_list, save_path, add_rank=True, skip_manga=True)
should work
https://github.com/bebound/pixiv/blob/a08f8502873d5fc456111f3f3436f3273d846e9a/pixiv.py#L241
skip_manga=True
Hi,I tried this argument,there is no error,but it is still not working.
download_illustrations(user, data_list, save_path, add_rank=True, skip_manga=True)
I made a mistake in my previous commit, I fix it now. If you use it correctly, it should raise an error...
I made a mistake in my previous commit, I fix it now. If you use it correctly, it should raise an error...
I updated pixiv.py
,but still not working.I checked model.py
and pixiv.py
and found
if skip_manga:
illustrations = list(filter(lambda x: not x.is_manga, illustrations))
this sentence can't filter correctly,so what I suppose to do?
I got it. I use download user to test skip_manga
function and it works. But in ranking list, the is_manga
field is always None
.
The filter should work for ranking list now.
data in ranking list
{'rank': 6, 'previous_rank': 15, 'work': {'id': 79842982, 'title': '喫茶店にいるカップルの話。', 'caption': None, 'tags': ['漫画', '創作', 'オリジナル', '創作男女', 'イケメンがついたおっぱい', 'リブ生地'], 'tools': None, 'image_urls': {'px_128x128': 'https://i.pximg.net/c/128x128/img-master/img/2020/03/02/12/10/09/79842982_p0_square1200.jpg', 'px_480mw': 'https://i.pximg.net/c/480x960/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'small': 'https://i.pximg.net/c/150x150/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'medium': 'https://i.pximg.net/c/600x600/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'large': 'https://i.pximg.net/img-original/img/2020/03/02/12/10/09/79842982_p0.jpg'}, 'width': 914, 'height': 1280, 'stats': {'scored_count': 1531, 'score': 15310, 'views_count': 73386, 'favorited_count': {'public': None, 'private': None}, 'commented_count': None}, 'publicity': 0, 'age_limit': 'all-age', 'created_time': '2020-03-02 12:10:00', 'reuploaded_time': '2020-03-02 12:10:09', 'user': {'id': 25533, 'account': '51039ra3', 'name': 'さいそう。@斎創', 'is_following': None, 'is_follower': None, 'is_friend': None, 'is_premium': None, 'profile_image_urls': {'px_170x170': 'https://i.pximg.net/user-profile/img/2017/11/17/16/09/25/13465685_435dafc32e7ab05312ba02525cfde81b_170.jpg', 'px_50x50': 'https://i.pximg.net/user-profile/img/2017/11/17/16/09/25/13465685_435dafc32e7ab05312ba02525cfde81b_50.jpg'}, 'stats': None, 'profile': None}, 'is_manga': None, 'is_liked': None, 'favorite_id': None, 'page_count': 4, 'book_style': 'none', 'type': 'manga', 'metadata': None, 'content_type': None, 'sanity_level': 'white'}},
data in download by user
{'id': 79842982, 'title': '喫茶店にいるカップルの話。', 'caption': '【https://www.pixiv.net/artworks/78004065】のキャラの、付き合って大学生の番外編です。\r\n高校生時代の話は単行本になります!→https://www.amazon.co.jp/dp/4065189004/ref=cm_sw_r_tw_dp_U_x_wJ6uEb6PPFZG9\r\n\r\nピクシブコミックスさんにも1話乗せて頂いてます。\r\n(冒頭数話分は更新される予定です。)\r\n https://comic.pixiv.net/works/6413', 'tags': ['漫画', '創作', 'オリジナル', '創作男女', 'イケメンがついたおっぱい', 'リブ生地'], 'tools': ['Photoshop'], 'image_urls': {'px_128x128': 'https://i.pximg.net/c/128x128/img-master/img/2020/03/02/12/10/09/79842982_p0_square1200.jpg', 'px_480mw': 'https://i.pximg.net/c/480x960/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'small': 'https://i.pximg.net/c/150x150/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'medium': 'https://i.pximg.net/c/600x600/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'large': 'https://i.pximg.net/img-original/img/2020/03/02/12/10/09/79842982_p0.jpg'}, 'width': 914, 'height': 1280, 'stats': {'scored_count': 5434, 'score': 54340, 'views_count': 89839, 'favorited_count': {'public': 5060, 'private': 74}, 'commented_count': 32}, 'publicity': 0, 'age_limit': 'all-age', 'created_time': '2020-03-02 12:10:09', 'reuploaded_time': '2020-03-02 12:10:09', 'user': {'id': 25533, 'account': '51039ra3', 'name': 'さいそう。@斎創', 'is_following': False, 'is_follower': False, 'is_friend': False, 'is_premium': None, 'profile_image_urls': {'px_50x50': 'https://i.pximg.net/user-profile/img/2017/11/17/16/09/25/13465685_435dafc32e7ab05312ba02525cfde81b_50.jpg'}, 'stats': None, 'profile': None}, 'is_manga': True, 'is_liked': False, 'favorite_id': 0, 'page_count': 4, 'book_style': 'none', 'type': 'manga', 'metadata': None, 'content_type': None, 'sanity_level': 'white'}
I got it. I use download user to test
skip_manga
function and it works. But in ranking list, theis_manga
field is alwaysNone
.The filter should work for ranking list now.
data in ranking list
{'rank': 6, 'previous_rank': 15, 'work': {'id': 79842982, 'title': '喫茶店にいるカップルの話。', 'caption': None, 'tags': ['漫画', '創作', 'オリジナル', '創作男女', 'イケメンがついたおっぱい', 'リブ生地'], 'tools': None, 'image_urls': {'px_128x128': 'https://i.pximg.net/c/128x128/img-master/img/2020/03/02/12/10/09/79842982_p0_square1200.jpg', 'px_480mw': 'https://i.pximg.net/c/480x960/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'small': 'https://i.pximg.net/c/150x150/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'medium': 'https://i.pximg.net/c/600x600/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'large': 'https://i.pximg.net/img-original/img/2020/03/02/12/10/09/79842982_p0.jpg'}, 'width': 914, 'height': 1280, 'stats': {'scored_count': 1531, 'score': 15310, 'views_count': 73386, 'favorited_count': {'public': None, 'private': None}, 'commented_count': None}, 'publicity': 0, 'age_limit': 'all-age', 'created_time': '2020-03-02 12:10:00', 'reuploaded_time': '2020-03-02 12:10:09', 'user': {'id': 25533, 'account': '51039ra3', 'name': 'さいそう。@斎創', 'is_following': None, 'is_follower': None, 'is_friend': None, 'is_premium': None, 'profile_image_urls': {'px_170x170': 'https://i.pximg.net/user-profile/img/2017/11/17/16/09/25/13465685_435dafc32e7ab05312ba02525cfde81b_170.jpg', 'px_50x50': 'https://i.pximg.net/user-profile/img/2017/11/17/16/09/25/13465685_435dafc32e7ab05312ba02525cfde81b_50.jpg'}, 'stats': None, 'profile': None}, 'is_manga': None, 'is_liked': None, 'favorite_id': None, 'page_count': 4, 'book_style': 'none', 'type': 'manga', 'metadata': None, 'content_type': None, 'sanity_level': 'white'}},
data in download by user
{'id': 79842982, 'title': '喫茶店にいるカップルの話。', 'caption': '【https://www.pixiv.net/artworks/78004065】のキャラの、付き合って大学生の番外編です。\r\n高校生時代の話は単行本になります!→https://www.amazon.co.jp/dp/4065189004/ref=cm_sw_r_tw_dp_U_x_wJ6uEb6PPFZG9\r\n\r\nピクシブコミックスさんにも1話乗せて頂いてます。\r\n(冒頭数話分は更新される予定です。)\r\n https://comic.pixiv.net/works/6413', 'tags': ['漫画', '創作', 'オリジナル', '創作男女', 'イケメンがついたおっぱい', 'リブ生地'], 'tools': ['Photoshop'], 'image_urls': {'px_128x128': 'https://i.pximg.net/c/128x128/img-master/img/2020/03/02/12/10/09/79842982_p0_square1200.jpg', 'px_480mw': 'https://i.pximg.net/c/480x960/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'small': 'https://i.pximg.net/c/150x150/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'medium': 'https://i.pximg.net/c/600x600/img-master/img/2020/03/02/12/10/09/79842982_p0_master1200.jpg', 'large': 'https://i.pximg.net/img-original/img/2020/03/02/12/10/09/79842982_p0.jpg'}, 'width': 914, 'height': 1280, 'stats': {'scored_count': 5434, 'score': 54340, 'views_count': 89839, 'favorited_count': {'public': 5060, 'private': 74}, 'commented_count': 32}, 'publicity': 0, 'age_limit': 'all-age', 'created_time': '2020-03-02 12:10:09', 'reuploaded_time': '2020-03-02 12:10:09', 'user': {'id': 25533, 'account': '51039ra3', 'name': 'さいそう。@斎創', 'is_following': False, 'is_follower': False, 'is_friend': False, 'is_premium': None, 'profile_image_urls': {'px_50x50': 'https://i.pximg.net/user-profile/img/2017/11/17/16/09/25/13465685_435dafc32e7ab05312ba02525cfde81b_50.jpg'}, 'stats': None, 'profile': None}, 'is_manga': True, 'is_liked': False, 'favorite_id': 0, 'page_count': 4, 'book_style': 'none', 'type': 'manga', 'metadata': None, 'content_type': None, 'sanity_level': 'white'}
Hi, I just want download illustration,so I checked pixiv website and found param page_count
.It's record how many illustration included.I added a filter to filtrate page_count !=1
.Now the program is work properly.
Thank you provide this program.
Hi ! I tried this program,it work correctly,but I just want to download ranking list illustration,because manga is too many. So how I change to achieve it?