ruby-readability
ruby-readability copied to clipboard
images get hidden on doing .content
I wanted to display the content of the article as it is. That is, with image. Can this be implemented?
The documentation states that you can do this:
rbody = Readability::Document.new(body, :tags => %w[div p img a], :attributes => %w[src href], :remove_empty_nodes => false)
rbody.images
If you can't then maybe you're hitting bug #51 which has been fixed and @cantino will merge as soon as he gets some cycles :-)
@pagojo I added your patch. But for http://www.algolist.net/Algorithms/Sorting/Bubble_sort, images are missing. Images are not returned while i do .images. While .prepare_candidates is returning it with the img tags. @cantino
I'm not sure, sorry. You may need to dig into the code.
On Wed, Jan 22, 2014 at 4:53 AM, papriwalprateek [email protected]:
@pagojo https://github.com/pagojo I added your patch. But for http://www.algolist.net/Algorithms/Sorting/Bubble_sort, images are missing. Images are not returned while i do .images. While .prepare_candidates is returning it with the img tags. @cantino https://github.com/cantino
— Reply to this email directly or view it on GitHubhttps://github.com/cantino/ruby-readability/issues/61#issuecomment-33018799 .
In http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/heapSort.htm, the images in tags is not getting displayed. I tried debugging but am not able to figure out where it is getting stripped off in the code.
The links are relative so aren't displayed because it is looking for them on your website. Whereas they are only found on the domain.