summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-25 11:23:39 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-25 11:23:39 +0000
commit5aae75283530a5d63d435c27a7c131bb8f7820e2 (patch)
tree82dac2616e1870abe370f511ee755471e7cfa203
parent839885d2c9961be1b99ffca5f81db2743a6fa92f (diff)
automatic import of python-youtube-transcript-apiopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-youtube-transcript-api.spec53
-rw-r--r--sources2
3 files changed, 42 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 889ee86..139a40a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/youtube_transcript_api-0.5.0.tar.gz
+/youtube_transcript_api-0.6.0.tar.gz
diff --git a/python-youtube-transcript-api.spec b/python-youtube-transcript-api.spec
index 8416781..beb1218 100644
--- a/python-youtube-transcript-api.spec
+++ b/python-youtube-transcript-api.spec
@@ -1,11 +1,11 @@
%global _empty_manifest_terminate_build 0
Name: python-youtube-transcript-api
-Version: 0.5.0
+Version: 0.6.0
Release: 1
Summary: This is an python API which allows you to get the transcripts/subtitles for a given YouTube video. It also works for automatically generated subtitles, supports translating subtitles and it does not require a headless browser, like other selenium based solutions do!
License: MIT License
URL: https://github.com/jdepoix/youtube-transcript-api
-Source0: https://mirrors.nju.edu.cn/pypi/web/packages/77/63/6ea8f7b9357568b2eafae7ac352a600eb53bddd563f1074bbdce2621d35f/youtube_transcript_api-0.5.0.tar.gz
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2a/cf/7d79233e4781b75219cf5b117cf01ea113f87f9f5ffb9c0a94900fe914a9/youtube_transcript_api-0.6.0.tar.gz
BuildArch: noarch
Requires: python3-requests
@@ -23,7 +23,7 @@ This is a python API which allows you to get the transcript/subtitles for a give
It is recommended to [install this module by using pip](https://pypi.org/project/youtube-transcript-api/):
```
-pip install youtube_transcript_api
+pip install youtube-transcript-api
```
If you want to use it from source, you'll have to install the dependencies manually:
@@ -61,8 +61,9 @@ This will return a list of dictionaries looking somewhat like this:
# ...
]
```
+### Translate transcript
-You can also add the `languages` param if you want to make sure the transcripts are retrieved in your desired language (it defaults to english).
+You can add the `languages` param if you want to make sure the transcripts are retrieved in your desired language (it defaults to english).
```python
YouTubeTranscriptApi.get_transcripts(video_ids, languages=['de', 'en'])
@@ -78,6 +79,14 @@ YouTubeTranscriptApi.get_transcripts(video_ids, languages=['de', 'en'])
`languages` also is optional here.
+### Preserve formatting
+
+You can also add `preserve_formatting=True` if you'd like to keep HTML formatting elements such as `<i>` (italics) and `<b>` (bold).
+
+```python
+YouTubeTranscriptApi.get_transcripts(video_ids, languages=['de', 'en'], preserve_formatting=True)
+```
+
### List available transcripts
If you want to list all transcripts which are available for a given video you can call:
@@ -302,7 +311,7 @@ from youtube_transcript_api import YouTubeTranscriptApi
YouTubeTranscriptApi.get_transcript(video_id, proxies={"https": "https://user:pass@domain:port"})
```
-As the `proxies` dict is passed on to the `requests.get(...)` call, it follows the [format used by the requests library](http://docs.python-requests.org/en/master/user/advanced/#proxies).
+As the `proxies` dict is passed on to the `requests.get(...)` call, it follows the [format used by the requests library](https://requests.readthedocs.io/en/latest/user/advanced/#proxies).
Using the CLI:
@@ -363,7 +372,7 @@ This is a python API which allows you to get the transcript/subtitles for a give
It is recommended to [install this module by using pip](https://pypi.org/project/youtube-transcript-api/):
```
-pip install youtube_transcript_api
+pip install youtube-transcript-api
```
If you want to use it from source, you'll have to install the dependencies manually:
@@ -401,8 +410,9 @@ This will return a list of dictionaries looking somewhat like this:
# ...
]
```
+### Translate transcript
-You can also add the `languages` param if you want to make sure the transcripts are retrieved in your desired language (it defaults to english).
+You can add the `languages` param if you want to make sure the transcripts are retrieved in your desired language (it defaults to english).
```python
YouTubeTranscriptApi.get_transcripts(video_ids, languages=['de', 'en'])
@@ -418,6 +428,14 @@ YouTubeTranscriptApi.get_transcripts(video_ids, languages=['de', 'en'])
`languages` also is optional here.
+### Preserve formatting
+
+You can also add `preserve_formatting=True` if you'd like to keep HTML formatting elements such as `<i>` (italics) and `<b>` (bold).
+
+```python
+YouTubeTranscriptApi.get_transcripts(video_ids, languages=['de', 'en'], preserve_formatting=True)
+```
+
### List available transcripts
If you want to list all transcripts which are available for a given video you can call:
@@ -642,7 +660,7 @@ from youtube_transcript_api import YouTubeTranscriptApi
YouTubeTranscriptApi.get_transcript(video_id, proxies={"https": "https://user:pass@domain:port"})
```
-As the `proxies` dict is passed on to the `requests.get(...)` call, it follows the [format used by the requests library](http://docs.python-requests.org/en/master/user/advanced/#proxies).
+As the `proxies` dict is passed on to the `requests.get(...)` call, it follows the [format used by the requests library](https://requests.readthedocs.io/en/latest/user/advanced/#proxies).
Using the CLI:
@@ -700,7 +718,7 @@ This is a python API which allows you to get the transcript/subtitles for a give
It is recommended to [install this module by using pip](https://pypi.org/project/youtube-transcript-api/):
```
-pip install youtube_transcript_api
+pip install youtube-transcript-api
```
If you want to use it from source, you'll have to install the dependencies manually:
@@ -738,8 +756,9 @@ This will return a list of dictionaries looking somewhat like this:
# ...
]
```
+### Translate transcript
-You can also add the `languages` param if you want to make sure the transcripts are retrieved in your desired language (it defaults to english).
+You can add the `languages` param if you want to make sure the transcripts are retrieved in your desired language (it defaults to english).
```python
YouTubeTranscriptApi.get_transcripts(video_ids, languages=['de', 'en'])
@@ -755,6 +774,14 @@ YouTubeTranscriptApi.get_transcripts(video_ids, languages=['de', 'en'])
`languages` also is optional here.
+### Preserve formatting
+
+You can also add `preserve_formatting=True` if you'd like to keep HTML formatting elements such as `<i>` (italics) and `<b>` (bold).
+
+```python
+YouTubeTranscriptApi.get_transcripts(video_ids, languages=['de', 'en'], preserve_formatting=True)
+```
+
### List available transcripts
If you want to list all transcripts which are available for a given video you can call:
@@ -979,7 +1006,7 @@ from youtube_transcript_api import YouTubeTranscriptApi
YouTubeTranscriptApi.get_transcript(video_id, proxies={"https": "https://user:pass@domain:port"})
```
-As the `proxies` dict is passed on to the `requests.get(...)` call, it follows the [format used by the requests library](http://docs.python-requests.org/en/master/user/advanced/#proxies).
+As the `proxies` dict is passed on to the `requests.get(...)` call, it follows the [format used by the requests library](https://requests.readthedocs.io/en/latest/user/advanced/#proxies).
Using the CLI:
@@ -1022,7 +1049,7 @@ If this project makes you happy by reducing your development time, you can make
%prep
-%autosetup -n youtube-transcript-api-0.5.0
+%autosetup -n youtube-transcript-api-0.6.0
%build
%py3_build
@@ -1062,5 +1089,5 @@ mv %{buildroot}/doclist.lst .
%{_docdir}/*
%changelog
-* Wed Apr 12 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.0-1
+* Tue Apr 25 2023 Python_Bot <Python_Bot@openeuler.org> - 0.6.0-1
- Package Spec generated
diff --git a/sources b/sources
index 8453482..37caf6a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3d872f44c586f209e94a5c82fc3d2c93 youtube_transcript_api-0.5.0.tar.gz
+41ba0d627a9e175d73737d1d15159f8b youtube_transcript_api-0.6.0.tar.gz