Android Jsoup parser with input value -
i need url string code. need (http://ww3.mp3juices.com/download/5487/8789094/123735064/1d8bb8aa0352/(osthi)---kalasala-kalasala )
<td style="width:240px;min-width:240px" class="controls"> <a class="action_buttons cs download" href="http://yournewncsoft.info/v356?product_name=%28osthi%29+-+kalasala+kalasala&product_title=mp3juices+download+manager&installer_file_name=%28osthi%29+-+kalasala+kalasala+-+%5bmp3juices.com%5d&product_file_name=%28osthi%29+-+kalasala+kalasala+-+%5bmp3juices.com%5d.mp3&product_download_url=http%3a%2f%2fww3.mp3juices.com%2fdownload%2f5487%2f8789094%2f123735064%2f1d8bb8aa0352%2f%28osthi%29---kalasala-kalasala" name="dl2" onclick="javascript:_gaq.push(['_trackpageview','/download/manager']);">ev <input type="hidden" name="files[1][adrl]" value="http://yournewncsoft.info/v356?product_name=%28osthi%29+-+kalasala+kalasala&product_title=mp3juices+download+manager&installer_file_name=%28osthi%29+-+kalasala+kalasala+-+%5bmp3juices.com%5d&product_file_name=%28osthi%29+-+kalasala+kalasala+-+%5bmp3juices.com%5d.mp3&product_download_url=http%3a%2f%2fww3.mp3juices.com%2fdownload%2f5487%2f8789094%2f123735064%2f1d8bb8aa0352%2f%28osthi%29---kalasala-kalasala"/> <input type="hidden" name="files[1][url]" value="http://ww3.mp3juices.com/download/5487/8789094/123735064/1d8bb8aa0352/(osthi)---kalasala-kalasala"/> <input type="hidden" name="files[1][len]" value="252"/> <input type="hidden" name="files[1][song_id]" value="2"/> <input type="hidden" name="files[1][hash]" value="41e78609200a6de8d86d25bae2b2a922"/> <input type="hidden" name="files[1][filesize]" value="480.99999999999994"/> <input type="hidden" name="files[1][bitrate]" value="160"/> <a class="action_buttons cs listen" href="javascript:;" name="dll2">ev </td>
my jsoup code is
for (element divaudio : divs){ count_songs++; string songtitle = divaudio.select(".song_title").text(); //string songurl = divaudio.select(".url").attr("href"); element link = divaudio.select("input[name=files[1][url]]").first(); string songurl= link.attr("value"); string songduration = divaudio.select(".size").text(); string songsize = divaudio.select(".bit").text(); result_list.add(new song_details(songtitle, songurl, songduration, songsize)); }
edited: answer is:
element link = divaudio.select("input[name*=url").first(); string songurl= link.attr("value");
element link = divaudio.select("input[name*=url").first(); string songurl= link.attr("value");
this code working fine
Comments
Post a Comment