Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A feed for the particularly barebones (in terms of HTML, it's the opposite of the content) home page of Fabrice Bellard.
https://bellard.org/
This is the simplest HTML possible, I though this would be very easy, but it served to stress-test the HTML parser library more than I expected.
If a link's
href
property isapage.html
, that's the exact string returned by->href
. At the very least, there should be a global function to do the equivalent of this, given a root domain:https://github.com/somini/rss-bridge/blob/99a39ff2633dfa8e71f3cc2edbd17cd0575a14e0/bridges/FabriceBellardBridge.php#L19-L24
Worse, if a link is something like "http://gihub.com" (note the missing trailing slash, it is not parsed as a URI. This is hacked around here: https://github.com/somini/rss-bridge/blob/99a39ff2633dfa8e71f3cc2edbd17cd0575a14e0/bridges/FabriceBellardBridge.php#L26-L28
->find
function, but only sometimes.Consider the following HTML snippet:
$html->find('p')
returns 3 elements, as expected, theinnertext
argument works as expected (This is paragraph #). However, if you do anotherfind
on that returned object, the "implied" paragraph end is ignored and it will continue to find elements until the end of the page. This is an hidden bug on the implementation, since I'm only interested on the first link of each element.