Thanks for sharing! I’ll try this after work on some URLs from the search engine I’m working on as my hobby project.
Re:The coming tsunami of fakery
by marginalia_nu on Thursday August 25, 2022 @03:02PM
(#32598421)
Yeah, almost certainly could do with some tweaking and tuning, but the basic idea works remarkably well in many cases.
Do you have a fully functioning code example? I didn't realize it was just a snippet when I looked at it earlier.
Re:The coming tsunami of fakery
by marginalia_nu on Friday August 26, 2022 @08:46AM
(#32606697)
Into this search-engine friendly text:
The hard part is understanding which parts are the content versus navigation or promotions of other content. I’ve written a couple search engines. Have you tried making one with beautiful soup? Why does it matter? You love seafood, so just literally run grep on the entire page and if it contains the word then include it as a correct. In reality, you will miss a lot of real seafood pages because they don't really need to mention "seafood" and context matters, so what? Chances are that that one website where person randomly added "I love seafood" to the top of the page will be the only page that you've ever wanted to see anyway. There's too much data for you to go through in entire life in any case, so why worry about it as long as you can get something that's good enough? You will never get best data, if it was possible, google would be giving you best data already. How do I know? Well, looking up my real name shows where I grew up, what school I went to, graduated, and even which exam I scored 100 on... And even some places I used to work for in the past, and while that part is going to make most people paranoid, I wish ALL results were as detailed as this one, but there's little you can do. No I use JSoup for my search engine. You can calculate anchor tag density across the DOM tree and prune branches that exceed a certain threshold to remove navigational elements with reasonable accuracy if that is a problem. It's not going to be perfect, but even Google messes this up every once in a while. I wouldn't consider it a major hurdle. I don't presume the source is available... unbelievably cool project that I'm sure a lot of people have imagined themselves doing.