ExtractorError,
float_or_none,
int_or_none,
+ str_to_int,
)
'duration': 5627.428,
'upload_date': '20140712',
'view_count': int,
+ 'comment_count': int,
'thumbnail': 're:^https?://.*\.jpg$',
},
}
recording = rec_doc.find('./recording')
title = recording.find('./title').text
- view_count = int_or_none(recording.find('./stats/playcount').text)
+ view_count = str_to_int(recording.find('./stats/playcount').text)
+ comment_count = str_to_int(recording.find('./stats/comments').text)
duration = float_or_none(recording.find('./duration').text, scale=1000)
thumbnail = recording.find('./image').text
'title': title,
'upload_date': upload_date,
'view_count': view_count,
+ 'comment_count': comment_count,
'duration': duration,
'thumbnail': thumbnail,
'uploader': uploader,