javascript - Grab Data From Website -


i create javascript code grab data website , put .txt file, maybe if can converted xml file better if possible.?

if not javascript else fine.

grabbing photo

i wish grab price , item name , i'm not sure on how that.

website http://www.bigw.com.au/electronics/computers-office/computer-accessories/webcams if need read source help.

rip website client-side browser , javascript? no problem.

yahoo yql... (instead of php? proxy serverside script)..

i have sneaky suspicion not own/control external link site, getting content different site, fall under cross-domain security restrictions (to modern browser).

so in order regain 'power user', use http://query.yahooapis.com/.

example 1:
using sql-like command:

select * html  url="http://stackoverflow.com"  , xpath='//div/h3/a' 

the following link scrape newest questions (bypassing cross-domain security bull$#!7):
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20%0awhere%20url%3d%22http%3a%2f%2fstackoverflow.com%22%20%0aand%20xpath%3d'%2f%2fdiv%2fh3%2fa'%3b&format=json&callback=cbfunc

as can see return json array (one can choose xml) , calling callback-function: cbfunc.

indeed, 'bonus' save kitten every time did not need regex data out of 'tag-soup' , don't need mess lord cthulu.

do hear little mad scientist inside starting giggle?

then see this answer more info (and don't forget it's comments more examples).

once have data, can ajax server, repeating 1000 times no problem (as long there space on server).

good luck!


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -