From a501498097582468b1018961d0bd9d214e393777 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 26 Jun 2011 08:32:47 +0530 Subject: [PATCH] generating list of padma ids for node links --- get_padma.py | 24 +++ padma.json | 489 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 513 insertions(+) create mode 100644 get_padma.py create mode 100644 padma.json diff --git a/get_padma.py b/get_padma.py new file mode 100644 index 0000000..5e421a3 --- /dev/null +++ b/get_padma.py @@ -0,0 +1,24 @@ +import json +from pyquery import PyQuery as pq + +def do(): + data = json.loads(open("radia.json").read()) + outfile = "padma.json" + ret = {} + for d in data: +# print get_padma_ids(data[d]['link']) + ret[d] = get_padma_ids(data[d]['link']) + f = open(outfile, "w") + f.write(json.dumps(ret, indent=2)) + f.close() + print "generated padma.json from radia.json - currently returns empty if link points to a single video. this should be fixed soon" + +def get_padma_ids(link): + ids = [] + if link.startswith("http://powertapes.pad.ma/"): + jq = pq(url=link) + elems = jq.find('.iconText') + for e in elems: + id = e.get("id").replace("iconText", "") + ids.append(id) + return ids diff --git a/padma.json b/padma.json new file mode 100644 index 0000000..8a601c5 --- /dev/null +++ b/padma.json @@ -0,0 +1,489 @@ +{ + "Vir Sanghvi": [ + "Vt8du9n4", + "Vi37j4ua", + "Vdxtzud8", + "Vhmudalp", + "Vev9ymm1", + "Vh5xa6vo", + "Vfs11gi2", + "Vef0ynwz", + "Vsaz3vls", + "Vsbb71h6", + "Vezuyfye", + "Vsmrke3t", + "Vu07qhwb", + "Vhadr6jb", + "Vsn1qxbe", + "Vfb5rxms", + "Vu1bfkgs", + "Vgopxkto", + "Vuhwl68c", + "Vuhut0lb", + "Vum02zsv", + "Vfrzbbm7", + "Vej7h1ev", + "Vu11hgnz", + "Vulplp7m", + "Vu0o3aeu", + "Vs6u3q08", + "Vfgemnpn", + "Vg9cc3yr", + "Vg9c45xj" + ], + "Ambani kids": [], + "MDA": [ + "Ve2gcg3i", + "Vhmssu8i" + ], + "Srinath Narasimhan": [ + "Vsb6xajo" + ], + "DMK": [], + "Airlines": [], + "Niira": [], + "Upender": [ + "Vu5gpfjx" + ], + "Sunil Arora": [ + "Vt8du9n4", + "Vi37j4ua", + "Vdxtzud8", + "Vhmudalp", + "Vev9ymm1", + "Vh5xa6vo", + "Vfs11gi2", + "Vef0ynwz", + "Vsaz3vls", + "Vsbb71h6", + "Vezuyfye", + "Vsmrke3t", + "Vu07qhwb", + "Vhadr6jb", + "Vsn1qxbe", + "Vfb5rxms", + "Vu1bfkgs", + "Vgopxkto", + "Vuhwl68c", + "Vuhut0lb", + "Vum02zsv", + "Vfrzbbm7", + "Vej7h1ev", + "Vu11hgnz", + "Vulplp7m", + "Vu0o3aeu", + "Vs6u3q08", + "Vfgemnpn", + "Vg9cc3yr", + "Vg9c45xj" + ], + "Politicians": [], + "Kanimozhi": [ + "Vfwznkw1", + "Ve2m6yt1", + "Vf00rydj", + "Vsnfhehm", + "Vgu2aqwr", + "Vhlysmbs", + "Vg984263" + ], + "Ratan Tata": [ + "Vt8du9n4", + "Vi37j4ua", + "Vdxtzud8", + "Vhmudalp", + "Vev9ymm1", + "Vh5xa6vo", + "Vfs11gi2", + "Vef0ynwz", + "Vsaz3vls", + "Vsbb71h6", + "Vezuyfye", + "Vsmrke3t", + "Vu07qhwb", + "Vhadr6jb", + "Vsn1qxbe", + "Vfb5rxms", + "Vu1bfkgs", + "Vgopxkto", + "Vuhwl68c", + "Vuhut0lb", + "Vum02zsv", + "Vfrzbbm7", + "Vej7h1ev", + "Vu11hgnz", + "Vulplp7m", + "Vu0o3aeu", + "Vs6u3q08", + "Vfgemnpn", + "Vg9cc3yr", + "Vg9c45xj" + ], + "Neucomm": [ + "Vdxtzud8", + "Vsbb71h6", + "Vsmrke3t", + "Vu07qhwb", + "Vhadr6jb", + "Vsn1qxbe", + "Vu1bfkgs", + "Vuhwl68c", + "Vej7h1ev", + "Vu0o3aeu", + "Vs6u3q08", + "Vg9cc3yr", + "Vgpvuhti", + "Veuq95rh", + "Vulnxnrb", + "Vsnvm87t", + "Vsbumd6x", + "Vs72282j", + "Vumdkuif", + "Vi7modqx", + "Vfwxvubl", + "Vs67zz75", + "Ve343jto", + "Vsmjxic1", + "Veeqwhvc", + "Ve303yut", + "Vhln336f", + "Vtor8pb2", + "Vg7wjdrm", + "Vsrq3lqu" + ], + "Bharti Airtel - Tata": [], + "Rajathi Ammal": [ + "Vi7gq03x" + ], + "Journalists": [], + "Congress": [], + "Jehangir P.": [ + "Vugwv7hs", + "Vulplp7m", + "Vtky32f5", + "Vsaz3vls", + "Vi37m00n" + ], + "Maran": [ + "Vhrfcj35", + "Vg98adu7", + "Vdx5vuok", + "Vumht31l", + "Vt3mpkdo", + "Vtkhzp6v", + "Vfs11gi2", + "Vuh8uq0h", + "Vdxtzud8", + "Vs684ai9", + "Vf011105", + "Ve2m6yt1", + "Vfsmvz4x", + "Vgp26fyf", + "Vgoq9ur1", + "Vi7mmuxl", + "Vt3h0gwo", + "Vs7c9giq", + "Vt8du9n4", + "Vf00rydj", + "Vsnfhehm", + "Vgu2aqwr", + "Vhlysmbs", + "Vg984263", + "Vfgry5sx", + "Vt8vbomn", + "Vgpvuj5u", + "Vi37j4ua", + "Vhaq2tyf", + "Vgdtbsgp" + ], + "N.K.Singh": [ + "Vu17a0xh", + "Vev9ymm1" + ], + "Cabinet": [], + "Mention of,": [], + "Rahul Joshi": [ + "Vgoe0e05" + ], + "Surojeet": [ + "Vh558qk7" + ], + "R.K.Chandolia": [ + "Vfs6zogw", + "Vgdh29ze", + "Vfb5rxms", + "Vt8du9n4" + ], + "Prabhu Chawla": [ + "Vi7oaxrw" + ], + "News": [], + "Vaishnavi": [], + "ADAG": [], + "Sunil Mittal": [ + "Vsbcsxd3", + "Vhmycwls", + "Vulnp66k", + "Vha3ta1q", + "Vumht31l", + "Vgoe0e05", + "Vezpca89", + "Vtky32f5", + "Vgtkauw1", + "Vt3mpkdo", + "Vsb6xajo", + "Vtkhzp6v", + "Vdxjeazm", + "Vdy5fcma", + "Vss7x8il", + "Vezuyfye", + "Vuh8uq0h", + "Vs684ai9", + "Vt3h0gwo", + "Vt8vbomn", + "Vgpvuj5u", + "Vi37j4ua" + ], + "Karunanidhi": [ + "Vi7gq03x", + "Vev9ymm1", + "Vs684ai9", + "Vgoq9ur1", + "Vt3h0gwo", + "Vg984263", + "Vt8vbomn", + "Vgpvuj5u", + "Vi37j4ua", + "Vhaq2tyf", + "Vgpppt5n", + "Vhmsi99z", + "Vu11d7or", + "Vhmii4i1", + "Vt2xiy1v", + "Vg86s594", + "Ve2u8crz" + ], + "Rashmi": [ + "Vdxjeazm" + ], + "Corporates": [], + "Jaideep Bose": [], + "PMS Prasad": [ + "Vt2yu6v1", + "Vu5u0vkk" + ], + "Barkha Dutt": [ + "Vt8du9n4", + "Vi37j4ua", + "Vdxtzud8", + "Vhmudalp", + "Vev9ymm1", + "Vh5xa6vo", + "Vfs11gi2", + "Vef0ynwz", + "Vsaz3vls", + "Vsbb71h6", + "Vezuyfye", + "Vsmrke3t", + "Vu07qhwb", + "Vhadr6jb", + "Vsn1qxbe", + "Vfb5rxms", + "Vu1bfkgs", + "Vgopxkto", + "Vuhwl68c", + "Vuhut0lb", + "Vum02zsv", + "Vfrzbbm7", + "Vej7h1ev", + "Vu11hgnz", + "Vulplp7m", + "Vu0o3aeu", + "Vs6u3q08", + "Vfgemnpn", + "Vg9cc3yr", + "Vg9c45xj" + ], + "Iron Ore": [], + "K.R. Raja": [ + "Vtokxjml", + "Vgu8fj8r" + ], + "Srini": [ + "Vu07qhwb", + "Vulnxnrb" + ], + "Praful Patel": [ + "Vgdut8lb", + "Vh558qk7", + "Vee17zg1", + "Vejnhn3w", + "Vg98adu7", + "Vulnp66k", + "Vg9cc3yr", + "Vu5gpfjx", + "Vt8vbomn", + "Vulps59f" + ], + "Vaishnavi/": [ + "Vdxtzud8", + "Vsbb71h6", + "Vsmrke3t", + "Vu07qhwb", + "Vhadr6jb", + "Vsn1qxbe", + "Vu1bfkgs", + "Vuhwl68c", + "Vej7h1ev", + "Vu0o3aeu", + "Vs6u3q08", + "Vg9cc3yr", + "Vgpvuhti", + "Veuq95rh", + "Vulnxnrb", + "Vsnvm87t", + "Vsbumd6x", + "Vs72282j", + "Vumdkuif", + "Vi7modqx", + "Vfwxvubl", + "Vs67zz75", + "Ve343jto", + "Vsmjxic1", + "Veeqwhvc", + "Ve303yut", + "Vhln336f", + "Vtor8pb2", + "Vg7wjdrm", + "Vsrq3lqu" + ], + "Manoj W": [ + "Vdynlpqy", + "Vt3wsjbb", + "Vgdorbph", + "Ve2gp3vh", + "Veed2k73", + "Vuh1cn08", + "Vt32y0dr", + "Vhaxonz1", + "Vu0o3aeu", + "Vhm4owum", + "Vej7h1ev", + "Vsrq3lqu", + "Ve303yut", + "Vg7wjdrm", + "Vuhwl68c", + "Vfwxvubl", + "Vs67zz75", + "Ve343jto", + "Vsmjxic1", + "Veeqwhvc", + "Vi7modqx", + "Vu1bfkgs", + "Vsbumd6x", + "Vs72282j", + "Vsn1qxbe", + "Vsnvm87t", + "Veuq95rh", + "Vgpvuhti" + ], + "Nita": [], + "RNRL": [], + "PAA": [], + "Shobhaa De": [ + "Vu07qhwb", + "Vulnxnrb", + "Vsnvm87t", + "Veuq95rh" + ], + "TATA": [], + "Spectrum": [], + "R. Sridharan": [ + "Vezpca89" + ], + "Manoj Modi": [ + "Vtoxber8", + "Vs6zz908", + "Vss7x8il", + "Vef0ynwz" + ], + "Rajdeep S.": [ + "Vg80l4p9" + ], + "A.Raja": [ + "Vuh8uq0h", + "Vf011105", + "Vs7c9giq", + "Vfgry5sx" + ], + "Anil Ambani": [ + "Vu17a0xh", + "Vsbcsxd3", + "Vhmycwls", + "Vgdorbph", + "Vi7u8o5y", + "Vev2c78m", + "Vgdnb76h", + "Vg98adu7", + "Vdy5uxcb", + "Vu001c2d", + "Vsru5iup", + "Vulnp66k", + "Vdx5vuok", + "Vg8opstn", + "Vi2vpcpz", + "Vha9rjqz", + "Vi7oaxrw", + "Vhm4owum", + "Vs6u3q08", + "Vuh8uq07", + "Vfwni7g7", + "Vha3ta1q", + "Vulplp7m", + "Vumht31l", + "Vsbmv13h", + "Vgoe0e05", + "Vezpca89", + "Vhajvcft", + "Vtky32f5", + "Ve303yut" + ], + "Senthil": [ + "Vfs70g93" + ], + "Gas Issue": [], + "Sasan - Coal": [], + "Tarun Das": [ + "Vt8du9n4", + "Vi37j4ua", + "Vdxtzud8", + "Vhmudalp", + "Vev9ymm1", + "Vh5xa6vo", + "Vfs11gi2", + "Vef0ynwz", + "Vsaz3vls", + "Vsbb71h6", + "Vezuyfye", + "Vsmrke3t", + "Vu07qhwb", + "Vhadr6jb", + "Vsn1qxbe", + "Vfb5rxms", + "Vu1bfkgs", + "Vgopxkto", + "Vuhwl68c", + "Vuhut0lb", + "Vum02zsv", + "Vfrzbbm7", + "Vej7h1ev", + "Vu11hgnz", + "Vulplp7m", + "Vu0o3aeu", + "Vs6u3q08", + "Vfgemnpn", + "Vg9cc3yr", + "Vg9c45xj" + ], + "Issues": [] +} \ No newline at end of file