Skip to content

Help for different types of layouts #6

Answered by lorenzo-asquini
Alex87a asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Thanks for your interest in our project!

Amazon pages have many different layouts, and products are always represented in a different way in the HTML source code.
In the link you provided, https://amzn.to/3J5cGBT, the products are contained in <div> elements that have, among their classes, the class d4xojt-0. For this reason, it's necessary to search for all such elements, and then search for the urls to the product in the <a> elements inside those elements.

Your example made us notice that, for dynamically loaded pages, not all products are loaded from the beginning, so it's necessary to scroll the page to make new products be loaded.

Here's the modified function get_all_deals_ids()

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by albertopasqualetto
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3 on April 18, 2024 20:18.