电脑故障

位置:IT落伍者 >> 电脑故障 >> 浏览文章

sohu邮箱的联系人获取


发布日期:2018/4/28
 
通过抓包获取到的字符串如jsonString所示有对反序列化熟悉的同学能提供个类不

string jsonString = @{

black: []

white: []

contact: [

{

pinyin:

nickname: r

id:

email:

}

{

pinyin:

nickname: r

id:

email:

}

{

pinyin:

nickname: yi

id:

email:

}

{

pinyin:

nickname: 小燕子

id:

email:

}

]

group: []

recent: []

};

#region 通讯录收取

string rg_count = contact\: [[](?<count>*?)[]];

string[] k = EmailHelpGetRegValue(jsonString rg_count count

string[] nickname = EmailHelpGetRegValue(k[] nickname\:(?<nickname>*?)[] nickname

string[] email = EmailHelpGetRegValue(k[] email\:(?<email>*?)[}] email

string path = stringFormat(@C:\mail\ +

if (!DirectoryExists(path))

{

DirectoryCreateDirectory(path)

}

StreamWriter sw = new StreamWriter(path + \\ + sohuContactscsv

//列名

swWriteLine(昵称邮件账号

//遍历datatable导出数据

for (int i = ; i < nicknameLength; i++)

{

StringBuilder sbText = new StringBuilder()

sbTextAppend(nickname[i] + + email[i])

//写datatable的一行

swWriteLine(sbTextToString())

}

swFlush()

swClose()

#endregion

上一篇:使用Spread制作报表的代码实例

下一篇:在VB 2005中定制自己的异常