MontFerret / ferret

Declarative web scraping
https://www.montferret.dev/
Apache License 2.0
5.73k stars 301 forks source link

Unable to select drop down #732

Open rahulsingh303 opened 2 years ago

rahulsingh303 commented 2 years ago

Hi,

I am trying a simple scraping where I need to select a drop down value and click a button , see the attached screenshot url : https://www.booking.com/hotel/us/freehand-chicago.html?aid=304142&label=gen173nr-1DCAEoggI46AdIM1gEaJMCiAEBmAExuAEXyAEP2AED6AEB-AECiAIBqAIDuALcssmRBsACAdICJGE2NjViOTFiLWEwNTYtNGUxNS1hNjAwLTY5NGIzYjI2NDhhYdgCBOACAQ&sid=15060b0bdc44b1513a0f0939816e9dbf&all_sr_blocks=128021703_93121951_0_0_0&checkin=2022-06-21&checkout=2022-06-29&dest_id=20033173&dest_type=city&dist=0&group_adults=2&group_children=0&hapos=3&highlighted_blocks=128021703_93121951_0_0_0&hpos=3&matching_block_id=128021703_93121951_0_0_0&no_rooms=1&req_adults=2&req_children=0&room1=A%2CA&sb_price_type=total&sr_order=popularity&sr_pri_blocks=128021703_93121951_0_0_0_134800&srepoch=1647466951&srpvid=e7ee98a2a9d00088&type=total&ucfs=1&activeTab=main# drop_down

Any help will be appreciated .

ziflex commented 2 years ago

Hey,

Have you tried to use SELECT function?

https://www.montferret.dev/docs/stdlib/html/#select

LET d = DOCUMENT('my-doc', { driver: 'cdp'})

LET out = SELECT(d, "#select-input", ["value-to-select"])

RETURN out
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.