Created
June 29, 2021 08:19
-
-
Save JoJoseph25/20dd084d8b0a7912345d8650aacc50cc to your computer and use it in GitHub Desktop.
Check if video published within specified data range
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tqdm import tqdm | |
def check_url(urls, from_date, to_date, add_list, i): | |
for url in tqdm(urls): | |
meta_data = parse_video_info(url) | |
if bool(meta_data): | |
cur_date = datetime.strptime(meta_data['upload_date'],'%Y-%m-%d') | |
if cur_date>=from_date and cur_date<to_date: | |
add_list.append(meta_data) | |
else: | |
print('Non-Url', url) | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment