From 440ab1ab06feb11e464a81dffd4aa13605fb5f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=9B=E9=A3=8E?= Date: Mon, 17 May 2021 16:39:08 +0800 Subject: [PATCH] up to date --- Pixiv.py | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/Pixiv.py b/Pixiv.py index 032b7d0..dba0a5d 100644 --- a/Pixiv.py +++ b/Pixiv.py @@ -6,8 +6,16 @@ P站小爬虫 爬每日排行榜 """ +""" + + 载 入 区 域 +-------------------------------------------------------------- + +""" + import re import os +from cmd import Cmd try: import requests @@ -23,7 +31,15 @@ requests.packages.urllib3.disable_warnings() error_list = [] -class PixivSpider(object): +""" + + V 1 . 0 祖 传 代 码 区 域 +--------------------------------------------------------------------- + +""" + + +class PixivSpider(Cmd): def __init__(self): self.ajax_url = 'https://www.pixiv.net/ajax/illust/{}/pages' # id @@ -133,10 +149,47 @@ class PixivSpider(object): error_list.append(k) for k in error_list: pixiv.r.delete(k) + + +""" + + C M D 循 环 区 域 +--------------------------------------------------------------------------------- + +""" + + + def main(self): + self.cmdloop() + + def do_help(self): + pass + + def do_exit(self): + pass + + def do_rank(self): + pass + + def do_stars(self): + pass + + def do_like(self): + pass + + + +""" + + 启 动 区 域 +---------------------------------------------------------- + +""" + if __name__ == '__main__': pixiv = PixivSpider() - pixiv.pixiv_main() + pixiv.main() # for id_url in pixiv.get_list(): # pixiv.get_img(id_url)