JavaScript code to search a website for a given string? -


i ceh, although have never studied javascript before. python other basics. however, have began study javascript friends trying set servers , such , need help. trying create javascript code search website given string. instance, if gave code string "street address", search website told "street address". maybe not possible, awesome if was. if can help, in advance!

i created extracty endpoint this. goes through p , span elements , returns text of elements, contain string. can call here:

https://api.extracty.com/v1/334/610f5674-51ac-407f-b3af-65697b8f00be/?search=origin&url=https://en.wikipedia.org/wiki/berlin

as can see, url , search string parameter. code used on extracty:

return $('span:contains(' + extracty.args.search + '), p:contains(' + extracty.args.search + ')').get().map(function(element) {   return element.textcontent.trim() }) 

you can fork endpoint here: https://app.extracty.com/endpoint?id=334


Comments