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.

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.

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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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