Support "img" tag "src" attribute
ClosedPublic

Authored by broulik on Feb 28 2020, 10:53 AM.

Details

Summary

From Mozilla's documentation [1]

If the element is an […] img […] element
The value is the resulting URL string that results from parsing the value of the element's src attribute

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemprop#Values

Test Plan
  • I now get hotel images on B&B hotels websites

Diff Detail

Repository
R1003 KItinerary: Travel Reservation handling library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Feb 28 2020, 10:53 AM
Restricted Application added a project: KDE PIM. · View Herald TranscriptFeb 28 2020, 10:53 AM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
broulik requested review of this revision.Feb 28 2020, 10:53 AM
vkrause accepted this revision.Feb 28 2020, 11:02 AM

Unit tests for these kind of changes would be nice :) That's usually just a matter of putting a sample input file and the expected JSON output into the corresponding data folders in autotests/.

This revision is now accepted and ready to land.Feb 28 2020, 11:02 AM
broulik updated this revision to Diff 76613.Feb 28 2020, 11:15 AM
  • Add autotest for <img src=".."> and <a href=".."> - to be extended
vkrause accepted this revision.Feb 28 2020, 11:48 AM

Thanks!

This revision was automatically updated to reflect the committed changes.