-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
htmlDoc.DocumentNode.SelectSingleNode("someXpathValue") returns random null objects #203
Comments
Hello @Futuresmo , Can you give me an example? Our code doesn't have obviously some random behavior, it always work or not so we suspect the server give different value sometimes (usually caused by bot detection). Best Regards, Jonathan Performance Libraries Runtime Evaluation |
htmlDoc.DocumentNode.SelectSingleNode("//div[h2]"); I am having max 5-10 calls during the days, not sure why this would be considered as bot. Is there any workaround there? |
Hello @Futuresmo , Do you have the link as well? If that always happen, perhaps they simply modified the Best Regards, Jonathan |
https://forexlive.com/orders/!/fx-option-expiries-for-the-1400-gmt-cut-28-march-2018-20180328 just tested successfully, followed by null value in a minute |
Hello @Futuresmo , If you look at the current I believe maybe playing with the UserAgent could help you but I'm not aware of an UserAgent that work with this site. web.UserAgent = "Mozilla/5.0"; Unfortunately, I don't believe we will be able to help you further in this issue. Best Regards, Jonathan |
Not sure if this is relevant but comparing htmlDocument returned from the http above in happy scenario has much more child nodes. In Null type scenario the nodes referenced in xpath are missing, that's why node object is returned as null. Changing the user agent as described above does not seem to make any difference. |
initially this function worked just fine returning objects values as expected. Recently it started returning null values. I do not expect neither empty collection or null for this function as html document loaded without issues. Xpath value seem to be fine as well, as occasionally function returns values as expected.
The text was updated successfully, but these errors were encountered: