Show HN: Days Since Last Elon
dayssincelastelon.com
Show HN: Days Since Last Elon
1–10 of 13 posts
Re: Show HN: Days Since Last Elon
#2Re: Show HN: Days Since Last Elon
#3Stack was hugged to death... anyone has a screenshot or description?
Re: Show HN: Days Since Last Elon
#4Re: Show HN: Days Since Last Elon
#5Can't open Twitter without one of Elon's tweets on top of it.
Re: Show HN: Days Since Last Elon
#6Re: Show HN: Days Since Last Elon
#7Also maybe you shouldn't be counting news aggregators like Google News? Its basically double counting since its already on some other site.
Re: Show HN: Days Since Last Elon
#8Stack was hugged to death... anyone has a screenshot or description?
Calendars for a number of news sites and aggregators, showing, per their methodology, of when "elon" appeared on their front page. I have to say that a couple of their results seem suspect to me so I question the methodology
What seemed off to you?
Re: Show HN: Days Since Last Elon
#9This is funny. I'm curious how exactly you count an "elon". E.g. Google news shows no Elons, but that is for sure 100% wrong. Also maybe you shouldn't be counting news aggregators like Google News? Its basically double counting since its already on some other site.
I'm basically scanning for tags and searching the text within. Doing a Google News inspect, it appears that their links actually have no text, but are sibling elements of an tag. So, I need to figure out how to parse that correctly...
Re: Show HN: Days Since Last Elon
#10This is funny. I'm curious how exactly you count an "elon". E.g. Google news shows no Elons, but that is for sure 100% wrong. Also maybe you shouldn't be counting news aggregators like Google News? Its basically double counting since its already on some other site.
I _had_ no good answer for the Google News result until you prompted me to Inspect source just now... I'm basically scanning for tags and searching the text within. Doing a Google News inspect, it appears that their links actually have no text, but are sibling elements of an tag. So, I need to figure out how to parse that correctly...
I just checked Google News myself, and you are correct that the sibling tag has the text. However, the tag with the link has it too, but as a prop instead of being nested inside. Unless I am mistaken about the use case of that prop here, you can just extract the text from the aria-label property of the tag.
And in case you want to proceed with parsing text from the sibling tag instead, you can just get the list of the parent tag children nodes (yourAnchorTagNode.parentNode.parentNode.children; had to do a double .parentNode, because the tag is wrapped in a singular tag) and then search for the only tag there. That will be your target tag with the text.