BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
PaigeMiller
Diamond | Level 26

I am trying to follow @ChrisHemedinger's article on web scraping at https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/

 

I can access the web site mentioned in the following code via my web browser, but the code returns an error.

563   filename src temp;
564   proc http
565    method="GET"
566    url="https://www.unitedstateszipcodes.org/14068/"
567    out=src;
568   run;

ERROR: Error connecting to 13.225.212.116:443. (The connection has timed out.)
ERROR: Unable to connect to Web server.

I am guessing that the error is because my company's firewall prevents this type of HTTP access, but that's a guess. What do you think? Are there other possible causes of this error?

 

 

 

--
Paige Miller
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

There are PROXY host/port options that you can specify on PROC HTTP...if you can learn your organization's proxy settings.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

View solution in original post

4 REPLIES 4
Ksharp
Super User

I tested it under SAS On-Demand Academic ,

No problem.

 

68         
 69         filename src temp;
 70           proc http
 71            method="GET"
 72            url="https://www.unitedstateszipcodes.org/14068/"
 73            out=src;
 74         run;
 
 NOTE: “PROCEDURE HTTP”所用时间(总处理时间):
       实际时间          0.55 秒
       用户 CPU 时间     0.04 秒
       系统 CPU 时间     0.00 秒
       内存              2202.84k
       OS 内存           27808.00k
       时间戳           2019-11-15 下午01:40:21
       Step Count                        45  Switch Count  3
       页错误数                       0
       页回收数                     1120
       页交换数                        0
       主动上下文切换数        88
       被动上下文切换数      0
       块输入操作数            0
       块输出操作数           352
       
 
PaigeMiller
Diamond | Level 26

Yes, I tested it on my home computer using University Edition, works fine there as well.

--
Paige Miller
ChrisHemedinger
Community Manager

There are PROXY host/port options that you can specify on PROC HTTP...if you can learn your organization's proxy settings.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
PaigeMiller
Diamond | Level 26

I did learn the proxy settings, and then I needed to add to my PROC HTTP code the proper values for the options

PROXYHOST=

PROXYPORT=

PROXYUSERNAME=

PROXYPASSWORD=

AUTH_BASIC

--
Paige Miller

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2972 views
  • 1 like
  • 3 in conversation