README updated
This commit is contained in:
		
							parent
							
								
									e41545eb74
								
							
						
					
					
						commit
						63a67ef86e
					
				
							
								
								
									
										20
									
								
								README.md
								
								
								
								
							
							
						
						
									
										20
									
								
								README.md
								
								
								
								
							|  | @ -1,5 +1,11 @@ | ||||||
| # YouTube Transcript/Subtitle API (including automatically generated subtitles) | # 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! | 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 | ## Install | ||||||
|  | @ -86,23 +92,23 @@ youtube_transcript_api <first_video_id> <second_video_id> ... --languages de en | ||||||
| 
 | 
 | ||||||
| ### Proxy | ### 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 | ```python | ||||||
| from youtube_transcript_api import YouTubeTranscriptApi | 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 | 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 | ## Warning | ||||||
| 
 | 
 | ||||||
| This code uses an undocumented part of the YouTube API, which is called by the YouTube web-client. So there is no guarantee that it won't stop working tomorrow, if they change how things work. I will however do my best to make things working again as soon as possible if that happens. So if it stops working, let me know! |  This code uses an undocumented part of the YouTube API, which is called by the YouTube web-client. So there is no guarantee that it won't stop working tomorrow, if they change how things work. I will however do my best to make things working again as soon as possible if that happens. So if it stops working, let me know! | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue