Extracting data from a Facebook Graph API page

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Extracting data from a Facebook Graph API page

by Steverob1066 on Tue Jun 25, 2013 9:19 am

Hi - I'm new to this, so please be patient.
I have a page returned by the Facebook Graph API which is a page of text, listing FB group information - it looks like this:
{
"data": [
{
"name": "GROUP1NAME",
"id": "12345678904509092",
"unread": 25,
"bookmark_order": 999999999
},
{
"name": "GROUP2NAME",
"id": "4703459543005192",
"unread": 2,
"bookmark_order": 999999999
}, etc etc

I want to scrape a list of the ids, and so far I have this:
SEARCH SOURCE=REGEXP:"id":\s"([^"]+)" EXTRACT="$1"
PROMPT {{!EXTRACT}}
which just returns the first id number.
Any suggestions on how I can loop through the page pulling out every instance of id numbers?
Steverob1066
 
Posts: 15
Joined: Wed Jun 19, 2013 10:05 am

Re: Extracting data from a Facebook Graph API page

by Tom, Tech Support on Thu Jun 27, 2013 2:21 am

Hi Steverob1066,

You need to either:

-or-

  • Attempt to do the same in-macro using the EVAL command.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: Extracting data from a Facebook Graph API page

by Steverob1066 on Mon Sep 19, 2016 5:21 am

Tom -if you're still there, I just want to apologise for not thanking you for responding to my post. I ended up doing it a different way (not with iMacros).
Steverob1066
 
Posts: 15
Joined: Wed Jun 19, 2013 10:05 am


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Bing [Bot] and 5 guests

-->