BookmarkSubscribeRSS Feed
crimbo
Fluorite | Level 6

I have a macro to scrap tweets on Twitter and return details of the tweet in columns.  The macro is using PROC HTTP.  When i run the macro i get the following error messages:

 

ERROR: Host name resolution failed

ERROR: Host name resolution failed

 

Does this mean i am failing to access the Twitter page through their API?

 

Does SAS University Edition able to write and read JSON files?

 

Regards.

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

You would need to provide some code, how are you connecting, are you providing correct login details etc.  Proc http requires correct signin details, and connection.  You might want to set it up in conjunction with your IT group, and make sure passwords and such like are encrypted.

 

SAS UE is principally a learning edition, it doesn't have full functionality either, and as its installed on Linu image rather than your local machine this could also be a problem.

 

As for Json, there is no out of the box reader as far as I am aware.  However, it is plain text, so should be pretty easy to read in and parse, however as you are using a learning edition of SAS it sounds like your learning, so maybe not the best task to start with.

 

And the phrase is "scrape" the data, although I would quite happily scrap social media!

crimbo
Fluorite | Level 6

Thank you very much for your response, most appreciated.

 

Please find attached the macro.

 

Regards.

crimbo
Fluorite | Level 6

Further to my last post, i managed to find a solution with a simple code in R.  Once again thank you very much for your input

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1125 views
  • 0 likes
  • 2 in conversation