Javascript function to scrape data from amazon.com
- Estado: Closed
- Premio: $30
- Propuestas recibidas: 2
- Ganador: rgarcia3934
Resumen del concurso
I need a good javascript developer on long term basis.
Current Requirement:
Javascript function that will scrape some data on amazon.com and returns a json object. If you know a better way of getting this data without scraping, that's fine too.
function getRankingInfo(url);
It should load the url using ajax, scrape the data and create json from the html. Below are 3 types of url's and outputs.
It should return the following information for a sample url: http://www.amazon.com/dp/B00Q2JC290/
{
"url": "http://www.amazon.com/dp/B00Q2JC290/",
"status":"success",
"rank": {
"Top": {
"Amazon Best Sellers Rank": "15"
},
"Next": [
{
"1": "<span class=\"fsh-ranks\">in <a href=\"http://www.amazon.com/best-sellers-shoes/zgbs/shoes/ref=pd_zg_hrsr_shoe_1_1\">Shoes</a> > <a href=\"http://www.amazon.com/gp/bestsellers/shoes/679255011/ref=pd_zg_hrsr_shoe_1_2\">Men's</a> > <a href=\"http://www.amazon.com/gp/bestsellers/shoes/6127770011/ref=pd_zg_hrsr_shoe_1_3\">Athletic</a> > <b><a href=\"http://www.amazon.com/gp/bestsellers/shoes/1264575011/ref=pd_zg_hrsr_shoe_1_4_last\">Trail Running</a></b></span>"
},
{
"2": "<span class=\"fsh-ranks\">in <a href=\"http://www.amazon.com/best-sellers-shoes/zgbs/shoes/ref=pd_zg_hrsr_shoe_2_1\">Shoes</a> > <a href=\"http://www.amazon.com/gp/bestsellers/shoes/679255011/ref=pd_zg_hrsr_shoe_2_2\">Men's</a> > <a href=\"http://www.amazon.com/gp/bestsellers/shoes/6127770011/ref=pd_zg_hrsr_shoe_2_3\">Athletic</a> > <b><a href=\"http://www.amazon.com/gp/bestsellers/shoes/679286011/ref=pd_zg_hrsr_shoe_2_4_last\">Men's</a></b></span>"
},
{
"2": "<span class=\"fsh-ranks\">#2</span> <span class=\"zg_hrsr_ladder\">in <a href=\"http://www.amazon.com/best-sellers-shoes/zgbs/shoes/ref=pd_zg_hrsr_shoe_3_1\">Shoes</a> > <a href=\"http://www.amazon.com/gp/bestsellers/shoes/679255011/ref=pd_zg_hrsr_shoe_3_2\">Men's</a> > <b><a href=\"http://www.amazon.com/gp/bestsellers/shoes/6127766011/ref=pd_zg_hrsr_shoe_3_3_last\">Outdoor</a></b></span>"
}
]
},
"shipping":{
"Shipping Weight": "2.5 ponds"
}
}
It should return the following information for a sample url: http://www.amazon.com/dp/B01ALVMRM6
{
"url": "http://www.amazon.com/dp/B01ALVMRM6/",
"status": "NoRank",
"shipping":{
"Shipping Weight": "2.7 ponds"
}
}
It should return the following information for a sample url: http://www.amazon.com/dp/B00MUHUCBI
{
"url": "http://www.amazon.com/dp/B00MUHUCBI",
"status": "subrank",
"rank": {
"ranks": [
{
"4369": "<span>#4,369 in Cell Phones & Accessories (<a href=\"/gp/bestsellers/wireless/ref=pd_dp_ts_cps_1\">See Top 100 in Cell Phones & Accessories</a>)</span>"
},
{
"48": "<span>#48 in <a href=\"/gp/bestsellers/wireless//ref=pd_zg_hrsr_cps_1_1\">Cell Phones & Accessories</a> > <a href=\"/gp/bestsellers/wireless/2407755011/ref=pd_zg_hrsr_cps_1_2\">Cell Phone Accessories</a> > <a href=\"/gp/bestsellers/wireless/7072563011/ref=pd_zg_hrsr_cps_1_3\">Mounts & Stands</a> > <a href=\"/gp/bestsellers/wireless/7073961011/ref=pd_zg_hrsr_cps_1_4_last\">Stands</a></span>"
},
{
"4369": "<span>#4,369 in <a href=\"/gp/bestsellers/electronics//ref=pd_zg_hrsr_cps_1_1\">Electronics</a> > <a href=\"/gp/bestsellers/electronics/2811119011/ref=pd_zg_hrsr_cps_1_2_last\">Cell Phones & Accessories</a></span>"
}
]
},
"shipping":{
"Shipping Weight": "1.6 ounces"
}
}
Habilidades recomendadas
Comentarios del empleador
“Nice person to work with.”
kiranjulapalli, United States.
Tablero de aclaración pública
Cómo comenzar con los concursos
-
Publica tu concurso Fácil y rápido
-
Consigue toneladas de propuestas De todo el mundo
-
Elige la mejor propuesta ¡Descarga fácilmente los archivos!