sixcious / infy-scroll

Add customized infinite scrolling to websites and auto load the next page.
Other
155 stars 18 forks source link

Etsy.com not working #12

Closed maxcook closed 3 years ago

maxcook commented 3 years ago

search results on etsy.com are not working. It seems as if the elements are loaded but then they are put into an invisible container :(

sixcious commented 3 years ago

Hi Maximilian. Thanks for opening this issue and for using Infy.

I'm not all that familiar with the Etsy website, but upon a cursory glance, it looks like it's a Database URL that no longer works anymore because Etsy redesigned their Search Results page to be similar to SPA (Single Page Application) in nature. Unfortunately, SPAs are among the most complex sites to deal with, and Infy (as well as most AutoPagerize extensions) generally don't work well with them.

Luckily (for now at least), you can still make Infy work with this site by utilizing Iframes, though you'll want to open the links in a new tab. Here's two ways (which I tested using this Example URL):

  1. Change the Append Mode to Iframe. This will append each full page in an iframe.
  2. Or keep using the Element Append Mode, check the Element Iframe Checkbox and adjust the Page Element Rule with the following Selector: div[data-behat-search-results-lg] (or you could also use its parent div: div[data-search-results]

In both cases, you'll want to set the Iframe Height Wait (in the Iframe Append Mode settings) to something greater than 0 (like 3000 ms) in case content on the bottom of the pages appears cropped.

I'll try and update the Help Guide to add a section about dealing with complex sites like Etsy so users can try to figure out these settings on their own.

I'll go ahead and close this issue because it's only about a specific website that you needed settings for, and Infy seems to be working as intended.

Hope that helps and thanks again for using Infy!

maxcook commented 3 years ago

Thanks for the detailed help!!!

The second method works perfect. However i have an issue with the changes not beeing saved. I put in the page element rule and click the "Accept" button. It works then until i refresh the page. After refresh the original data is set again.

sixcious commented 3 years ago

Hi again Maximilian! You'll need to Save the URL, which is covered in the Help Guide. Also, you'll probably want to make the Saved URL pattern have /search in it if this is only intended for that specific Search Results URL pattern so Infy only activates on that page and not elsewhere on the site.