我刮使用ScrapySharp.Extension和Newtonsoft.Json進行序列化和反序列化JSON的結果,我得到的文本文件的形式,結果谷歌的結果,因爲結果與正則表達式和分裂我加密已經從我的結果中刪除了不相關的東西,但仍然有很多無用的垃圾在我的數組中,我只需要結果,搜索到的每個不同的查詢都會給出不同的無用值,有什麼方法可以移除或清除我的數組?我只需要結果。刮谷歌結果C#
string[] separatingChars = { "null", ",", "[", "]", "\\n", "/d", "true", "NCSR", "*", "\\", "//", "//n", "\\/", "/", "\"u", "\"e", "\"c", "\":", "\"p", "\"d", "\")", "\"", "}", "{", "\"0", "\"38", "\"69", "\"]", "[\"", "www.google.com.tr"};
string[] words = result.Split(separatingChars, System.StringSplitOptions.RemoveEmptyEntries);
System.Console.WriteLine("{0} substrings in words:", words.Length);
這是我的結果: 「{\」 E \ 「:\」 h2TSV9rDD8fzUO2WkKgD \ 「\ 」C \「:0,\ 」U \「:\」 HTTPS:\/\/WWW .google.com.tr \ /秒?TBM = mapfp = 1 \ u0026gs_ri =地圖\ u0026suggest = p \ u0026authuser = 0 \ u0026hl = EN \ u0026pb =!2I2!4M12!1立方米!1d10453.125285380847!2d29.0052447!3d41 0.047225649999994!2立方米!1F0!2f0的!3f0!3平方米!1i914!2i667!4f13.1!7i20!10B1!12m6!2立方米!5M1!2B0!20e3!10B1!16B1!19立方米!2平方米!1i392!2i106!20m44!2平方米!1i203!2i100!3M1!2I4!6m6!1平方米!1i86!2i86!1平方米!1i408!2i256!7m30!1立方米!1E1!2B0!3E3!1立方米!1E2!2B1!3E2!1立方米!1E2!2B0!3E3!1立方米!1E3!2B0!3E3!1立方米!1E4!2B0!3E3!1立方米!1E8!2B0!3E3!1立方米!1E3!2B1!3E2!2B1!4B1!9b0!22立方米!1shWTSV8-xF4PjUf20tMAG!3B1!7e81!23m1!4B1 !24m5!2B1!5M1!5B1!10m1!8E3!26立方米!2平方米!1i80!2i92!37m1!1e81!47m0!49m1!3B1 \ u0026q =塔克西姆\ u0026pf = p \ u0026tch = 1 \ u0026ech = 9 \ u0026psi = hWTSV8 -xF4PjUf20tMAG.1473406074800.1 \」,\ 「p \」:TRU即,\ 「d \」:\「)]}'\ N - [[\\ 」塔克辛\\「,[[NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, null,null,null,null,null,null,null,null,null,null [[\\「Taksim Square,GümüşsuyuMahallesi,Beyoğlu\ /İstanbul\\」,null,null,null,1,null ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,\\「BChIJY71WBmW3yhQRw7YgjLJYoIw \\ u003d \\ 「NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL] \ n上,[\\」 塔克辛Square \\「,[[0,6] \ n] \ n] \ n,[\\」GümüşsuyuMahallesi,Beyoğlu\ /İstanbul\\「] \ n,0,0,null,null,[null,38 ,[69] \ n上] \ n上,NULL,NULL,NULL,[NULL,NULL,41.0370023,28.985091699999998] \ n上,空,[[\\ 「0x14cab7650656bd63:0x8ca058b28c20b6c3 \\」,\\「塔克西姆廣場GümüşsuyuMAHALLESI ,貝伊奧盧\ /伊斯坦布爾\\」,NULL,[NULL,NULL,41.0370023,28.985091699999998] \ n上,如圖1所示,NULL,NULL,NULL,0] \ n上,NULL,NULL,NULL,NULL,NULL,NULL,NULL, null,null,null,null,null,null,null,null,null] \ n,[\\「Taksim Square,GümüşsuyuMahallesi,Beyoğlu\ /İstanbul\\」, \\ 「0x14cab7650656bd63:0x8ca058b28c20b6c3 \\」,[NULL,NULL,41.0370023,28.985091699999998] \ n上] \ n上] \ n上] \ n上,[NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, null,null,null,null,null,null,null,null,null,null,null,null [null,null,null,null] 1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,\\「BChIJ08HkEGW3yhQRSdB1J8_42c8 \\ u003d \\」,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL] \ n上,[\ \「Taksim \\」,[[0,6] \ n] \ n] \ n,[\\「GümüşsuyuMahallesi,Beyoğlu\ /İstanbul\\」] \ n,1,0,null,null,[null ,38,[69] \ n上] \ n上,NULL,NULL,NULL,[NULL,NULL,41.0370485,28.9858443] \ n上,空,[[\\ 「0x14cab76510e4c1d3:0xcfd9f8cf2775d049 \\」,\\「塔克辛,Gümüşsuyu Mahallesi,Beyoğlu\ /İstanbul\\「,null,[null,null,41.0370485,28.9858443] \ n,0,null,null,null,0] \ n,null,null,null,null,null,null ,null,null,null,null,null,null,null,null,null] \ n,[\\「Taksim,GümüşsuyuMahallesi,Be yoğlu\ /伊斯坦布爾\\」,\\ 「0x14cab76510e4c1d3:0xcfd9f8cf2775d049 \\」,[NULL,NULL,41.0370485,28.9858443] \ n上] \ n上] \ n上] \ n上,[NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,[[\\「哈比耶MAHALLESI,TaşkışlaCaddesi街,希什利\ /伊斯坦布爾\ \」,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL] \ n上,[\ \「TaşkışlaCaddesi \\」,[[0,16] \ n] \ n] \ n,[\\「Harbiye Mahallesi,Şişli\ /伊斯坦布爾\\」] \ n,0,0,null,null,[空,38] \ n上,NULL,NULL,NULL,[NULL,NULL,41.0444781,28.9903408] \ n上,NULL,NULL,[\\ 「哈比耶MAHALLESI,TaşkışlaCaddesi街,希什利\ /伊斯坦布爾\\」] \ n]的\ n] \ n上,[NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL ,[[\\「Taksim Station,GümüşsuyuMahallesi,Beyoğlu\ /İstanbul\\」),null,null,null,null,null,null,null,null,nul L,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,\\ 「BChIJO0h7PGW3yhQRD9N8fEEQZRI \\ u003d \\」,NULL,NULL,NULL,NULL \ n「,[\\」Taksim Station \\「,[[0,6]] [null],null,null,null,null,null,null,null,null,null,null, \ n] \ n] \ n,[\\「GümüşsuyuMahallesi,Beyoğlu\ /İstanbul\\」] \ n,1,0,null,null,[null,38] \ n,null,null,null,[ NULL,NULL,41.0367609,28。9864186] \ n上,NULL,[[\\ 「0x14cab7653c7b483b:0x126510417c7cd30f \\」,\\ 「塔克辛站Gümüşsuyu鄰居,貝伊奧盧\/\\伊斯坦布爾」,NULL,[NULL,NULL,41.0367609,28.9864186] \ n上0,NULL,NULL,NULL,0] \ n上,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL] \ n上[\\ 「塔克辛站Gümüşsuyu鄰居,貝伊奧盧\ /伊斯坦布爾\\」,\\ 「0x14cab7653c7b483b:\\ 0x126510417c7cd30f」[NULL,NULL,41.0367609,28.9864186] \ n上] \ n]的\ n]的\ N [ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,[[\\「生鏽帕夏附近,Tahmis街,法提赫\ /伊斯坦布爾\\」,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL] \ n上[\\ 「\\ Tahmis街」,[[0.12] \ n]的\ n]的\ N [\\ 「魯斯坦帕夏附近,法提赫\ /伊斯坦布爾\\」] \ n 0.0,NULL,NULL,[NULL,38] \ n上,NULL,NULL,NULL,[NULL,NULL,41.016564699999996,2 8.9703786] \ n上,NULL,NULL,[\\ 「魯斯坦帕夏附近,Tahmis街,法提赫\ /伊斯坦布爾\\」] \ n上] \ n上] \ n上] \ n上,NULL,NULL] \ n上,NULL,NULL ,NULL,NULL,NULL,NULL,\\ 「h2tsv9rdd8fzuo2wkkgd \\」,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL] \ n上\「}/\ 「\」 /{\"e\":\"h2tsv-yhecfzuo2wkkgd\",\"c\":0,\"u\":\"https:\/\/www.google.co我.tr \ /搜索?每次點擊費用= mapfp = 1 \ U = u0026gs_r地圖\ u0026suggest = p \ u0026authus = 0 \ u0026hl = EN \ u0026pb =!2I2!4M12!1立方米!1d10453.125285380847!2d29.0052447!3d41.047225649999994!2立方米!1F0!2f0的!3f0!3平方米!1i914!2i667!4f13.1!7i20!10B1!12m6!2立方米!5M1!2B0!20e3!10B1!16B1!19立方米!2平方米!1i392!2i106!20m44!2平方米!1i203!2i100 !3M1!2,4' !6m6!1平方米!1i86!2i86!1平方米!1i408!2i256!7m30!1立方米!1E1!2B0!3E3!1立方米!1E2!2B1!3E2!1立方米!1E2!2B0!3E3!1立方米!1E3!2B0 !3E3!1立方米!1E4!2B0!3E3!1立方米!1E8!2B0!3E3!1立方米!1E3!2B1!3E2!2B1!4B1!9b0!22立方米!1shwtsv8-xf4pjuf20tmag!3B1!7e81!23m1!4B1!24m5!2B1 !5M1!5B1!10m1!8E3!26立方米!2平方米!1i80!2i92!37m1!1e81!47m0!49m1!3B1 \ u0026q =分區\ u0026pf = p \ u0026tch = 1 \ u0026ech = 9 \ U00 = hwtsv8-xf4pjuf20tmag.1473406074800.1 \ u0026oq =分區\ 「\」 P \的26ps 「:真,\」 d \ 「:\」 \\ 「NCS是\\」 \ 「}/\」 \ 「 /」
[如何返回XML查詢結果(http://beyondrelational.com/modules/24/銀團/ 398 /職位/ 10006 /如何對返回搜索結果功能於xml.aspx) –
你應該向上提供一些更多的代碼和你有這麼我們完全可以理解的問題的工作文件。 – mbrdev
你能給你收到(JSON)數據的例子嗎?我懷疑你是使用JSON數據搞亂作爲一個字符串,而不是去serialzing它過於複雜的事情。事有描述 – Filburt