Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fetch(inputData.urltofetch)
- .then(function(response) {
- return response.text();
- })
- .then(function(body) {
- var title = body.split('<title>')[1].split('</title>')[0]
- var output = {id: 1234, rawHTML: title};
- callback(null, output);
- })
- .catch(callback);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement