<?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: web scraping LinkedIn site in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/web-scraping-LinkedIn-site/m-p/448756#M112894</link>
    <description>Thank you Chris for your answer. As I was "just" trying to scrap my own page I hadn't realized it could be an issue for LinkedIn.&lt;BR /&gt;Thank you!</description>
    <pubDate>Mon, 26 Mar 2018 17:52:16 GMT</pubDate>
    <dc:creator>SophieSaas</dc:creator>
    <dc:date>2018-03-26T17:52:16Z</dc:date>
    <item>
      <title>web scraping LinkedIn site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/web-scraping-LinkedIn-site/m-p/448683#M112887</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to extract data &lt;SPAN&gt;from my own LinkedIn page, using SAS 9.4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I've seen the various posts on this community and internet, for instance&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've used the&amp;nbsp;PWENCODE procedure to encode my password into a txt file. I get it back in the macro variable &amp;amp;PASS.&lt;/P&gt;&lt;P&gt;So far, I've written the code :&lt;/P&gt;&lt;PRE&gt;filename recupFIC "C:\PASS to output file\test.xml";
proc http
	method="GET"
	url="https://www.linkedin.com/company/MYSITENUMBER/admin/analytics"
	out=recupFIC
	WEBAUTHDOMAIN="www.linkedin.com"
	webusername="my username here"
	webpassword="&amp;amp;PASS."
	;
run;&lt;/PRE&gt;&lt;P&gt;When I run this code, a window opens and I am asked to fill the fields for a metadata server : Server Name, User Id and password. I don't understand where I can find these informations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to scrap a simple page (no authentification required), it works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 15:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/web-scraping-LinkedIn-site/m-p/448683#M112887</guid>
      <dc:creator>SophieSaas</dc:creator>
      <dc:date>2018-03-26T15:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: web scraping LinkedIn site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/web-scraping-LinkedIn-site/m-p/448694#M112891</link>
      <description>&lt;P&gt;WEBAUTHDOMAIN is for an administered SAS mid-tier, so that's not an option you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WEBUSERNAME and WEBPASSWORD is for "&lt;A href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_self"&gt;Basic Auth&lt;/A&gt;" -- but LinkedIn does not use that mechanism.&amp;nbsp; 3rd party applications must use LinkedIn APIs and connect with OAuth2 -- a much more complex negotiation.&amp;nbsp; And I'm not sure that LinkedIn APIs provide the data you want to get. &lt;A href="https://developer.linkedin.com/#" target="_self"&gt; Check their Developer site&lt;/A&gt; to see what's possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Web scraping is most likely against LinkedIn's data use policy.&amp;nbsp; While you might be just trying to experiment with your own profile, taking it further is probably against their rules.&amp;nbsp; If you just want to "practice" parsing your page, use your web browser to Save As HTML and then use SAS to process that as an INFILE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 16:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/web-scraping-LinkedIn-site/m-p/448694#M112891</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-03-26T16:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: web scraping LinkedIn site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/web-scraping-LinkedIn-site/m-p/448756#M112894</link>
      <description>Thank you Chris for your answer. As I was "just" trying to scrap my own page I hadn't realized it could be an issue for LinkedIn.&lt;BR /&gt;Thank you!</description>
      <pubDate>Mon, 26 Mar 2018 17:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/web-scraping-LinkedIn-site/m-p/448756#M112894</guid>
      <dc:creator>SophieSaas</dc:creator>
      <dc:date>2018-03-26T17:52:16Z</dc:date>
    </item>
  </channel>
</rss>

