I'm scraping www.tosdr.org for some data. For example I'm trying to capture the content of the <title>
tag as follows:
$.get('https://tosdr.org/', function(response) {
var body = response.match(/<title>\[ ([\d]*?) \]<\/title>/);
console.log(body);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
Problem with this is that I'm getting this error:
TypeError: response.match(...) is null
I shouldn't be getting this error. What am I doing wrong ?