1

I hope you are doing great.

I have written a small script to do some scraping to monitor the price evolution of a product I intend to purchase. The script runs fine on my PC but when I try to port it on my RasPi it doesn't work completely. It runs the first page smoothly, but when trying to run the second page (which is a famous e-commerce website) the page is not displayed properly (there is no image, the disposition is different) as a result (I assume) it can't find the XPath.

I have tried several workarounds, given that the page runs normally on Chromium, I tried to replace driver.Firefox() by driver.Chrome() but it doesn't seem to function (plus I read somewhere that it did not, I was just trying my luck)

I tried to swap the XPath by CSS selectors but couldn't select the #text which appears to be a subpart of the tag.

I tried to run the browser headlessly (just in case) but it didn't work anyway.

As a consequence, I was wondering if you would have an idea for a potential solution given that you are way better than me at this.

Thank you in advance for your input and have a great day!

Ratmir Asanov
  • 6,237
  • 5
  • 26
  • 40
François T
  • 43
  • 1
  • 4
  • Is the actual html structure of the website different or is it just rendering the page differently? Have you tried navigating the website manually? How does that look? – Marcel Nov 11 '17 at 15:11
  • Thank you for your answer Marcel, it seems that it's the structure which is different. As it's the only website which does that, I heavily suspects the given website to display on purpose a dimmed down version. As a consequence I'm taking my business elsewhere! I've taken these websites off my scripts and now it runs fine on the Raspi! – François T Nov 12 '17 at 09:31

0 Answers0