http://www.nationwide.com/locator/home/index.x?lineOfBusiness=insurance_agent&locatorhome=fromhome&language=そこにリストされているすべての州からすべてのデータを取得しようとしています。基本的には、名前、住所、メールアドレスなどです。
私の問題は次のとおりです。
- ドロップダウンから状態を反復処理するための URL パラメーターはありません。
私は状態を手動で繰り返しても構わないと思っていますが、1 つの div を選択して、同様のすべての DIV からコンテンツ/テキストをコピーする方法はありますか? つまり、コンテンツ全体が含まれるタグがあることがわかります。タグ内のすべてのテキストからテキストを抽出するにはどうすればよいですか?
私は、スクリプト言語、Php、perl python、または単純な Firefox アドオンに特にこだわりはありません...結果が必要なだけです。ガイダンスをお願いします。
ウェブハーベストを使ってみた
<?xml version="1.0" encoding="UTF-8"?>
<config charset="ISO-8859-1">
<!-- sends post request with state name -->
<http>
<http method="post" url="http://www.nationwide.com/locator/home/index.x?lineOfBusiness=insurance_agent&locatorhome=fromhome&language=">
<http-param name="state">AL</http-param>
<http-param name="searchType">proximity_search</http-param>
<http-param name="requestSource">home_NI</http-param>
<http-param name="businessType">NI</http-param>
<http-param name="language">en</http-param>
<http-param name="UserAddressCookieAction">createUserAddressCookie</http-param>
</http>
<!-- collects content inside address tag -->
</config>