佛版都是大老爷啊# PhotoGear - 摄影器材
b*1
1 楼
题目是 convert a provided search page and its results into an "API". The
final result will be a Javascript function that takes a search query and
return as JSON. To Create this all of your Javascript code will be injected
into the page before it can be used.
Search page source:
http://toronto.craigslist.ca/search/ggg
function will stimualte the search query
Result source:
http://toronto.craigslist.ca/search/ggg?query=tickets&is_paid=a
Desired Javascript Method results example
Function craigsilistsearch(searchQuery) {...}
Desired API JSON results example
[
{"image": "http://images.craigsist.org/oogog_lgx.jpg", "title":"looking for Runway Models fro Fashion Show", "date":"2016-03-03", "location":"(Downtown Toronto)"]},
{"image": "http://images.craigsist.org/oogog_lgx.jpg", "title":"looking for Runway Models fro Fashion Show", "date":"2016-03-03", "location":"(Downtown Toronto)"]},
...
]
Javascript 不是很熟,请知道的牛人,给点提示。多谢了
final result will be a Javascript function that takes a search query and
return as JSON. To Create this all of your Javascript code will be injected
into the page before it can be used.
Search page source:
http://toronto.craigslist.ca/search/ggg
function will stimualte the search query
Result source:
http://toronto.craigslist.ca/search/ggg?query=tickets&is_paid=a
Desired Javascript Method results example
Function craigsilistsearch(searchQuery) {...}
Desired API JSON results example
[
{"image": "http://images.craigsist.org/oogog_lgx.jpg", "title":"looking for Runway Models fro Fashion Show", "date":"2016-03-03", "location":"(Downtown Toronto)"]},
{"image": "http://images.craigsist.org/oogog_lgx.jpg", "title":"looking for Runway Models fro Fashion Show", "date":"2016-03-03", "location":"(Downtown Toronto)"]},
...
]
Javascript 不是很熟,请知道的牛人,给点提示。多谢了