youtube-series-downloader 1.5.1__tar.gz → 1.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/.github/workflows/lint.yml +3 -3
  2. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/.github/workflows/pytest.yml +3 -3
  3. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/.github/workflows/python-publish.yml +2 -2
  4. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/CHANGELOG.md +6 -0
  5. {youtube-series-downloader-1.5.1/youtube_series_downloader.egg-info → youtube_series_downloader-1.6.0}/PKG-INFO +21 -8
  6. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/config/youtube-series-downloader-example.cfg +3 -0
  7. youtube_series_downloader-1.6.0/renovate.json +7 -0
  8. youtube_series_downloader-1.6.0/requirements.txt +5 -0
  9. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/setup.py +3 -3
  10. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/config.py +1 -0
  11. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/gateways/config_gateway.py +7 -2
  12. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/gateways/config_gateway_test.py +15 -3
  13. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/gateways/youtube_dl_gateway.py +3 -0
  14. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/gateways/youtube_gateway.py +12 -1
  15. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0/youtube_series_downloader.egg-info}/PKG-INFO +21 -8
  16. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader.egg-info/SOURCES.txt +1 -0
  17. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader.egg-info/entry_points.txt +0 -1
  18. youtube-series-downloader-1.5.1/requirements.txt +0 -5
  19. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/.github/pull_request_template.md +0 -0
  20. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/.gitignore +0 -0
  21. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/.lgtm.yml +0 -0
  22. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/.markdownlint.yml +0 -0
  23. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/LICENSE +0 -0
  24. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/README.md +0 -0
  25. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/pytest.ini +0 -0
  26. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/setup.cfg +0 -0
  27. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/__init__.py +0 -0
  28. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/__main__.py +0 -0
  29. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/adapters/__init__.py +0 -0
  30. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/adapters/app_adapter.py +0 -0
  31. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/app/__init__.py +0 -0
  32. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/app/download_new_episodes/__init__.py +0 -0
  33. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/app/download_new_episodes/download_new_episodes.py +0 -0
  34. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/app/download_new_episodes/download_new_episodes_repo.py +0 -0
  35. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/app/download_new_episodes/download_new_episodes_test.py +0 -0
  36. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/core/__init__.py +0 -0
  37. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/core/channel.py +0 -0
  38. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/core/video.py +0 -0
  39. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/gateways/__init__.py +0 -0
  40. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/gateways/ffmpeg_gateway.py +0 -0
  41. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/gateways/sqlite_gateway.py +0 -0
  42. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/gateways/youtube_gateway_test.py +0 -0
  43. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/utils/__init__.py +0 -0
  44. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/utils/arg_parser.py +0 -0
  45. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/utils/log_colors.py +0 -0
  46. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader/utils/program_checker.py +0 -0
  47. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader.egg-info/dependency_links.txt +0 -0
  48. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader.egg-info/requires.txt +0 -0
  49. {youtube-series-downloader-1.5.1 → youtube_series_downloader-1.6.0}/youtube_series_downloader.egg-info/top_level.txt +0 -0
@@ -15,9 +15,9 @@ jobs:
15
15
  name: black & flake8 & markdown
16
16
 
17
17
  steps:
18
- - uses: actions/checkout@v2
18
+ - uses: actions/checkout@v4
19
19
  - name: Set up Python 3.9
20
- uses: actions/setup-python@v2
20
+ uses: actions/setup-python@v5
21
21
  with:
22
22
  python-version: 3.9
23
23
  - name: Install dependencies
@@ -31,6 +31,6 @@ jobs:
31
31
  # stop the build if there are Python syntax errors or undefined names
32
32
  flake8 . --count --select=E9,F63,F7,F82 --max-line-length=119 --max-complexity=10 --show-source --statistics
33
33
  - name: Markdown lint
34
- uses: DavidAnson/markdownlint-cli2-action@v2
34
+ uses: DavidAnson/markdownlint-cli2-action@v4
35
35
  with:
36
36
  globs: '**/*.md'
@@ -13,14 +13,14 @@ jobs:
13
13
  runs-on: ubuntu-latest
14
14
  strategy:
15
15
  matrix:
16
- python-version: ['3.8', '3.9', '3.10']
16
+ python-version: ['3.10', '3.11', '3.12']
17
17
 
18
18
  name: Python ${{ matrix.python-version }}
19
19
 
20
20
  steps:
21
- - uses: actions/checkout@v2
21
+ - uses: actions/checkout@v4
22
22
  - name: Set up Python ${{ matrix.python-version }}
23
- uses: actions/setup-python@v2
23
+ uses: actions/setup-python@v5
24
24
  with:
25
25
  python-version: ${{ matrix.python-version }}
26
26
  - name: Install dependencies
@@ -14,9 +14,9 @@ jobs:
14
14
 
15
15
  steps:
16
16
  - name: Checkout repository
17
- uses: actions/checkout@v2
17
+ uses: actions/checkout@v4
18
18
  - name: Set up Python
19
- uses: actions/setup-python@v2
19
+ uses: actions/setup-python@v5
20
20
  with:
21
21
  python-version: '3.x'
22
22
  - name: Install dependencies
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.6.0] - 2025-11-16
9
+
10
+ ### Added
11
+
12
+ - Ability to pass in a custom cookies file through the configuration file with `cookies_file = /path/to/cookies.txt`.
13
+
8
14
  ## [1.5.1] - 2021-11-13
9
15
 
10
16
  ### Fixed
@@ -1,21 +1,36 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: youtube-series-downloader
3
- Version: 1.5.1
3
+ Version: 1.6.0
4
4
  Summary: Downloads YouTube series and optionally speeds them up to be watched on TVs
5
5
  Home-page: https://github.com/Senth/youtube-series-downloader
6
6
  Author: Matteus Magnusson
7
7
  Author-email: senth.wallace@gmail.com
8
8
  License: MIT
9
- Platform: UNKNOWN
10
9
  Classifier: Development Status :: 4 - Beta
11
10
  Classifier: Environment :: Console
12
11
  Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Programming Language :: Python :: 3.9
15
12
  Classifier: Programming Language :: Python :: 3.10
16
- Requires-Python: >=3.8
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Requires-Python: >=3.10
17
16
  Description-Content-Type: text/markdown
18
17
  License-File: LICENSE
18
+ Requires-Dist: apscheduler
19
+ Requires-Dist: blulib==0.1.1
20
+ Requires-Dist: requests
21
+ Requires-Dist: tealprint==0.2.1
22
+ Requires-Dist: yt-dlp
23
+ Dynamic: author
24
+ Dynamic: author-email
25
+ Dynamic: classifier
26
+ Dynamic: description
27
+ Dynamic: description-content-type
28
+ Dynamic: home-page
29
+ Dynamic: license
30
+ Dynamic: license-file
31
+ Dynamic: requires-dist
32
+ Dynamic: requires-python
33
+ Dynamic: summary
19
34
 
20
35
  # youtube-series-downloader
21
36
 
@@ -71,5 +86,3 @@ youtube-series-downloader
71
86
  ## Authors
72
87
 
73
88
  `youtube-series-downloader` was written by `Matteus Magnusson <senth.wallace@gmail.com>`.
74
-
75
-
@@ -21,6 +21,9 @@ series_dir = /mnt/lvm/series
21
21
  # Possible values: none, error, warning, info, verbose, debug
22
22
  # log_level = info
23
23
 
24
+ # (Optional) Cookie file to use when downloading videos. Useful for making sure YouTube doesn't block the requests.
25
+ # cookie_file = /path/to/cookies.txt
26
+
24
27
 
25
28
  [vars]
26
29
  # Use this section to help you specify common paths used in your channel's "dir" variable
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": [
3
+ "config:base",
4
+ "schedule:monthly"
5
+ ],
6
+ "dependencyDashboard": false
7
+ }
@@ -0,0 +1,5 @@
1
+ tealprint==0.2.1
2
+ blulib==0.1.1
3
+ requests
4
+ APScheduler
5
+ yt-dlp
@@ -37,10 +37,10 @@ setup(
37
37
  "Development Status :: 4 - Beta",
38
38
  "Environment :: Console",
39
39
  "License :: OSI Approved :: MIT License",
40
- "Programming Language :: Python :: 3.8",
41
- "Programming Language :: Python :: 3.9",
42
40
  "Programming Language :: Python :: 3.10",
41
+ "Programming Language :: Python :: 3.11",
42
+ "Programming Language :: Python :: 3.12",
43
43
  ],
44
44
  setup_requires=["setuptools_scm"],
45
- python_requires=">=3.8",
45
+ python_requires=">=3.10",
46
46
  )
@@ -52,6 +52,7 @@ class General:
52
52
  self.speed_up_default: float = 1.0
53
53
  self.max_days_back: int = 3
54
54
  self.log_level = TealLevel.info
55
+ self.cookies_file: str = ""
55
56
 
56
57
 
57
58
  config = Config()
@@ -49,9 +49,13 @@ class ConfigGateway:
49
49
  "float:speed_up_default",
50
50
  "int:max_days_back",
51
51
  "log_level",
52
+ "cookies_file",
52
53
  )
53
54
  if not general.series_dir:
54
- TealPrint.warning(f"Missing 'series_dir' in [General] in your configuration. Please add it.", exit=True)
55
+ TealPrint.warning(
56
+ f"Missing 'series_dir' in [General] in your configuration. Please add it.",
57
+ exit=True,
58
+ )
55
59
 
56
60
  # Convert string to LogLevel
57
61
  if isinstance(general.log_level, str):
@@ -84,7 +88,8 @@ class ConfigGateway:
84
88
 
85
89
  if not channel.id:
86
90
  TealPrint.warning(
87
- f"Missing 'id' for channel [{section}] in your configuration. Please add it.", exit=True
91
+ f"Missing 'id' for channel [{section}] in your configuration. Please add it.",
92
+ exit=True,
88
93
  )
89
94
 
90
95
  channels.append(channel)
@@ -39,7 +39,11 @@ from youtube_series_downloader.gateways.config_gateway import ConfigGateway
39
39
  dir = some/dir
40
40
  """,
41
41
  [
42
- Channel(name="Channel Name", id="UChFur_NwVSbUozOcF_F2kMf", collection_dir="some/dir"),
42
+ Channel(
43
+ name="Channel Name",
44
+ id="UChFur_NwVSbUozOcF_F2kMf",
45
+ collection_dir="some/dir",
46
+ ),
43
47
  ],
44
48
  ),
45
49
  (
@@ -63,7 +67,11 @@ from youtube_series_downloader.gateways.config_gateway import ConfigGateway
63
67
  another string
64
68
  """,
65
69
  [
66
- Channel(name="Channel Name", id="UChFur_NwVSbUozOcF_F2kMf", includes=["test", "another string"]),
70
+ Channel(
71
+ name="Channel Name",
72
+ id="UChFur_NwVSbUozOcF_F2kMf",
73
+ includes=["test", "another string"],
74
+ ),
67
75
  ],
68
76
  ),
69
77
  (
@@ -76,7 +84,11 @@ from youtube_series_downloader.gateways.config_gateway import ConfigGateway
76
84
  another string
77
85
  """,
78
86
  [
79
- Channel(name="Channel Name", id="UChFur_NwVSbUozOcF_F2kMf", excludes=["test", "another string"]),
87
+ Channel(
88
+ name="Channel Name",
89
+ id="UChFur_NwVSbUozOcF_F2kMf",
90
+ excludes=["test", "another string"],
91
+ ),
80
92
  ],
81
93
  ),
82
94
  (
@@ -27,6 +27,9 @@ class YoutubeDlGateway:
27
27
  "no_warnings": no_warnings,
28
28
  "merge_output_format": "mkv",
29
29
  }
30
+ if config.general.cookies_file:
31
+ ydl_opts["cookies"] = config.general.cookies_file
32
+
30
33
  with YoutubeDL(ydl_opts) as ydl:
31
34
  return_code = ydl.download([video.id])
32
35
  if return_code == 0:
@@ -9,7 +9,12 @@ from youtube_series_downloader.core.video import Video
9
9
  class YoutubeGateway:
10
10
  __RSS_PREFX: str = "https://www.youtube.com/feeds/videos.xml?channel_id="
11
11
  __REGEX = re.compile(
12
- r"<entry>.*?<yt:videoId>(.*?)<\/yt:videoId>.*?<title>(.*?)<\/title>.*?<published>(.*?)<\/published>.*?<\/entry>",
12
+ r"<entry>.*?"
13
+ + r"<yt:videoId>(.*?)<\/yt:videoId>.*?"
14
+ + r"<title>(.*?)<\/title>.*?"
15
+ + r"<published>(.*?)<\/published>.*?"
16
+ + r"<media:statistics views=\"(.*?)\"\/>.*?"
17
+ + r"<\/entry>",
13
18
  re.DOTALL,
14
19
  )
15
20
 
@@ -27,6 +32,12 @@ class YoutubeGateway:
27
32
  id = groups[0]
28
33
  title = groups[1]
29
34
  date = groups[2]
35
+ views = groups[3]
36
+
37
+ # Live videos do not have any views in the RSS feed, skip them
38
+ if views == "0":
39
+ continue
40
+
30
41
  video = Video(id, date, title)
31
42
  videos.append(video)
32
43
 
@@ -1,21 +1,36 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: youtube-series-downloader
3
- Version: 1.5.1
3
+ Version: 1.6.0
4
4
  Summary: Downloads YouTube series and optionally speeds them up to be watched on TVs
5
5
  Home-page: https://github.com/Senth/youtube-series-downloader
6
6
  Author: Matteus Magnusson
7
7
  Author-email: senth.wallace@gmail.com
8
8
  License: MIT
9
- Platform: UNKNOWN
10
9
  Classifier: Development Status :: 4 - Beta
11
10
  Classifier: Environment :: Console
12
11
  Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Programming Language :: Python :: 3.9
15
12
  Classifier: Programming Language :: Python :: 3.10
16
- Requires-Python: >=3.8
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Requires-Python: >=3.10
17
16
  Description-Content-Type: text/markdown
18
17
  License-File: LICENSE
18
+ Requires-Dist: apscheduler
19
+ Requires-Dist: blulib==0.1.1
20
+ Requires-Dist: requests
21
+ Requires-Dist: tealprint==0.2.1
22
+ Requires-Dist: yt-dlp
23
+ Dynamic: author
24
+ Dynamic: author-email
25
+ Dynamic: classifier
26
+ Dynamic: description
27
+ Dynamic: description-content-type
28
+ Dynamic: home-page
29
+ Dynamic: license
30
+ Dynamic: license-file
31
+ Dynamic: requires-dist
32
+ Dynamic: requires-python
33
+ Dynamic: summary
19
34
 
20
35
  # youtube-series-downloader
21
36
 
@@ -71,5 +86,3 @@ youtube-series-downloader
71
86
  ## Authors
72
87
 
73
88
  `youtube-series-downloader` was written by `Matteus Magnusson <senth.wallace@gmail.com>`.
74
-
75
-
@@ -5,6 +5,7 @@ CHANGELOG.md
5
5
  LICENSE
6
6
  README.md
7
7
  pytest.ini
8
+ renovate.json
8
9
  requirements.txt
9
10
  setup.py
10
11
  .github/pull_request_template.md
@@ -1,3 +1,2 @@
1
1
  [console_scripts]
2
2
  youtube-series-downloader = youtube_series_downloader.__main__:main
3
-
@@ -1,5 +0,0 @@
1
- tealprint==0.2.1
2
- blulib==0.1.1
3
- requests==2.22.0
4
- APScheduler==3.7.0
5
- yt-dlp==2021.11.10.1