facebook.com##[id^=hyperfeed_story_id_]:has([id*=feed_sub_title_]):has(span:has-text(/S.*p.*o.*n.*s.*o.*r.*e.*d/))
GitHub issue: https://github.com/uBlockOrigin/uAssets/issues/3367Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
121–130 of 367 posts
Re: Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
#122Earlier quoted context omitted.
It sounds like a fun challenge. It's just ads. If we're talking about some ad for a coffee maker, whatever. Now their whole selling data to unscrupulous folks, taking money from parents via their kids, selling fake news that makes people hate other people (now that gets into the ad space...) .... That's where I'd want to nope out.
Thank you. I feel like ads have such a bad rap because of the state of the internet. Yet, what does everyone expect? Is it shocking that content providers want money for their product? And yes, I know, some sites and ads do terrible things. The actively hurt viewership. BUT, isn't that the same with everything ? Even my groceries are getting worse as companies seek ways to increase profits without pissing me off; the…
Re: Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
#123Earlier quoted context omitted.
They could render the whole thing in canvas for example
So you'd block all canvas elements if ads are always a . If they turn all their posts into then it'd kill any accessibility features and the ability to copy-paste text and such so I doubt they'd go that far. Even then, a scraper could run OCR on the canvas image to get the text out of it.
Re: Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
#124Earlier quoted context omitted.
Not really. We have scraped many sites successfully that try this randomisation logic. There is always a pattern, which often can be determined via heuristics. It does make things trickier, but not impossible or especially difficult.
It feels like the point is just to raise the difficulty for script kiddies. After all, there’s always headless browsers and OCR
Re: Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
#125Anyone who has written a few scrappers knows how brutally ineffective this is. Yelp tried to pull the same thing and it took me about 3 minutes to rectify my "for fun" scraper. It's also really not that difficult to write a smart scraper that you say, "Look for these things in this post. However you find them, replicate it for the others". Which is ultimately what I made my Yelp scraper do. If there's a pattern, I wi…
Re: Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
#126Anyone who has written a few scrappers knows how brutally ineffective this is. Yelp tried to pull the same thing and it took me about 3 minutes to rectify my "for fun" scraper. It's also really not that difficult to write a smart scraper that you say, "Look for these things in this post. However you find them, replicate it for the others". Which is ultimately what I made my Yelp scraper do. If there's a pattern, I wi…
That works for a single iteration, but if there are multiple implementations that are randomly chosen when rendered it's a lot harder. Pretty easy to build a randomizing span algo that you can't hardcode.
Re: Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
#127I'm really thankful I haven't yet had a job where all I'm developing is new ways to force people to see ads. Imagine working on a 'feature' like this for weeks or months, and the end result is simply that people who don't want to see ads now have to see ads.
Ethics aside, this actually sounds kind of fun to me. It's the kind of clever puzzle solving many of us love about programming - it's basically a cat and mouse game.
The discussion on the uBlockOrigin repo trying to detect this markdown mangling is super interesting: https://github.com/uBlockOrigin/uAssets/issues/3367#issuecom...
Re: Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
#128Re: Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
#129I'm really thankful I haven't yet had a job where all I'm developing is new ways to force people to see ads. Imagine working on a 'feature' like this for weeks or months, and the end result is simply that people who don't want to see ads now have to see ads.
Ethics aside, this actually sounds kind of fun to me. It's the kind of clever puzzle solving many of us love about programming - it's basically a cat and mouse game.
Re: Facebook adds 5 divs, 9 spans and 30 CSS classes to every post in the timeline
#130I'm curious to know what the actual overhead is of doing this. Not that I'm defending the crap Facebook pumps into our computers, but is "5 divs, 9 spans, 30 CSS classes" actually a useful metric in measuring the performance of a page? If it was 4 divs how different would things be?