Rstrip the "Z" off of timestamps.
This only started occuring recently.
This commit is contained in:
		
							parent
							
								
									cd7a59cbfa
								
							
						
					
					
						commit
						e165b16edc
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -30,6 +30,7 @@ class Video: | ||||||
|         # Something like '2016-10-01T21:00:01' |         # Something like '2016-10-01T21:00:01' | ||||||
|         self.published_string = snippet['publishedAt'] |         self.published_string = snippet['publishedAt'] | ||||||
|         published = snippet['publishedAt'].split('.')[0] |         published = snippet['publishedAt'].split('.')[0] | ||||||
|  |         published = published.rstrip('Z') | ||||||
|         published = datetime.datetime.strptime(published, '%Y-%m-%dT%H:%M:%S') |         published = datetime.datetime.strptime(published, '%Y-%m-%dT%H:%M:%S') | ||||||
|         self.published = published.timestamp() |         self.published = published.timestamp() | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue