feat: add gaode crawler and export domain exclusion
This commit is contained in:
@@ -49,6 +49,11 @@ def parse_args() -> argparse.Namespace:
|
||||
default="",
|
||||
help="按 domain 过滤,例如:大律师 / 找法网 / 华律",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--exclude-domain",
|
||||
default="",
|
||||
help="排除指定 domain,例如:高德地图",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--province",
|
||||
default="",
|
||||
@@ -134,6 +139,9 @@ def build_query(args: argparse.Namespace) -> (str, List):
|
||||
if args.domain.strip() and not args.douyin_only:
|
||||
where.append("domain = %s")
|
||||
params.append(args.domain.strip())
|
||||
if args.exclude_domain.strip():
|
||||
where.append("domain <> %s")
|
||||
params.append(args.exclude_domain.strip())
|
||||
if args.province.strip():
|
||||
where.append("province = %s")
|
||||
params.append(args.province.strip())
|
||||
|
||||
Reference in New Issue
Block a user