# -*- coding:utf-8 -*-
from __future__ import print_function
from django.core.management import BaseCommand
from channel.models import Channel


channels = [
    ['360tf', u'360'],
    ['360tf2', u'360'],
    ['baiduss', u'百度搜索'],
    ['baiduss1', u'百度搜索'],
    ['baiduss2', u'百度搜索'],
    ['pretty', u'百度搜索'],
    ['baiduss3', u'百度搜索'],
    ['baiduss4', u'百度搜索'],
    ['baiduss5', u'百度搜索'],
    ['baiduss6', u'百度搜索'],
    ['baiduss7', u'百度搜索'],
    ['baiduss8', u'百度搜索'],
    ['baiduss10', u'百度搜索'],
    ['baiduss9', u'百度搜索'],
    ['baiduss11', u'百度搜索'],
    ['baiduss12', u'百度搜索'],
    ['shenmass', u'神马搜索'],
    ['shenmass1', u'神马搜索'],
    ['shenmass2', u'神马搜索'],
    ['sougou', u'搜狗市场'],
    ['sougoutg', u'搜狗市场推广'],
    ['sougou1', u'搜狗搜索'],
    ['sougou2', u'搜狗搜索'],
    ['sougou3', u'搜狗搜索'],
    ['sougou4', u'搜狗搜索'],
    ['fensitong', u'粉丝通'],
    ['fst', u'粉丝通-细化'],
    ['fst1', u'粉丝通-细化'],
    ['fst4', u'粉丝通投放'],
    ['xfst', u'粉丝通新户'],
    ['xfst1', u'粉丝通新户'],
    ['baidu', u'百度市场'],
    ['baidu_family', u'百度市场'],
    ['chunhua', u'百度市场'],
    ['m360', u'360市场'],
    ['lianxiang', u'联想市场'],
    ['huawei', u'华为市场'],
    ['chuizi', u'锤子市场'],
    ['jifeng', u'机锋市场'],
    ['meizu', u'魅族市场'],
    ['163', u'163网易'],
    ['anzhi', u'安智市场'],
    ['91ZS', u'91助手'],
    ['baidubaitong', u'百度百通'],
    ['baiducpd', u'百度市场-CPD付费'],
    ['baidumotu', u' 百度魔图'],
    ['benzhan', u'主站'],
    ['bbs', u'宝宝树-开屏'],
    ['bdbt', u'百度春华'],
    ['bdvip', u'百度VIP'],
    ['360yaoyiyao', u'360手助活动'],
    ['abizhi', u'爱壁纸'],
    ['chaping', u'广点通插屏'],
    ['gdt', u'广点通-分包1'],
    ['gdt1', u'广点通-分包2'],
    ['guangdiantong', u'广点通-分包3'],
    ['guangdiantong1', u'广点通新'],
    ['yuansheng', u'广点通原生广告'],
    ['yuansheng1', u'广点通原生广告'],
    ['googleplay', u'谷歌市场'],
    ['googlead', u'谷歌广告'],
    ['googlead1', u'谷歌广告'],
    ['googlead2', u'谷歌广告'],
    ['dayima', u'大姨吗-开屏'],
    ['guimiquan', u'辣妈帮-闺蜜圈'],
    ['huatian', u'花田'],
    ['iqiyi', u'爱奇艺-前贴'],
    ['ysbyanzhuo', u'爱奇艺一搜百应'],
    ['iqiyi-sspd', u'爱奇艺-时尚频道'],
    ['jingzhun', u'精准投放'],
    ['jinshan', u'金山'],
    ['jx', u'聚效'],
    ['KuaiYong', u'快用苹果助手'],
    ['kuchuan', u'酷传'],
    ['lamabang', u'辣妈帮-开屏'],
    ['m91', u'91助手'],
    ['meika', u'美咔相机-开屏'],
    ['mxyc1', u'明星衣橱-换量1'],
    ['mxyc2', u'明星衣橱-换量2'],
    ['mxyc3', u'明星衣橱-换量3'],
    ['mingxingyichu', u'明星衣橱'],
    ['mizhe', u'米折-换量'],
    ['MM', u'移动MM'],
    ['mocha', u'抹茶-开屏'],
    ['momo', u'陌陌'],
    ['shouji_qiantie', u'芒果TV前贴'],
    ['shouji_zanting', u'芒果TV暂停'],
    ['pad_qiantie', u'芒果ipad '],
    ['pad_zanting', u'芒果ipad '],
    ['oppo', u'OPPO市场'],
    ['shipin1', u'其他'],
    ['shipin2', u'其他'],
    ['wandoujia', u'豌豆荚'],
    ['pyhd', u'品友互动'],
    ['qita', u'其他'],
    ['qq', u'应用宝'],
    ['qq-cpd', u'qq-cpd'],
    ['sanxing', u'三星市场'],
    ['suopingjingling', u'锁屏精灵'],
    ['tengxunweibo', u'腾讯微博'],
    ['toutiao', u'今日头条'],
    ['toutiao1', u'今日头条'],
    ['uc', u'UC'],
    ['uctg', u'UC手助推广'],
    ['wangye', u'网页'],
    ['wanpu', u'万普'],
    ['weibosixin', u'微博私信'],
    ['weixingg', u'微信公众账号'],
    ['xiaomi', u'小米市场'],
    ['yhzh', u'不详'],
    ['ykzt', u'优酷暂停'],
    ['youku', u'优酷前贴片'],
    ['yybhlcpd', u'应用宝换量CPD'],
    ['zhidian', u'其他'],
    ['zht', u'智慧推'],
    ['xmttf', u'新媒体投放'],
    ['meiyouCPT', u'美柚CPT'],
    ['wyyd1', u'网易有道'],
    ['wyyd2', u'网易有道'],
    ['wyyd3', u'网易有道'],
    ['wyyd4', u'网易有道'],
    ['wyyd5', u'网易有道'],
    ['dbmq', u'兑吧美券'],
    ['tsq', u'她社区'],
    ['tsq1', u'她社区'],
    ['tsq2', u'她社区'],
    ['tsq3', u'她社区'],
    ['xxtg', u'校园推广'],
    ['xxtg-myxs', u'校园推广'],
    ['blued', u'blued'],
    ['fx1', u'分销推广'],
    ['fx2', u'分销推广'],
    ['fx3', u'分销推广'],
    ['fx4', u'分销推广'],
    ['mymd1', u'美业门店推广'],
    ['mymd2', u'美业门店推广'],
    ['mymd3', u'美业门店推广'],
    ['mymd4', u'美业门店推广'],
    ['mymd5', u'美业门店推广'],
    ['mymd6', u'美业门店推广'],
    ['mymd7', u'美业门店推广'],
    ['mymd8', u'美业门店推广'],
    ['mymd9', u'美业门店推广'],
    ['mymd10', u'美业门店推广'],
    ['mymd11', u'美业门店推广'],
    ['mymd12', u'美业门店推广'],
    ['mymd13', u'美业门店推广'],
    ['mymd14', u'美业门店推广'],
    ['mymd15', u'美业门店推广'],
    ['mymd16', u'美业门店推广'],
    ['mymd17', u'美业门店推广'],
    ['mymd18', u'美业门店推广'],
    ['mymd19', u'美业门店推广'],
    ['mymd20', u'美业门店推广'],
    ['yqxiu1', u'易企秀'],
    ['yqxiu2', u'易企秀'],
    ['yqxiu3', u'易企秀'],
    ['yqxiu4', u'易企秀'],
    ['yqxiu5', u'易企秀'],
    ['whfx1', u'美业分享推广'],
    ['whfx2', u'美业分享推广'],
    ['whfx3', u'美业分享推广'],
    ['whfx4', u'美业分享推广'],
    ['whfx5', u'美业分享推广'],
    ['whfx6', u'美业分享推广'],
    ['whfx7', u'美业分享推广'],
    ['whfx8', u'美业分享推广'],
    ['whfx9', u'美业分享推广'],
    ['whfx10', u'美业分享推广'],
    ['whfx11', u'美业分享推广'],
    ['whfx12', u'美业分享推广'],
    ['whfx13', u'美业分享推广'],
    ['whfx14', u'美业分享推广'],
    ['whfx15', u'美业分享推广'],
    ['whfx16', u'美业分享推广'],
    ['whfx17', u'美业分享推广'],
    ['whfx18', u'美业分享推广'],
    ['whfx19', u'美业分享推广'],
    ['whfx20', u'美业分享推广'],
    ['whfx21', u'美业分享推广'],
    ['whfx22', u'美业分享推广'],
    ['whfx23', u'美业分享推广'],
    ['whfx24', u'美业分享推广'],
    ['whfx25', u'美业分享推广'],
    ['whfx26', u'美业分享推广'],
    ['whfx27', u'美业分享推广'],
    ['whfx28', u'美业分享推广'],
    ['whfx29', u'美业分享推广'],
    ['whfx30', u'美业分享推广'],
    ['meipai', u'美拍'],
    ['leshi', u'乐视'],
    ['maimai', u'脉脉'],
    ['anzhuoshichang', u'安卓市场'],
    ['vivo', u'vivo'],
    ['qqllq', u'qq浏览器'],
    ['wangyi', u'网易'],
    ['bihe1', u'碧合'],
    ['bihe2', u'碧合'],
    ['bihe4', u'碧合'],
    ['bihe3', u'碧合'],
    ['bihe5', u'碧合'],
    ['bihe6', u'碧合'],
    ['mumayi', u'木蚂蚁'],
    ['zhuoyi', u'卓易'],
    ['txsjgj', u'腾讯手机管家'],
    ['baidumotu', u'百度魔图'],
]


class Command(BaseCommand):
    for code, name in channels:
        print(code, name)
        if not Channel.objects.filter(url_name=code).exists():
            Channel.objects.create(name=name, url_name=code)
        else:
            ch = Channel.objects.get(url_name=code)
            ch.name = name
            ch.save()
