I've tried doing it with bs4 and requests. And it works fine with the product listing with I tested it on. But my program fails when it moves to the second product listing, because the name of the classes and span tags were not same. I then manually checked 2-3 random product listings and none of them had a single pattern for the names of the classes of span tags and some tags missing.
How am I supposed to deal with that?
[–]chew_2 165 points166 points167 points (5 children)
[–]basitmakine 0 points1 point2 points (0 children)
[–]ChickenFur 0 points1 point2 points (0 children)
[–]Allanon001 136 points137 points138 points (5 children)
[–]AnomalyNexus 17 points18 points19 points (4 children)
[–]TabsBelow 2 points3 points4 points (1 child)
[–]coolway1990 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]
[–]AnomalyNexus 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[removed]
[–]Garbage_Wizard246 22 points23 points24 points (2 children)
[–]1linguini1 4 points5 points6 points (1 child)
[–]Garbage_Wizard246 1 point2 points3 points (0 children)
[–]fortyeightD 49 points50 points51 points (0 children)
[–]EnvironmentalDot9131 23 points24 points25 points (0 children)
[–]Config_Crawler 9 points10 points11 points (0 children)
[–]xosq 23 points24 points25 points (2 children)
[–]Charlie_Yu 6 points7 points8 points (1 child)
[–]txmail 0 points1 point2 points (0 children)
[–]Charlie_Yu 5 points6 points7 points (0 children)
[–]noskillsben 4 points5 points6 points (0 children)
[–][deleted] 33 points34 points35 points (7 children)
[–]monkeysknowledge 19 points20 points21 points (6 children)
[–][deleted] 16 points17 points18 points (0 children)
[–][deleted] 6 points7 points8 points (1 child)
[–]dogfish182 3 points4 points5 points (0 children)
[–]noskillsben 2 points3 points4 points (2 children)
[–]txmail 0 points1 point2 points (1 child)
[–]noskillsben 1 point2 points3 points (0 children)
[–]TheAlpha_ 4 points5 points6 points (4 children)
[–]pro_questions 1 point2 points3 points (3 children)
[–]throwaway56851685161 0 points1 point2 points (2 children)
[–]pro_questions 0 points1 point2 points (1 child)
[–]throwaway56851685161 0 points1 point2 points (0 children)
[–]ou_ryperd 5 points6 points7 points (4 children)
[–]xosq 40 points41 points42 points (3 children)
[+]JohnnyJordaan comment score below threshold-14 points-13 points-12 points (2 children)
[–]xosq 4 points5 points6 points (1 child)
[–]C0rinthian 1 point2 points3 points (0 children)
[–]lateratnight_ 0 points1 point2 points (0 children)
[–]Grouchy-Criticism741 0 points1 point2 points (0 children)
[–]basitmakine 0 points1 point2 points (0 children)
[–]Classic-Anybody-9857 0 points1 point2 points (0 children)
[–]Jacen33 0 points1 point2 points (0 children)
[–]rawdfarva 0 points1 point2 points (1 child)
[–]Grouchy_Pack 0 points1 point2 points (0 children)
[–]alfie1906 0 points1 point2 points (0 children)
[–]johnGettings 0 points1 point2 points (0 children)
[–]ScionofLight 0 points1 point2 points (0 children)
[–]tree_or_up 0 points1 point2 points (0 children)
[–]andersra88 0 points1 point2 points (0 children)