From dea5623655f57d294566e78e5018253accaad90b Mon Sep 17 00:00:00 2001 From: "Resnick.Xing" Date: Sat, 1 May 2021 21:29:30 +0800 Subject: [PATCH] update --- .DS_Store | Bin 6148 -> 8196 bytes main.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.DS_Store b/.DS_Store index cee02900613bda5f3c1284bf49196ef544520cc5..5272429ab5d85307eed12177ed47412680d14e22 100644 GIT binary patch literal 8196 zcmeHMyKWOf6usj|ViO)N5Tt>u0(4OnM+pH5B;z#n=~U59;XKlV)*V^_t$r7L=6mq#iQ{ki ze2PD_r@x$6#`b^XQ|#N#4>{(*$EFHpyK;R3oXRPPm;z;3CYZZ=y2Gn=EhM{w-ithJLWKDeXnk ztNti2Gv5kOZoJCs;hCMy5y`6U?J(-~df6Bllt!sUCYV^@QKk)VcI+4sDu;u>n7Eo% z5s{-+v0nLFw7Rb_d;B-CUcTErcF(y~6<&V&vUXCc@SB*9Hh&u9QH;GnS`?;Bw1ice zpo_56&@a=a+7F;q)gpZT(;ccoC*CRv)f};Q9J<^6J@)0g;>QqGgTfBtdF(V5v66D$ zS$&_oqJkLTq;=pcUZj6Eu&x`?75p+if#-rI4+!Mh-99mSYyIY()eYGFd=wTrF4`yB@b|R;DV( zNlFKwC%hUNZ!~7-=BA8=XmiSFMCVS=PZ?)t=bO!N=;*2F`Q=-sjeCvF=KZIjgTmZj zBy>ogx9ewUDPpKg&3Eq6N3U01SUZXQhsf?tqb+91?kuDJ2zAl;(yw_U%KYoeidD2N zevx-G<_KMeRsp|cKF;_5OM~D453N3$xK>~o6kvfwG7$&ULC*!g*EVq6!ods2wWJjx qsKj<0R&2*%+kY6MZ2-z+Vy|Hbta;_GT?75D`;E5(lh delta 133 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50D9Qzr2a9Dgq%ssU=rLq56mKkC z&dkU)d6Qt`JFmC=TTEMuNor6P=8K?sY1h|2OE6Ajch2NPc^UHXG%w=GL O*a5PZVRJms9A*F;`WIjT diff --git a/main.py b/main.py index 5923267..f128836 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,7 @@ parser.add_argument("-as", "--accounts", default=None,help='A file with each line a user ID or link to their main page.') parser.add_argument("-a", "--account", default="POTUS",help='Ignored if "-as" provided. Single account that you want, default is "POTUS". DO NOT enter the @ mark.') parser.add_argument("-i", "--image", default=0, type=int,help='Whether to save images. 0 for no (default), non-zero int for yes.') -parser.add_argument("-m", "--mode", default="main",help='Choose mode: "main" (default) for whatever tweets on main page; "date" for a specified range') +parser.add_argument("-m", "--mode", default="main",help='Choose mode: "main" (default) for whatever tweets on main page; "media" for only images and videos on main page; "date" for a specified range') parser.add_argument("-p", "--pop", default=0, type=int,help='Whether to show pop-up browser window. 0 for no (default), non-zero int for yes.') parser.add_argument("-sd", "--savedir", default="./saver/",help='The directory for saving the outputs. Default to be ./saver/') parser.add_argument("-v", "--video", default=0, type=int,help='Whether to save videos. 0 for no (default), non-zero int for yes.') @@ -24,12 +24,12 @@ def scrap_base(account,continues=False,driver=None): ''' base function of scrap tweets. According to the parameter, choose the related solution. ''' - if args.mode == "main": + if args.mode != "date": driver=interface.scrap_main_page( account=account, save_dir=args.savedir, headless=False if args.pop else True, - page_info="main", + page_info=args.mode, login=True, resume=args.resume, save_image=args.image,