<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How To Fetch Data From Website Through SAS Code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274096#M310923</link>
    <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you&amp;nbsp;guide me how we can call python&amp;nbsp;script from SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kaushal Solanki&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2016 14:03:38 GMT</pubDate>
    <dc:creator>kaushalsolanki</dc:creator>
    <dc:date>2016-05-31T14:03:38Z</dc:date>
    <item>
      <title>How To Fetch Data From Website Through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274057#M310916</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to know that how we can fetch particuler information from the website through SAS Code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example i want to fetch all values of particuler class from website how i can get that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kaushal Solanki&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 10:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274057#M310916</guid>
      <dc:creator>kaushalsolanki</dc:creator>
      <dc:date>2016-05-31T10:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fetch Data From Website Through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274059#M310917</link>
      <description>&lt;P&gt;You will need to be more specific in your request, what data are you getting, is it a web page, a json stream, a database etc. &amp;nbsp;There is proc http for instance:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n0t7v16eitluu2n15ffpfeafqszs.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n0t7v16eitluu2n15ffpfeafqszs.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 10:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274059#M310917</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-05-31T10:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fetch Data From Website Through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274061#M310918</link>
      <description>&lt;P&gt;Hi RW9,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the reply, My data is web page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example we are having all state values on one website and it consist same class=state at source code level&lt;/P&gt;
&lt;P&gt;so i want to fetch all state names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;kaushal Solanki&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 10:23:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274061#M310918</guid>
      <dc:creator>kaushalsolanki</dc:creator>
      <dc:date>2016-05-31T10:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fetch Data From Website Through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274069#M310919</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, that doesn't help. &amp;nbsp;A web page can contain any number of items ranging from HTML, pictures, through flash objects, javascript, database connections etc. &amp;nbsp;Maybe post the web link?&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 11:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274069#M310919</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-05-31T11:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fetch Data From Website Through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274079#M310920</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example link is as given below.&lt;/P&gt;
&lt;P&gt;Link:&amp;nbsp;&lt;A title="SAS Jobs" href="http://www.naukri.com/sas-jobs" target="_self"&gt;http://www.naukri.com/sas-jobs&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On this webpage there are number of different sas jobs so i want fetch all jobs designation&amp;nbsp;and location,&lt;/P&gt;
&lt;P&gt;If you will go through source code of this web page all designation comes under&amp;nbsp;&lt;SPAN class="html-attribute-name"&gt;class&lt;/SPAN&gt;&lt;SPAN&gt;="&lt;/SPAN&gt;&lt;SPAN class="html-attribute-value"&gt;desig"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="html-attribute-value"&gt;and locations will comes under class="loc".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="html-attribute-value"&gt;So how we can fetch the required data?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 12:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274079#M310920</guid>
      <dc:creator>kaushalsolanki</dc:creator>
      <dc:date>2016-05-31T12:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fetch Data From Website Through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274086#M310921</link>
      <description>&lt;P&gt;Ah, what you mean is you have saved that web page to your local drive and you are looking at the text saved. &amp;nbsp;You can parse that file then for the tag and pull out the required information. &amp;nbsp;A simple:&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; file "&amp;lt;yourfile&amp;gt;.html";&lt;/P&gt;
&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if index(_infile_,"class=") &amp;gt; 0 then output;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;This should give you all the information, but each run you will need to save the document.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The web page itself is actually javascript pulling data from a database or json stream and rendering it. &amp;nbsp;So if you want to &amp;nbsp;access it programmatically you would need the API to access their DB directly&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 13:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274086#M310921</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-05-31T13:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fetch Data From Website Through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274092#M310922</link>
      <description>&lt;P&gt;Scraping a website is possible with SAS but I would recommend a third party software.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Import.io is my favourite tool since it's free. Python has many packages that do this well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could write a script you then call from SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, make sure you're not violating the terms of service for the particular website your scraping.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 13:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274092#M310922</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-31T13:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fetch Data From Website Through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274096#M310923</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you&amp;nbsp;guide me how we can call python&amp;nbsp;script from SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kaushal Solanki&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 14:03:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274096#M310923</guid>
      <dc:creator>kaushalsolanki</dc:creator>
      <dc:date>2016-05-31T14:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fetch Data From Website Through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274106#M310924</link>
      <description>&lt;P&gt;Assuming you have X command enabled you can use the system call.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would need to write the python script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Format would be path to Python application followed by path to Python script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;X 'c:\program files\Python27\python.exe scrape.py';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Heres an example of a Python scraping script&lt;/P&gt;
&lt;P&gt;&lt;A href="http://docs.python-guide.org/en/latest/scenarios/scrape/" target="_blank"&gt;http://docs.python-guide.org/en/latest/scenarios/scrape/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 14:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Fetch-Data-From-Website-Through-SAS-Code/m-p/274106#M310924</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-31T14:33:11Z</dc:date>
    </item>
  </channel>
</rss>

