<?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 Data scraping -  java script form has me stuck in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Data-scraping-java-script-form-has-me-stuck/m-p/134045#M36363</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been using SAS to scrape a lot of "easy" web sites. Now I have one where I have to submit a location (province) into a form then read in the information. To further complicate matters, the return results are listed say 20 at a time, so I need to span the result pages. The proc http documentations doesn't really help. Anyone have a basic working example I can build on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 May 2013 12:20:51 GMT</pubDate>
    <dc:creator>BigD</dc:creator>
    <dc:date>2013-05-14T12:20:51Z</dc:date>
    <item>
      <title>Data scraping -  java script form has me stuck</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-scraping-java-script-form-has-me-stuck/m-p/134045#M36363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been using SAS to scrape a lot of "easy" web sites. Now I have one where I have to submit a location (province) into a form then read in the information. To further complicate matters, the return results are listed say 20 at a time, so I need to span the result pages. The proc http documentations doesn't really help. Anyone have a basic working example I can build on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 12:20:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-scraping-java-script-form-has-me-stuck/m-p/134045#M36363</guid>
      <dc:creator>BigD</dc:creator>
      <dc:date>2013-05-14T12:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Data scraping -  java script form has me stuck</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-scraping-java-script-form-has-me-stuck/m-p/494535#M72323</link>
      <description>&lt;P&gt;​Here is an example of a complex API transaction using SAS and PROC HTTP&lt;/P&gt;&lt;DIV&gt;/*POST A REQUEST FOR SURVEY DATA*/&lt;/DIV&gt;&lt;DIV&gt;/****************************************************************************/&lt;/DIV&gt;&lt;DIV&gt;/* Qualtrics API Request to get export of&amp;nbsp;survey response data&lt;/DIV&gt;&lt;DIV&gt;/* To compare to Python go to &lt;A href="https://api.qualtrics.com/docs/response-exports" target="_blank"&gt;https://api.qualtrics.com/docs/response-exports&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;/****************************************************************************/&lt;/DIV&gt;&lt;DIV&gt;filename rsp temp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc http&lt;/DIV&gt;&lt;DIV&gt;url="&lt;A href="https://yourdatacenter.qualtrics.com/API/v3/responseexports/" target="_blank"&gt;https://yourdatacenter.qualtrics.com/API/v3/responseexports/&lt;/A&gt;"&lt;/DIV&gt;&lt;DIV&gt;method= "POST"&lt;/DIV&gt;&lt;DIV&gt;in='{"format" : "csv","surveyId" : "yoursurveyID"}'&lt;/DIV&gt;&lt;DIV&gt;out=rsp;&lt;/DIV&gt;&lt;DIV&gt;headers&lt;/DIV&gt;&lt;DIV&gt;"X-API-Token"="yourAPItoken"&lt;/DIV&gt;&lt;DIV&gt;"Content-Type"="application/json"&lt;/DIV&gt;&lt;DIV&gt;;&lt;/DIV&gt;&lt;DIV&gt;run;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;libname RSP JSON fileref=rsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;/*Check Status of request*/&lt;/DIV&gt;&lt;DIV&gt;filename dwnld temp;&lt;/DIV&gt;&lt;DIV&gt;proc http&lt;/DIV&gt;&lt;DIV&gt;url="&lt;A href="https://yourdatacenter.qualtrics.com/API/v3/responseexports/yourresultID" target="_blank"&gt;https://yourdatacenter.qualtrics.com/API/v3/responseexports/yourresultID&lt;/A&gt;" /*Check json from rsp for result*/&lt;/DIV&gt;&lt;DIV&gt;method= "GET"&lt;/DIV&gt;&lt;DIV&gt;out=dwnld;&lt;/DIV&gt;&lt;DIV&gt;headers&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;"X-API-Token"="yourAPItoken";&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;libname dwnld JSON fileref=dwnld;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;/*Download request - You can view json dwnld for status and filename (same as yourresultID above)*/&lt;/DIV&gt;&lt;DIV&gt;filename dwnld '/yourPathHere/GOTDATA';&lt;/DIV&gt;&lt;DIV&gt;proc http&lt;/DIV&gt;&lt;DIV&gt;url="&lt;A href="https://yourdatacenter.qualtrics.com/API/v3/responseexports/yourresultID/file" target="_blank"&gt;https://yourdatacenter.qualtrics.com/API/v3/responseexports/yourresultID/file&lt;/A&gt;"&lt;/DIV&gt;&lt;DIV&gt;method= "GET"&lt;/DIV&gt;&lt;DIV&gt;out=dwnld;&lt;/DIV&gt;&lt;DIV&gt;headers&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;"X-API-Token"="yourAPItoken";&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;</description>
      <pubDate>Tue, 11 Sep 2018 16:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-scraping-java-script-form-has-me-stuck/m-p/494535#M72323</guid>
      <dc:creator>mich1</dc:creator>
      <dc:date>2018-09-11T16:24:17Z</dc:date>
    </item>
  </channel>
</rss>

