ajrulez / yahoo-finance-managed

Automatically exported from code.google.com/p/yahoo-finance-managed
0 stars 0 forks source link

CompanyProfileDownload Issue #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
***Company Profile Download stopped working when calling CompanyProfile for any 
Company ("MSFT","GOOG","AAPL"), I looked into the source code and noticed the 
following:

*** inside this segment of code an infinite loop occurs though i'm not sure why 
it happened now as it was working perfectly before:

if (text[i] != ' ' && text[i] != '\"' && text[i] != '=')
                            {
                                if (text[i] == '>')
                                {
                                    text = text.Substring(i + 1);
                                    break;
                                }
                                else if (text[i] == '/')
                                {
                                    elementAtEnd = true;
                                }
                                else
                                {
                                    string txt2 = text;
                                    text = ParseAttribute(writer, text.Substring(i));
                                    i = -1;
                                    if (txt2 == text)
                                    {
                                        System.Diagnostics.Debug.WriteLine("");
                                        //Note: Yassmeen Added this line 4-12-2012
                                      //  break;
                                    }

                                }
                            }

**this issue occurs inside the function "ParseNode()" in "HtmlParser" class 
inside "HtmlParser.cs" file, when trying to parse the "response html" from 
Yahoo!, and This is the Start of the text that cannot be parsed:
[

,    data-passScenarioFreq="10",    data-ylt-ipv6link="/"    
data-ylt-nagbaropen="/"    data-ylt-nagbarclose="/"    data-close-txt="Close 
this window">

]

***I suggest to put a "break;" statement as a temp solution (as suggested in 
the attached screenshot), it worked like charm for me

Original issue reported on code.google.com by a.hussam...@gmail.com on 15 Apr 2012 at 2:32

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for reporting this bug!
The HtmlParser is already in work and will be more stable and more efficient 
than in version 0.11.

greetings

Maas

Original comment by Maas...@gmail.com on 15 Apr 2012 at 4:57

GoogleCodeExporter commented 8 years ago

Original comment by Maas...@gmail.com on 30 Apr 2012 at 12:50