I build a scraper which works for some inputs but not for all. The scraper returns “12345678910+” as a result even though the result should be “8”
I want to know how many products are left in stock for items
Hi, this doesn’t necesarily mean that the scraper isn’t working, it might just be that the page layout is a bit more tricky and Bardeen’s default selectors weren’t able to get the expected field.
Can you share the page you’re trying to scrape?
I’m guessing this case could be solved by:
Check the more options of the scraper and see if there’s a property with the number you need
Improve the selectors with custom CSS selectors. This requires a bit more of work.
We might be able to help if you share the page. Or you can also search for external help on Jobs and Gigs .
Notice that Dead Island 2 is a drop down, while the Tent is a text field. The drop down contains all the available quantities 1 2 3 4 5 6 etc. while the text field contains 1 value. Now I cannot really tell if the qty of the text can be modified (is it a input or is it a span inside a box) but here is a mock up HTML to demonstrate to you what is happening.
Since 1 element is span but the other is select (in the mock up I have created) Bardeen has figured out a way to get the values from both but as you can see the select element has all the values.
I did some research I couldn’t find a CSS selector to select the active drop down value.