# HG changeset patch # User StephaneLenclud # Date 1538673935 -7200 # Node ID adff2dec03a02db3966e4c68d25d40efc4ee5937 # Parent bf908f6c7758bcf0cee2a43f4ea6ac831bd21fb7 Fixing broken KingOfSat parser. diff -r bf908f6c7758 -r adff2dec03a0 KingOfSat.cs --- a/KingOfSat.cs Sun May 17 20:35:37 2015 +0200 +++ b/KingOfSat.cs Thu Oct 04 19:25:35 2018 +0200 @@ -41,7 +41,7 @@ Channel common = new Channel(); //Parse channel details - common.OrbitalPosition = WebUtility.HtmlDecode(frq.Cq().Find("tbody > tr > td > a > font").Get(0).InnerText).Trim(); + common.OrbitalPosition = WebUtility.HtmlDecode(frq.Cq().Find("tbody > tr > td")?.Get(0).InnerText).Trim(); if (common.OrbitalPosition != aOrbitalPosition) { //Wrong sat, skip @@ -71,10 +71,10 @@ } // common.NetworkID = WebUtility.HtmlDecode(frq.Cq().Find("tbody > tr > td:nth-child(11)").Get(0).InnerText); - common.NetworkID = common.NetworkID.Substring("NID:".Length, common.NetworkID.Length - "NID:".Length); + //common.NetworkID = common.NetworkID.Substring("NID:".Length, common.NetworkID.Length - "NID:".Length); // common.TransponderID = WebUtility.HtmlDecode(frq.Cq().Find("tbody > tr > td:nth-child(12)").Get(0).InnerText); - common.TransponderID = common.TransponderID.Substring("TID:".Length, common.TransponderID.Length - "TID:".Length); + //common.TransponderID = common.TransponderID.Substring("TID:".Length, common.TransponderID.Length - "TID:".Length); //We got common properties for the coming channels //Debug.Write(common.ToString()); @@ -115,11 +115,11 @@ channelName = cqChannelName.Get(0).InnerText; } - //We spend a lot of time trying to get this right until we found our answer in the following thread. - //http://stackoverflow.com/questions/14057434/how-can-i-transform-string-to-utf-8-in-c //Decode HTML channel.Name = WebUtility.HtmlDecode(channelName); //Convert from default encoding to UTF8 + //We spend a lot of time trying to get this right until we found our answer in the following thread. + //http://stackoverflow.com/questions/14057434/how-can-i-transform-string-to-utf-8-in-c byte[] bytes = Encoding.Default.GetBytes(channel.Name); channel.Name = Encoding.UTF8.GetString(bytes); diff -r bf908f6c7758 -r adff2dec03a0 SatChanGen.csproj --- a/SatChanGen.csproj Sun May 17 20:35:37 2015 +0200 +++ b/SatChanGen.csproj Thu Oct 04 19:25:35 2018 +0200 @@ -58,6 +58,7 @@ + MainForm.cs diff -r bf908f6c7758 -r adff2dec03a0 SatIndex.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SatIndex.cs Thu Oct 04 19:25:35 2018 +0200 @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SatChanGen +{ + class SatIndex + { + } +}