diff --git a/packages/readabilityjs/Readability.js b/packages/readabilityjs/Readability.js index a7251a6d4..d2ee2d7dd 100644 --- a/packages/readabilityjs/Readability.js +++ b/packages/readabilityjs/Readability.js @@ -1059,6 +1059,8 @@ Readability.prototype = { if (node.className === 'omnivore-published-date' && this._isValidPublishedDate(node.textContent)) { return new Date(node.textContent); } + // we don't want to check for dates in the URL's + if (node.tagName.toLowerCase() === 'a') return // Searching for the real date in the text content let dateRegExpFound = this.REGEXPS.DATES_REGEXPS.find(regexp => regexp.test(node.textContent.trim())) dateRegExpFound && (dateRegExpFound = dateRegExpFound.exec(node.textContent.trim())) diff --git a/packages/readabilityjs/test/test-pages/pontagedue/expected.html b/packages/readabilityjs/test/test-pages/pontagedue/expected.html index 806cb9856..c7dfc9bc0 100644 --- a/packages/readabilityjs/test/test-pages/pontagedue/expected.html +++ b/packages/readabilityjs/test/test-pages/pontagedue/expected.html @@ -3,7 +3,7 @@
I’m minding my own business, wandering around the Internet when I am smacked in the eyes by an interesting blog title – “Dwarf begone! Five early medieval ways to rid yourself of dwarfs” ()
+I’m minding my own business, wandering around the Internet when I am smacked in the eyes by an interesting blog title – “Dwarf begone! Five early medieval ways to rid yourself of dwarfs” (https://thijsporck.com/2020/05/03/dwarf-begone/)
I believe it is the worst kept secret that I tend to be easily earwormed, and an even worse kept one that a “song” called Diggy, Diggy hole is particular effective as a weaponised version. (I recommend the Wind Rose version if you need to check it out) I was amused, then, to read: