I am new to python and I am taking my first steps. It turns out that I have a file of thousands of rows. The content of the string
that contains each row can be of two classes (I leave the capture of both types of string) and is determined by a label called "mime" which can be video or audio.
My problem is that I do not know how to extract the value of the variables "lmt", "mime", "itag", "dur" prsentes in each line and at the end store them in a file .csv
.
I have tried dividing and creating a new file and using vectors. But I do not come to a solution (I feel a bit frustrated) .
String1:
Line 219 (6420), Dh, "" "url" ": "" link ", "
String2:
Line 479 (106021), Dh, "" "url" ": "" link " ","
I would really appreciate any help. In the end what I want is a file that contains the following output data:
Output .csv file: