BookmarkSubscribeRSS Feed
Mokalake
Calcite | Level 5

Good day,

 

Is there a way in which i can web scrap with sas enterprise guide?

 

Here is what i need to achieve " suppose i have a column field with word phrases that i want to pass to google chrome and maybe extract the contents of their home page. E.G i have the word SAS and i want the contents of the ABOUT US from the first link"

 

Thank you.

4 REPLIES 4
Ksharp
Super User

Maybe you need help from the third side software cURL .

ybolduc
Quartz | Level 8

Hi Mokalake,

 

     SAS may not be the best tool to do Web Scraping the way you want to do it. But if you really way do this with SAS, you will need to use PROC HTTP to download the page. Once you have the page downloaded, the best would be to use Regular Expressions to find the information that you are looking for. You will likely need to use SAS Macros to wrap your logic and make iterate properly.

 

     Note that both PROC HTTP and Regular Expressions are fairly advanced skills in SAS.

 

Thanks,

 

Reeza
Super User
You can and it's been done and I've done some of this. You can search on lexjansen.com for some full papers on the topic or Chris Hemidinger has a blog post on it as well. There are some posts on here that also asked this question and have solved answers that may help you. I'd highly recommend starting there.

https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/

BUT...it's possible your system may be locked down and may not let you do some of these things. EG can often be locked down pretty hard.
Mokalake
Calcite | Level 5

Thank you. I will have a look at it.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 656 views
  • 0 likes
  • 4 in conversation