I am working on project that includes scraping data from social media service - Instagram. I already managed to retrieve source code using:
$.ajaxPrefilter( function (options) {
if (options.crossDomain && jQuery.support.cors) {
var http = (window.location.protocol === 'http:' ? 'http:' : 'https:');
options.url = http + '//cors-anywhere.herokuapp.com/' + options.url;
//options.url = "http://cors.corsproxy.io/url=" + options.url;
}
});
and $.get('https://www.instagram.com/manchesterunited,
I have source file and I need to get informations such as title, description, image link. Everything I need is in this line: http://pastebin.com/Zh0mPGtu
I googled about how to retrieve data between two strings and I can't manage to do it. For example profile full name is between "full_name": "
and ",
. I tried to do this many many ways but I always failed, here is one of methods I tried: var title = data.match('"full_name": "(.*)",');
.