Add support for scraping from --list ID

This commit is contained in:
occasionallydavid
2025-04-11 02:40:36 +01:00
parent c7715ae291
commit 6db32bbd20
3 changed files with 34 additions and 0 deletions

View File

@@ -93,6 +93,14 @@ def main():
help="Set no limit to the number of tweets to scrape (will scrap until no more tweets are available).",
)
parser.add_argument(
"-l",
"--list",
type=str,
default=None,
help="List ID. Scrape tweets from a list.",
)
parser.add_argument(
"-q",
"--query",
@@ -145,6 +153,8 @@ def main():
tweet_type_args.append(args.username)
if args.hashtag is not None:
tweet_type_args.append(args.hashtag)
if args.list is not None:
tweet_type_args.append(args.list)
if args.query is not None:
tweet_type_args.append(args.query)
if args.bookmarks is not False:
@@ -175,6 +185,7 @@ def main():
scrape_hashtag=args.hashtag,
scrape_bookmarks=args.bookmarks,
scrape_query=args.query,
scrape_list=args.list,
scrape_latest=args.latest,
scrape_top=args.top,
scrape_poster_details="pd" in additional_data,