c# - Parsing web page with HtmlAgilityPack and simulate a click -


i scraping web page using hap, , want access submit button on page problem don't know how done in hap , c#, there way this?

the html agility pack not browser, while can parse html file, there no way interact it. can find submit object, read properties , forth, can't make anything.

you have 2 options:

  • either read form, build http request object matches forms fields , post method , send server. manual work. agility pack helps list fields on form , properties

  • if need interact page you'll need browser. there headless browsers, phantomjs, load page, parse javascript , run what's sent server. there wrappers around wrappers c#, 1 of such examples awesonium. it's similar html agility pack in allows parse html documents, takes 1 step further, running without ever showing browser screen.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -