Hi
Is it possible (in a flow) to give a URL and get back a page summary / description?
Thanks
P
Hi @pmwhelan,
Are you talking about the meta tags which you sometimes can find in the header of the HTML of a web page?
If so, you could use a HTTP action and use an indexOf to check if this tag is available. And if that is the case use a couple of split functions to retrieve the description.
Below is an example.
In this example I used the following W3Schools page:
https://www.w3schools.com/html/html_basic.asp
The HTML has this in the Header
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>HTML Basic</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="Keywords" content="HTML, Python, CSS, SQL, JavaScript, How to, PHP, Java, C, C++, C#, jQuery, Bootstrap, Colors, W3.CSS, XML, MySQL, Icons, NodeJS, React, Graphics, Angular, R, AI, Git, Data Science, Code Game, Tutorials, Programming, Web Development, Training, Learning, Quiz, Exercises, Courses, Lessons, References, Examples, Learn to code, Source code, Demos, Tips, Website">
<meta name="Description" content="Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.">
With the expression below you could find that last meta name tag
if(not(equals(indexOf(body('HTTP'), '<meta name="Description" content='), -1)), slice(split(split(body('HTTP'), '<meta name="Description" content=')[1], '>')[0], 1, -1), 'Not Found')
Thanks very much.
I am getting "The server did not received a response from an upstream server."
Any ideas?