Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Resnick.Xing authored and Resnick.Xing committed May 1, 2021
1 parent 4f1aeeb commit dea5623
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand All @@ -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,
Expand Down

0 comments on commit dea5623

Please sign in to comment.