README updated
This commit is contained in:
parent
e41545eb74
commit
63a67ef86e
18
README.md
18
README.md
|
@ -1,5 +1,11 @@
|
|||
# YouTube Transcript/Subtitle API (including automatically generated subtitles)
|
||||
|
||||
[](https://travis-ci.org/jdepoix/youtube-transcript-api)
|
||||
[](https://coveralls.io/github/jdepoix/youtube-transcript-api?branch=master)
|
||||
[](http://opensource.org/licenses/MIT)
|
||||
[](https://pypi.org/project/youtube-transcript-api/)
|
||||
[](https://pypi.org/project/youtube-transcript-api/)
|
||||
|
||||
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 and it does not require a headless browser, like other selenium based solutions do!
|
||||
|
||||
## Install
|
||||
|
@ -86,22 +92,22 @@ youtube_transcript_api <first_video_id> <second_video_id> ... --languages de en
|
|||
|
||||
### Proxy
|
||||
|
||||
You can pass a proxy to use during the network requests
|
||||
You can specify a https/http proxy, which will be used during the requests to YouTube:
|
||||
|
||||
Code:
|
||||
```python
|
||||
from youtube_transcript_api import YouTubeTranscriptApi
|
||||
|
||||
YouTubeTranscriptApi.get_transcript(video_id, proxy={"http": "http://user:pass@domain:port", "https": "https://user:pass@domain:port"})
|
||||
|
||||
YouTubeTranscriptApi.get_transcript(video_id, proxies={"http": "http://user:pass@domain:port", "https": "https://user:pass@domain:port"})
|
||||
```
|
||||
|
||||
CLI:
|
||||
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)
|
||||
|
||||
Using the CLI:
|
||||
|
||||
```
|
||||
youtube_transcript_api <first_video_id> <second_video_id> --http-proxy http://user:pass@domain:port --https-proxy https://user:pass@domain:port
|
||||
```
|
||||
|
||||
Find out more about using proxies and the type of proxies you can use here: http://docs.python-requests.org/en/master/user/advanced/#proxies
|
||||
|
||||
## Warning
|
||||
|
||||
|
|
Loading…
Reference in New Issue