File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
- Refactor tests to remove dependency on mock library
12
12
### Fixed
13
13
- Fix matching exception in horoscope test
14
+ - Fix youtube.py ISO time parse
14
15
15
16
## [ 1.3.0] 2020-03-17
16
17
### Added
Original file line number Diff line number Diff line change 1
1
import re
2
- import time
3
2
4
3
import isodate
5
4
import requests
@@ -72,9 +71,9 @@ def get_video_description(video_id):
72
71
73
72
uploader = snippet ['channelTitle' ]
74
73
75
- upload_time = time . strptime (snippet ['publishedAt' ], "%Y-%m-%dT%H:%M:%S.000Z" )
74
+ upload_time = isodate . parse_datetime (snippet ['publishedAt' ])
76
75
out += ' - \x02 {}\x02 on \x02 {}\x02 ' .format (uploader ,
77
- time .strftime ("%Y.%m.%d" , upload_time ))
76
+ upload_time .strftime ("%Y.%m.%d" ))
78
77
79
78
if 'contentRating' in content_details :
80
79
out += ' - \x03 4NSFW\x02 '
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def mock_api_keys():
33
33
'etag' : '"p4VTdlkQv3HQeTEaXgvLePAydmU/8GTj_EHYgQmPYCDpJbQ4NM6r5B8"' ,
34
34
'id' : 'phL7P6gtZRM' ,
35
35
'snippet' : {
36
- 'publishedAt' : '2019-10-10T15:00:09.000Z ' ,
36
+ 'publishedAt' : '2019-10-10T15:00:09Z ' ,
37
37
'channelId' : 'UCRUULstZRWS1lDvJBzHnkXA' ,
38
38
'title' : 'some title' ,
39
39
'description' : 'a description' ,
You can’t perform that action at this time.
0 commit comments