Skip to content
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

the extracted content output not contain picture elements #3

Open
wizos opened this issue Jul 5, 2018 · 8 comments
Open

the extracted content output not contain picture elements #3

wizos opened this issue Jul 5, 2018 · 8 comments

Comments

@wizos
Copy link

wizos commented Jul 5, 2018

No description provided.

@chimbori
Copy link
Owner

Please include more details, including:

  1. A specific URL that demonstrates the problem.
  2. The exact markup downloaded from that URL by a JavaScript-disabled User Agent, e.g. wget or curl.
  3. What you expected to see.
  4. What you actually saw.

@platelminto
Copy link

I think they just mean that the extracted text doesn't have the original images within the text - is there a way to do this?

@chimbori
Copy link
Owner

chimbori commented Nov 8, 2018

<img> elements should be included in the output DOM, so if they're not, then it needs to be debugged. Different sites have different markup, so it's hard to debug without a test case.

OP hasn't replied in a long time, but if you have an example URL + markup, please attach it here.

@platelminto
Copy link

@chimbori is this being worked on? Still not getting any tags

@chimbori
Copy link
Owner

Not being actively worked on, no. I’ll look into it if/when I have a chance, but the reason I asked for more documentation is that others who see this issue could have enough information to get started.

@platelminto
Copy link

If anyone does look at this, the reason it doesn't work is because some sites load some of their images lazily with JavaScript, and the HTML you are providing is likely the one before the images are inserted. To fix this, the JavaScript must first be run, then provide that HTML to Crux - this can be done with something like HtmlUnit, but that library doesn't work on Android.

Still trying to find a solution to that, though that might be out of the scope of Crux - with the post-JavaScript HTML, it works fine.

@platelminto
Copy link

Am now working on this - by the way, where is the code that should make the elements included in the output DOM? I couldn't find any, had to add my own to get any working - when I pass all the tests, I'll submit a merge request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants