Skip to content

Commit ff8c92d

Browse files
committed
chore: add copyright to every file
1 parent 5288bdd commit ff8c92d

File tree

137 files changed

+2569
-810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+2569
-810
lines changed

.pre-commit-config.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Pre-commit hooks configuration for MediaCrawler project
2+
# See https://pre-commit.com for more information
3+
4+
repos:
5+
# Local hooks
6+
- repo: local
7+
hooks:
8+
# Python file header copyright check
9+
- id: check-file-headers
10+
name: Check Python file headers
11+
entry: python tools/file_header_manager.py --check
12+
language: system
13+
types: [python]
14+
pass_filenames: true
15+
stages: [pre-commit]
16+
17+
# Auto-fix Python file headers
18+
- id: add-file-headers
19+
name: Add copyright headers to Python files
20+
entry: python tools/file_header_manager.py
21+
language: system
22+
types: [python]
23+
pass_filenames: true
24+
stages: [pre-commit]
25+
26+
# Standard pre-commit hooks (optional, can be enabled later)
27+
- repo: https://github.com/pre-commit/pre-commit-hooks
28+
rev: v4.5.0
29+
hooks:
30+
- id: trailing-whitespace
31+
exclude: ^(.*\.md|.*\.txt)$
32+
- id: end-of-file-fixer
33+
exclude: ^(.*\.md|.*\.txt)$
34+
- id: check-yaml
35+
- id: check-added-large-files
36+
args: ['--maxkb=10240'] # 10MB limit
37+
- id: check-merge-conflict
38+
- id: check-case-conflict
39+
- id: mixed-line-ending
40+
41+
# Global configuration
42+
default_language_version:
43+
python: python3
44+
45+
# Run hooks on all files during manual run
46+
# Usage: pre-commit run --all-files

base/__init__.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
2-
# 1. 不得用于任何商业用途。
3-
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
4-
# 3. 不得进行大规模爬取或对平台造成运营干扰。
5-
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
6-
# 5. 不得用于任何非法或不当的用途。
7-
#
8-
# 详细许可条款请参阅项目根目录下的LICENSE文件。
9-
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
10-
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2025 [email protected]
3+
#
4+
# This file is part of MediaCrawler project.
5+
# Repository: https://github.com/NanmiCoder/MediaCrawler/blob/main/base/__init__.py
6+
# GitHub: https://github.com/NanmiCoder
7+
# Licensed under NON-COMMERCIAL LEARNING LICENSE 1.1
8+
#
119

10+
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
11+
# 1. 不得用于任何商业用途。
12+
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
13+
# 3. 不得进行大规模爬取或对平台造成运营干扰。
14+
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
15+
# 5. 不得用于任何非法或不当的用途。
16+
#
17+
# 详细许可条款请参阅项目根目录下的LICENSE文件。
18+
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。

base/base_crawler.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2025 [email protected]
3+
#
4+
# This file is part of MediaCrawler project.
5+
# Repository: https://github.com/NanmiCoder/MediaCrawler/blob/main/base/base_crawler.py
6+
# GitHub: https://github.com/NanmiCoder
7+
# Licensed under NON-COMMERCIAL LEARNING LICENSE 1.1
8+
#
9+
110
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
211
# 1. 不得用于任何商业用途。
312
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。

cache/__init__.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
2-
# 1. 不得用于任何商业用途。
3-
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
4-
# 3. 不得进行大规模爬取或对平台造成运营干扰。
5-
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
6-
# 5. 不得用于任何非法或不当的用途。
7-
#
8-
# 详细许可条款请参阅项目根目录下的LICENSE文件。
9-
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
10-
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2025 [email protected]
3+
#
4+
# This file is part of MediaCrawler project.
5+
# Repository: https://github.com/NanmiCoder/MediaCrawler/blob/main/cache/__init__.py
6+
# GitHub: https://github.com/NanmiCoder
7+
# Licensed under NON-COMMERCIAL LEARNING LICENSE 1.1
8+
#
119

10+
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
11+
# 1. 不得用于任何商业用途。
12+
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
13+
# 3. 不得进行大规模爬取或对平台造成运营干扰。
14+
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
15+
# 5. 不得用于任何非法或不当的用途。
16+
#
17+
# 详细许可条款请参阅项目根目录下的LICENSE文件。
18+
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。

cache/abs_cache.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
2-
# 1. 不得用于任何商业用途。
3-
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
4-
# 3. 不得进行大规模爬取或对平台造成运营干扰。
5-
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2025 [email protected]
3+
#
4+
# This file is part of MediaCrawler project.
5+
# Repository: https://github.com/NanmiCoder/MediaCrawler/blob/main/cache/abs_cache.py
6+
# GitHub: https://github.com/NanmiCoder
7+
# Licensed under NON-COMMERCIAL LEARNING LICENSE 1.1
8+
#
9+
10+
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
11+
# 1. 不得用于任何商业用途。
12+
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
13+
# 3. 不得进行大规模爬取或对平台造成运营干扰。
14+
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
615
# 5. 不得用于任何非法或不当的用途。
7-
#
8-
# 详细许可条款请参阅项目根目录下的LICENSE文件。
9-
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
16+
#
17+
# 详细许可条款请参阅项目根目录下的LICENSE文件。
18+
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
1019

1120

1221
# -*- coding: utf-8 -*-

cache/cache_factory.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
2-
# 1. 不得用于任何商业用途。
3-
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
4-
# 3. 不得进行大规模爬取或对平台造成运营干扰。
5-
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2025 [email protected]
3+
#
4+
# This file is part of MediaCrawler project.
5+
# Repository: https://github.com/NanmiCoder/MediaCrawler/blob/main/cache/cache_factory.py
6+
# GitHub: https://github.com/NanmiCoder
7+
# Licensed under NON-COMMERCIAL LEARNING LICENSE 1.1
8+
#
9+
10+
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
11+
# 1. 不得用于任何商业用途。
12+
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
13+
# 3. 不得进行大规模爬取或对平台造成运营干扰。
14+
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
615
# 5. 不得用于任何非法或不当的用途。
7-
#
8-
# 详细许可条款请参阅项目根目录下的LICENSE文件。
9-
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
16+
#
17+
# 详细许可条款请参阅项目根目录下的LICENSE文件。
18+
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
1019

1120

1221
# -*- coding: utf-8 -*-

cache/local_cache.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
2-
# 1. 不得用于任何商业用途。
3-
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
4-
# 3. 不得进行大规模爬取或对平台造成运营干扰。
5-
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2025 [email protected]
3+
#
4+
# This file is part of MediaCrawler project.
5+
# Repository: https://github.com/NanmiCoder/MediaCrawler/blob/main/cache/local_cache.py
6+
# GitHub: https://github.com/NanmiCoder
7+
# Licensed under NON-COMMERCIAL LEARNING LICENSE 1.1
8+
#
9+
10+
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
11+
# 1. 不得用于任何商业用途。
12+
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
13+
# 3. 不得进行大规模爬取或对平台造成运营干扰。
14+
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
615
# 5. 不得用于任何非法或不当的用途。
7-
#
8-
# 详细许可条款请参阅项目根目录下的LICENSE文件。
9-
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
16+
#
17+
# 详细许可条款请参阅项目根目录下的LICENSE文件。
18+
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
1019

1120

1221
# -*- coding: utf-8 -*-

cache/redis_cache.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
2-
# 1. 不得用于任何商业用途。
3-
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
4-
# 3. 不得进行大规模爬取或对平台造成运营干扰。
5-
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2025 [email protected]
3+
#
4+
# This file is part of MediaCrawler project.
5+
# Repository: https://github.com/NanmiCoder/MediaCrawler/blob/main/cache/redis_cache.py
6+
# GitHub: https://github.com/NanmiCoder
7+
# Licensed under NON-COMMERCIAL LEARNING LICENSE 1.1
8+
#
9+
10+
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
11+
# 1. 不得用于任何商业用途。
12+
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
13+
# 3. 不得进行大规模爬取或对平台造成运营干扰。
14+
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
615
# 5. 不得用于任何非法或不当的用途。
7-
#
8-
# 详细许可条款请参阅项目根目录下的LICENSE文件。
9-
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
16+
#
17+
# 详细许可条款请参阅项目根目录下的LICENSE文件。
18+
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
1019

1120

1221
# -*- coding: utf-8 -*-

cmd_arg/__init__.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
2-
# 1. 不得用于任何商业用途。
3-
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
4-
# 3. 不得进行大规模爬取或对平台造成运营干扰。
5-
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2025 [email protected]
3+
#
4+
# This file is part of MediaCrawler project.
5+
# Repository: https://github.com/NanmiCoder/MediaCrawler/blob/main/cmd_arg/__init__.py
6+
# GitHub: https://github.com/NanmiCoder
7+
# Licensed under NON-COMMERCIAL LEARNING LICENSE 1.1
8+
#
9+
10+
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
11+
# 1. 不得用于任何商业用途。
12+
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。
13+
# 3. 不得进行大规模爬取或对平台造成运营干扰。
14+
# 4. 应合理控制请求频率,避免给目标平台带来不必要的负担。
615
# 5. 不得用于任何非法或不当的用途。
7-
#
8-
# 详细许可条款请参阅项目根目录下的LICENSE文件。
9-
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
16+
#
17+
# 详细许可条款请参阅项目根目录下的LICENSE文件。
18+
# 使用本代码即表示您同意遵守上述原则和LICENSE中的所有条款。
1019

1120

1221
from .arg import *

cmd_arg/arg.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2025 [email protected]
3+
#
4+
# This file is part of MediaCrawler project.
5+
# Repository: https://github.com/NanmiCoder/MediaCrawler/blob/main/cmd_arg/arg.py
6+
# GitHub: https://github.com/NanmiCoder
7+
# Licensed under NON-COMMERCIAL LEARNING LICENSE 1.1
8+
#
9+
110
# 声明:本代码仅供学习和研究目的使用。使用者应遵守以下原则:
211
# 1. 不得用于任何商业用途。
312
# 2. 使用时应遵守目标平台的使用条款和robots.txt规则。

0 commit comments

Comments
 (0)