File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed
Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change 44
55
66class Video :
7-
7+ """
8+ Create an instance of `Video` class.
9+ ```python
10+ video = Video(video_url="video_url")
11+ ```
12+
13+ | Methods | Details |
14+ | --------------- | ------------------------ |
15+ | `.getDetails()` | Return the video details |
16+ """
817
918 def __init__ (self , video_url ):
1019 self .video_url = video_url
1120
1221 def getDetails (self ):
13-
22+ """
23+ Class - `Video`
24+ Example:
25+ ```
26+ video_data = Video("https://www.youtube.com/watch?v=pBy1zgt0XPc")
27+ video_data.getDetails()
28+ ```
29+ Returns:
30+ {
31+ "title": Tile of the video
32+ "description": Description of the video
33+ "views_count": No. of views of the video,
34+ "upload_date": Upload date of the video,
35+ "comment_count": No. of comments,
36+ "channel_name": Name of the channel,
37+ "channel_avatar": Channel avatar,
38+ "subscriber_count": No. of channel subscribers,
39+ "channel_url": Link to the channel
40+ }
41+ """
1442 url = self .video_url
1543 try :
1644 res = requests .get (url )
You can’t perform that action at this time.
0 commit comments