Can any one help me in web scrapping with python in html and JSON | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can any one help me in web scrapping with python in html and JSON

Hello I am very much interested in web scrapping with python . And I want to scrap youtube the content is present in the <script > tag and the script tag is consists of json there are nearly 23 <script > Tags present in the page source they even dont even have any attributes the how can I choose the particular tag without any class or id

29th Jul 2020, 6:34 PM
Varshith
Varshith - avatar
2 Answers
+ 3
use the json module to change the data to a dictionary. you can then access the data by key
29th Jul 2020, 6:45 PM
Slick
Slick - avatar
+ 1
Hello Slick you are correct but i think it is very time consuming process taking the content from script tag and checking the keys
29th Jul 2020, 7:11 PM
Varshith
Varshith - avatar