title: Extracting table value from an URL with Node JS
body: <p>I am quite new to Node JS and express but I am trying to build a website which serves static files. After some research I've found out that NodeJS with Express can be quite useful for this. 
  So far I managed to serve some static html files which are located on my server, but now I want to do something else:
  I have an URL to an html page, and in that html page, there is a table with some information. </p>
  
  <p>I want to extract specific a couple of values from it, and 1) save it as JSON in a file, 2) write those values in a html page. I've tried to play with jQuery, but so far I've been unsuccessful.</p>
  
  <p>This is what I have so far: </p>
  
  <p>1.node app running on port 8081, which I will further access it from anywhere with NGINX reverse proxy (I already have nginx setup and it works)</p>
  
  <p>2.I can get the URL and serve it as HTML when I use the proper URI.</p>
  
  <p>3.I see that the table doesn't have an ID, but only the "details" class associated with it. Also, I am only interested in getting these rows:</p>
  
  <pre><code>&lt;div class='group'&gt;
  &lt;table class='details'&gt;
  &lt;tr&gt;
  &lt;th&gt;Status:&lt;/th&gt;
  &lt;td&gt;
  With editors
  &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>From what I've seen so far, jQuery would work fine if the table has an ID.</p>
  
  <p>This is my code in <code>app.js</code></p>
  
  <pre><code>
  var express = require('express');
  var app = express();
  var request = require('request');
  const path = require('path');
  
  var content;
  
  app.use('/', function(req, res, next) {
    var status = 'It works';
    console.log('This is very %s', status);
    //console.log(content);
    next();
  });
  
  request(
    {
      uri:
        'https://authors.aps.org/Submissions/status?utf8=%E2%9C%93&amp;accode=CH10674&amp;author=Poenaru&amp;commit=Submit'
    },
    function(error, response, body) {
      content = body;
    }
  );
  
  app.get('/', function(req, res) {
    console.log('Got a GET request for the homepage');
    res.sendFile(path.join(__dirname, '/', 'index.html'));
  });
  
  app.get('/url', function(req, res) {
    console.log('You requested table data!!!');
  
  TO DO:   SHOW ONLY THE THE VALUES OF THAT TABLE INSTEAD OF THE WHOLE HTML PAGE
  
    res.send(content);
  });
  
  var server = app.listen(8081, function() {
    var host = server.address().address;
    var port = server.address().port;
    console.log('Node-App listening at http://%s:%s', host, port);
  });
  </code></pre>
  
  <p>Basically, the HTML content of that URL is saved into <code>content</code> variable, and now  I would like to save only the table from it, and also output only the saved part to the new html page.</p>
  
  <p>Any ideas? 
  Thank you in advance :)</p>