SHARE
TWEET

Untitled

a guest Jun 17th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import json
  2.  
  3. data2 = {}
  4. data1 = []
  5. i = 1
  6.  
  7. with open('abc3') as json_file:
  8.     f=open("abc2", "r")
  9.     data = json.load(json_file)
  10.     lines =f.readlines()
  11.     for p,x in zip(data['Url'],lines):
  12.         print(p['Urls'])
  13.         print(x)
  14.         print(i)
  15.         print('')
  16.         data2['videoId'] = i
  17.         data2['videoUrl'] = p['Urls']
  18.         data2['videName'] = x
  19.         i = i + 1  
  20.         data1.extend(data2)
  21.  
  22.  
  23.  
  24. with open('data1.json', 'w') as outfile:
  25.     json.dump(data1, outfile)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top