0

it's posible to extract upload date in a json for all videos of a chanel?

i want a json but that the json had the upload date of all videos here is my code.

import json
import yt_dlp as youtube_dl
options = {'ignoreerrors': True,'quiet': True,'extract_flat': 'in_playlist','dump_single_json': True}
def getData(url):
    with youtube_dl.YoutubeDL(options) as ydl: return ydl.extract_info(url, download= False)
dictio= getData('https://www.youtube.com/@4everZyanya')

returns a json but in the json isn't the upload date. but if i write in windows terminal:

youtube-dl --get-filename -o "%(upload_date)s" www.youtube.com/@4everzyanya

i can get all upload dates i need it but with python sorry, my english is so bad.

1 Answers1

0

1.Wrong question format, please fix it.see format
2.Whether youtube-dl --get-filename -o "%(upload_date)s" www.youtube.com/@4everzyanya is linux shell? If so, you can use the following code:

import subprocess
url="www.youtube.com/@4everzyanya"
subprocess.getoutput("youtube-dl --get-filename -o %s" %url)