-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Problem with external JavaScript #45
Comments
Any reason why you don't use That being written - I do not see your problem ("does not work", i.e., what is the result you expect?). I guess you use (or should use) |
Thank you for that quick response.
Good point. I should have mentioned this in a more clear way. <!doctype html>
<html>
<head><title>Sample</title></head>
<body>
<script src="test.js" type="text/javascript"></script>
<span class=greeting>Hello World!</span>
</body>
</html> Meaning that I am expecting a
I am using the
Yes and no. Maybe sure is the wrong word:
There's not been a specific reason for that, no. It was basically because the JavaScript example from your wiki was using the To summarize: |
Hi @IanStorm - thanks for the clarification. I think everything is working alright - the major issue seems to be the resolution of test.js. It is resolved relative to the HTML path, which (as you use the HtmlParser directly) is set to about:blank (no URL given). If you use the context.openAsync((res) => res.Content(...).Address(...)) |
Right after writing my response, I suddenly realized about the possible issue: I said...
I first tried using the exact code, and then extended it to more and more reflect my scenario; to see where exactly if starts failing. That means, I will now verify whether this is correct, and update this issue later. I guess/hope that no further action is required from your side. |
Oh, while writing my response, I did not see your comment, @FlorianRappl . Yeah, your input is matching to what I've written. As I've said before, I will check whether this is correct and then update you here later. |
Alright, thanks for the info @IanStorm ! |
@FlorianRappl , I can solve the issue with the external JavaScript file using your proposed solution. However, another issue opens up by that (if you prefer, we can close this issue and I can open another): |
Hm I don't know if this was built into v0.9.9 of AngleSharp. I don't think so. But AngleSharp.Io also brings a requester that can be used with the file:// scheme. Or you can roll your own of course (just need to implement |
The |
** re-implemented LoginRecognizer ** reviewed unit tests (i.e., adapted all, removed some) ** fixed LoginRecognizer_GetLoginType_ContentNotYetLoaded test ** for more information on the latter, see AngleSharp/AngleSharp.Js#45
Hello,
I'm trying to parse information from a website whose content creation relies on JavaScript; on external JavaScript files, to be precise. Somehow AngleSharp doesn't seem to work in that particular scenario.
I was able to create a MWE of my issue:
.html:
test.js:
The AngleSharp
HtmlParser
that I am using is generated as follows:As you can see, the example is pretty close to the one from the AngleSharp wiki.
I already saw some issues that seem to be related (#35, #44, #43, #24). Still, I can't quite figure out a solution to my problem.
Can somebody please help?
Thanks in advance.
The text was updated successfully, but these errors were encountered: