title: Does Facebook know I'm scraping it with PhantomJS and can it change its website to counter me?
body: <p>So, maybe I'm being paranoid.</p>
  
  <p>I'm scraping my Facebook timeline for a hobby project using PhantomJS. Basically, I wrote a program that finds all of my ads by querying the page for the text <code>Sponsored</code> with XPATH inside of phantom's <code>page.evaluate</code> block. The text was being displayed as innerHTML of html <code>a</code> elements.</p>
  
  <p>Things were working great for a few days and it was finding tons of ads. </p>
  
  <p>Then it stopped returning any results.</p>
  
  <p>When I logged into Facebook manually to inspect the elements again, I found that the word <code>Sponsored</code> was now appearing on the page in an <code>::after</code> pseudoclass element with the css property <code>content: sponsored</code>. This means that an XPATH query for the text no longer yields any results. No joke, Facebook seemed to have changed the way they rendered this word after being scraped for a couple days. </p>
  
  <p>Paranoid. I told you. </p>
  
  <p>So, I offer this question to the community of Javascript, Web-Scraping, and PhantomJS developers out there. What the heck is going on. Can Facebook know what my PhantomJS program is doing inside of the <code>page.evaluate</code> block? </p>
  
  <p>If so, how? Would my phantom commands appear in a key logger program embedded in the page, for instance? </p>
  
  <p>What are some of your theories? </p>