Search Results

Search found 3 results on 1 pages for 'webpagescraping'.

Page 1/1 | 1 

  • PHP and curl for fetching currency rate from Yahoo Finance

    - by gregj
    Hello, I wrote the following php snippet to fetch the currency conversion rate from Yahoo Finance.Im using curl to fetch the data. Suppose, i want to convert from US dollars (USD) to Indian National Rupee (INR),then the url is http://in.finance.yahoo.com/currency/convert?amt=1&from=USD&to=INR&submit= and the Indian Rupee value is shown as 45.225. However,if i run my code, the value im getting is 452.25. Why this discrepancy ? <?php $amount = $_GET['amount']; $from = $_GET['from']; $to = $_GET['to']; $url = "http://in.finance.yahoo.com/currency/convert?amt=".$amount."&from=".$from."&to=".$to; $handle = curl_init($url); curl_setopt ($handle, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($handle); if(preg_match_all('/<td class="yfnc_tabledata1"><b>(?:[1-9]\d+|\d)(?:\.\d\d)?/',$data,$matches)) { print_r($matches[0][1]); } else { echo "Not found !"; } curl_close($handle); ?> Is there something wrong with my regex ? Please help. Thank You.

    Read the article

  • What is the fastest way to scrape HTML webpage in Android?

    - by kunjaan
    I need to extract information from an unstructured web page in Android. The information I want is embedded in a table that doesn't have an id. <table> <tr><td>Description</td><td></td><td>I want this field next to the description cell</td></tr> </table> Should I use Pattern Matching? Use BufferedReader to extract the information? Or are there faster way to get that information?

    Read the article

  • Scraping with multiple IP, in java.

    - by Titi Wangsa bin Damhore
    Well basically I have a scraping application. It scrapes around n items per minute. currently i have only one IP. The site i'm scraping allows me 3 connections per IP. I'm thinking about getting another IP. so i'll be able to get 6 connections. in theory i should be able to get n items in 40 seconds, more or less. currently i'm using java (commons-httpcore) to get the job done. I'm not sure if this is java question or an OS question. my machine has IP 1 and IP 2 how do i connect to, say, www.microsoft.com, using IP 1 and using IP2? how can i specify, which ip i want to use to do a connection?

    Read the article

1