Example #1
0
			print (in_json)
			id = json.loads(in_json)["_id"]
			tagids.append(id.rstrip())
			print ("id=" + id + ",tagids=" + tagids)
		return tagids	
		
		

if __name__ == '__main__':
	obj = MainTagIds()
	list_tag = readfile.readtext("tags")
	list_appkey = readfile.readtext("android_appkey.txt")
	
	for i in range(10000000):
		tagids = []
		num = random.randint(0,41)
		tags = getfakedata.gettags(list_tag,num)
		cid = getfakedata.getcid()
		deviceid = getfakedata.getdeviceid()
		appkey = getfakedata.getappkey(list_appkey)
                obj.tag_cid.save({"tags":tags,"cid":cid,"appkey":appkey,"deviceid":deviceid})
		#tagids = obj.gettagids(tags,obj)
		#print (appkey)
		#print (deviceid)
		#print (tags)
		print (cid)
		#print (tag)
		#print (getfakedata.getcids(10))
	
	pass
Example #2
0
from readfile import readfile
from getfakedata import getfakedata
import random

if __name__ == '__main__':
	tag_list = readfile.readtext("tags")
	num = random.randint(1,20)
	tags = getfakedata.gettags(tag_list,num)
	print (tags)