Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playlist content scrapping #16714

Closed
mzramna opened this issue Jun 12, 2018 · 3 comments
Closed

playlist content scrapping #16714

mzramna opened this issue Jun 12, 2018 · 3 comments

Comments

@mzramna
Copy link

@mzramna mzramna commented Jun 12, 2018

i was trying to extract the ids from a playlist into youtube,but it has to download all data from all playlist before i was able to get any data from anything in there ,since it has already downloaded this data that i need to begin the process of downloading all the other datas , it has a way to get this and i just couldnt find it or it is unable to do it just using the youtube-dl library for python?Since i'm working with a enormous playlist(this one into the code is an exemple much smaller than the one that i'm using) i cant wait it to download all the unecessary data from all the playlist every time i run the script,ps json is to store all the processed and unprocessed data

from youtube_dl import YoutubeDL
import json
url = 'PLMC9KNkIncKvYin_USF1qoJQnIyMAfRxl'
ytdl = YoutubeDL()
info = ytdl.extract_info(url, download=False)['id']
print(info.keys())
print (info['id'])
with open('youtube_dl_datamining.txt','w') as output_file:
json.dump(info,output_file)

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 12, 2018

--flat-playlist.

@dstftw dstftw closed this Jun 12, 2018
@mzramna
Copy link
Author

@mzramna mzramna commented Jun 12, 2018

this works like this just into the execution of youtube-dl aplication from the terminal dont?How do we use this into the python script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.