defmodule Scraper.Site.Sequoia.Show do
  alias Scraper.Site.Helper.TechKeywordsFinder
  alias Customer.Web.Service.JobSourceCreator



  @body '''
  <!DOCTYPE html>\n\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"description\" content='Senior Application Engineer, Identity'>\n\n       <meta name=\"twitter:site\" content=\"@sequoia\" />\n  <meta name=\"twitter:card\" content=\"summary\" />\n  <meta property=\"og:site_name\" content=\"Sequoia Capital\"/>\n  <meta property=\"og:title\" content='Sequoia - Jobs'/>\n  <meta property=\"og:description\" content='Senior Application Engineer, Identity'/>\n\n\n    <link rel=\"icon\" href=\"/img/favicon.ico\" type=\"image/x-icon\">\n    <link rel=\"shortcut icon\" href=\"/img/favicon.ico\" type=\"image/x-icon\">\n    <link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"/img/apple-icon-57x57.png\">\n    <link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"/img/apple-icon-60x60.png\">\n    <link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"/img/apple-icon-72x72.png\">\n    <link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"/img/apple-icon-76x76.png\">\n    <link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"/img/apple-icon-114x114.png\">\n    <link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"/img/apple-icon-120x120.png\">\n    <link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"/img/apple-icon-144x144.png\">\n    <link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"/img/apple-icon-152x152.png\">\n    <link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/img/apple-icon-180x180.png\">\n    <link rel=\"icon\" type=\"image/png\" sizes=\"192x192\"  href=\"/img/android-icon-192x192.png\">\n    <link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/img/favicon-32x32.png\">\n    <link rel=\"icon\" type=\"image/png\" sizes=\"96x96\" href=\"/img/favicon-96x96.png\">\n    <link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/img/favicon-16x16.png\">\n    <link rel=\"manifest\" href=\"/img/manifest.json\">\n    <meta name=\"msapplication-TileColor\" content=\"#ffffff\">\n    <meta name=\"msapplication-TileImage\" content=\"/img/ms-icon-144x144.png\">\n    <meta name=\"theme-color\" content=\"#ffffff\">\n\n    <!-- Use title if its defined in the pages -->\n    <title>Sequoia - Jobs</title>\n    <script>\n      var regionalizedLocalizedSearchData = '/search_data.json';\n      var resultWord = 'Result';\n      var resultsWord = 'Results';\n      var defaultRegionSlug = \"us\";\n      var regionSlug  = \"us\";\n      var companiesURL = \"/companies/\";\n      var contactURL = \"/contact/\";\n      var crucibleURL = \"/company-story/\";\n      var companiesList = [\"24-7\", \"3com\", \"amcc\", \"microchip-technology\", \"mobileiron\", \"mongodb\", \"natera\", \"netapp\", \"netezza\", \"netscreen\", \"nimble-storage\", \"amylin\", \"nubank\", \"numerify\", \"nvidia\", \"okta\", \"onyx-pharmaceuticals\", \"opendns\", \"oracle\", \"orbital-insight\", \"palo-alto-networks\", \"paypal\", \"app-annie\", \"percolate\", \"picsart\", \"pixelworks\", \"plain-vanilla\", \"plan-grid\", \"pmc-sierra\", \"pocket-gems\", \"popsugar\", \"progress-software\", \"prosper\", \"appirio\", \"qualtrics\", \"quantenna\", \"r2-semiconductor\", \"rackspace\", \"redback-networks\", \"reddit\", \"ringcentral\", \"roambi\", \"ruckus-wireless\", \"apple\", \"saba-software\", \"scanntech\", \"securityscorecard\", \"sencha\", \"servicenow\", \"simplisafe\", \"skyhigh-networks\", \"skyscanner\", \"sourcefire\", \"arbor-hyperion\", \"springpath\", \"square\", \"stella-and-dot\", \"strava\", \"stripe\", \"sumo-logic\", \"sunrun\", \"symantec\", \"telcare\", \"thanx\", \"aruba\", \"thousandeyes\", \"thumbtack\", \"trulia\", \"tula-technology\", \"tumblr\", \"tunein\", \"unity-technologies\", \"va-linux-sourceforge\", \"varagesale\", \"aspect-development\", \"versa-networks\", \"viptela\", \"virident-systems\", \"vulcun\", \"weebly\", \"whatsapp\", \"whisper\", \"xoom\", \"yahoo\", \"yik-yak\", \"assurex-health\", \"youtube\", \"zappos\", \"zirmed\", \"aster-data\", \"6wunderkinder\", \"atari\", \"avanex\", \"barefoot-networks\", \"barracuda-networks\", \"birst\", \"bit9\", \"blue-danube-systems\", \"cafepress\", \"carbon3d\", \"centerrun\", \"achievers\", \"chartboost\", \"cisco\", \"clari\", \"clearwell-systems\", \"clever\", \"clickatell\", \"comprehend\", \"cumulus-networks\", \"cypress\", \"admob\", \"decolar\", \"docker\", \"doordash\", \"drawbridge\", \"dropbox\", \"duck-duck-moose\", \"electronic-arts\", \"elevate\", \"elevate-credit\", \"endochoice\", \"agile\", \"eventbrite\", \"evernote\", \"fireeye\", \"first-republic-bank\", \"flextronics\", \"futureadvisor\", \"gamefly\", \"good-eggs\", \"google\", \"green-dot\", \"agilone\", \"guardant-health\", \"hayneedle\", \"health-catalyst\", \"hearsay-social\", \"hirevue\", \"houzz\", \"hubspot\", \"humble-bundle\", \"infoblox\", \"inkling\", \"airbnb\", \"ins\", \"inside.com\", \"instacart\", \"instagram\", \"ipg\", \"isilon-systems\", \"jawbone\", \"jive\", \"kahuna\", \"kayak\", \"airstrip\", \"keen-io\", \"kenshoo\", \"klarna\", \"lattice-engines\", \"lifecode\", \"linear-technology\", \"linkedin\", \"litepoint\", \"altiscale\", \"lsi-logic\", \"luminate\", \"marklogic\", \"medallia\", \"medexpress\", \"mellanox\", \"meraki\", \"merlin-securities\", \"metanautix\", \"metaswitch-networks\", \"kiwi\", \"mu-sigma\", \"4VJlHIDpDiscgKsYkSQ6gY\", \"4EwMF0p0VW2wKW0C4iGGWo\", \"2fjEyIvMIg0meSmAoQoyYo\", \"moovit\", \"6C8stWs27muUeSOiqiywOe\", \"5luyGiYSDmeY02WaGWScay\", \"4N8jq1xLqEGQ0AC2U4CGYk\", \"2GNXw1dNVe8WgM684yeUYa\", \"2dt9xmOsEwyQSoeyeiAw66\", \"6FvttHEbJuciqM6KCuciEK\", \"GDGTWNkqUoOY62QcosKEw\", \"7jhtuDxXdSqo4MkCwQYkyG\", \"6oyQVDhh6MGy4SeU6yew8C\", \"44gkVl1hTisGG8eGOiYQeQ\", \"5z7Ru7SgKIkeeGuaQc6SUE\", \"5RjEqS5iUM8My024Y0QocA\", \"12uiWGChdOoASYOmiwck6Q\", \"1LsmuAHJdSOQ4O0KQyqc6C\"];\n      if(regionSlug === defaultRegionSlug ) {\n        crucibleURL = crucibleURL;\n      } else {\n        crucibleURL = \"/\"+regionSlug+crucibleURL;\n      }\n      var china = false;\n    </script>\n\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"//cloud.typography.com/6840974/719988/css/fonts.css\" />\n    <link rel='stylesheet' type='text/css' href='https://d33wubrfki0l68.cloudfront.net/bundles/47da5a025e4ebc75cdfabdefaf4eeca78470177d.css'/>\n\n    <script type='text/javascript' src='https://d33wubrfki0l68.cloudfront.net/js/a7405807460a3d8398d0ea49e305ad16ff90f631/js/all.js'></script>\n    <script type='text/javascript' src='https://d33wubrfki0l68.cloudfront.net/js/b72db96ed804a88f2a690ac43735e59f5925a686/js/sq/pages/job.js'></script>\n\n\n    <script>\n        Handlebars.registerHelper('if_even', function(conditional, options) {\n          if((conditional % 2) == 0) {\n            return options.fn(this);\n          } else {\n            return options.inverse(this);\n          }\n        });\n\n        Handlebars.registerHelper('if_odd', function(conditional, options) {\n          if((conditional % 2) == 1) {\n            return options.fn(this);\n          } else {\n            return options.inverse(this);\n          }\n        });\n\n        Handlebars.registerHelper('if_eq', function(v1, v2, options) {\n          if (v1 == v2) {\n            return options.fn(this);\n          } else {\n            return options.inverse(this);\n          }\n        });\n    </script>\n\n    <!-- Start of Async HubSpot Analytics Code -->\n    <script type=\"text/javascript\">\n    (function(d,s,i,r) {\n    if (d.getElementById(i)){return;}\n    var n=d.createElement(s),e=d.getElementsByTagName(s)[0];\n    n.id=i;n.src='//js.hs-analytics.net/analytics/'+(Math.ceil(new Date()/r)*r)+'/1926445.js';\n    e.parentNode.insertBefore(n, e);\n    })(document,\"script\",\"hs-analytics\",300000);\n    </script>\n    <!-- End of Async HubSpot Analytics Code -->\n\n  <script>\nvar _prum = [['id', '55bec620abe53d803d233b21'],\n             ['mark', 'firstbyte', (new Date()).getTime()]];\n(function() {\n    var s = document.getElementsByTagName('script')[0]\n      , p = document.createElement('script');\n    p.async = 'async';\n    p.src = '//rum-static.pingdom.net/prum.min.js';\n    s.parentNode.insertBefore(p, s);\n})();\n</script></head>\n\n  <body>\n    <div class=\"search _container js-search\">\n  <div class=\"search _animation-holder js-search-animate\">\n\n    <div class=\"close-button js-close-search -animate\">\n        <img src=\"https://d33wubrfki0l68.cloudfront.net/a8b7be45fe2d685ee537fa87db5c476a021a8ef8/66ded/img/close-x.svg\" />\n    </div>\n    <div class=\"_title-holder\">\n      <span class=\"js-search-title _search-title -action -grey-lighter -block\">Search</span>\n      <span class=\"js-results-title _results-title -action -green -block\">0 Results</span>\n    </div>\n\n    <div class=\"search _content js-search-content\">\n\n\n\n      <div class=\"search _input js-search-input-holder\">\n        <!-- Autofocus -->\n        <input id=\"search-box\" class=\"js-search-input\" type=\"text\" maxlength=\"100\">\n      </div>\n\n      <div class=\"search _results js-search-results\">\n\n\n      </div>\n\n    </div>\n\n  </div>\n</div>\n\n<script id=\"search-results-template\" type=\"text/x-handlebars-template\">\n  <div class=\"_results-column\">\n    {{#each results}}\n      {{#if_even @index}}\n        {{> search-results}}\n      {{/if_even}}\n    {{/each}}\n  </div>\n\n  <div class=\"_results-column\">\n    {{#each results}}\n      {{#if_odd @index}}\n        {{> search-results}}\n      {{/if_odd}}\n    {{/each}}\n  </div>\n\n</div>\n</script>\n\n<script id=\"search-results-partial\" type=\"text/x-handlebars-template\">\n  {{#if_eq category 'company'}}\n    {{#with item}}\n    <a href=\"{{url}}\">\n      <div class=\"_individual-result\" data-sr onClick=\"sq.main.openCompany('{{url}}')\">\n        <div class=\"_result-block\"></div>\n        <span class=\"_result -large-title -smaller -block -grey-dark\">\n          {{name}}\n        </span>\n        <div class=\"_results-button -relative-inline-block\">\n          <span class=\"_result-group-title -action -grey-lighter\">View Company Profile</span>\n        </div>\n      </div>\n      </a>\n    {{/with}}\n  {{/if_eq}}\n\n  {{#if_eq category 'person'}}\n    {{#with item}}\n      <a href=\"{{url}}\">\n        <div class=\"_individual-result\" data-sr>\n          <div class=\"_result-block\"></div>\n          <span class=\"_result -large-title -smaller -block -grey-dark\">\n            {{name}}\n          </span>\n          <div class=\"_results-button -relative-inline-block\">\n            <span class=\"_result-group-title -action -grey-lighter\">VIEW PROFILE</span>\n          </div>\n        </div>\n      </a>\n    {{/with}}\n  {{/if_eq}}\n\n  {{#if_eq category 'story'}}\n    {{#with item}}\n      <a href=\"{{url}}\">\n        <div class=\"_individual-result\" data-sr>\n          <div class=\"_result-block\" style=\"background-color:rgba({{rgb}}, 1);\"></div>\n          <span class=\"_result -large-title -smaller -block -grey-dark\">\n            {{sub_text}}\n          </span>\n          <div class=\"_results-button -relative-inline-block\">\n            <span class=\"_result-group-title -action -grey-lighter\">Read The {{company}} Story</span>\n          </div>\n        </div>\n      </a>\n    {{/with}}\n  {{/if_eq}}\n\n  {{#if_eq category 'article'}}\n    {{#with item}}\n      <a href=\"{{url}}\">\n        <div class=\"_individual-result\" data-sr>\n          <div class=\"_result-block\"></div>\n          <span class=\"_result -large-title -smaller -block -grey-dark\">\n            {{title}}\n          </span>\n          <div class=\"_results-button -relative-inline-block\">\n            <span class=\"_result-group-title -action -grey-lighter\">Read Article</span>\n          </div>\n        </div>\n      </a>\n    {{/with}}\n  {{/if_eq}}\n\n  {{#if_eq category 'subnav'}}\n    {{#with item}}\n      <a href=\"{{url}}\">\n        <div class=\"_individual-result\" data-sr>\n          <div class=\"_result-block\"></div>\n          <span class=\"_result -large-title -smaller -block -grey-dark\">\n            {{name}}\n          </span>\n          <div class=\"_results-button -relative-inline-block\">\n            <span class=\"_result-group-title -action -grey-lighter\">View Team</span>\n          </div>\n        </div>\n      </a>\n    {{/with}}\n  {{/if_eq}}\n\n  {{#if_eq category 'heritage'}}\n    {{#with item}}\n      <a href=\"{{url}}\">\n        <div class=\"_individual-result\" data-sr>\n          <div class=\"_result-block\"></div>\n          <span class=\"_result -large-title -smaller -block -grey-dark\">\n            {{name}}\n          </span>\n          <div class=\"_results-button -relative-inline-block\">\n            <span class=\"_result-group-title -action -grey-lighter\">View Heritage</span>\n          </div>\n        </div>\n      </a>\n    {{/with}}\n  {{/if_eq}}\n\n  {{#if_eq category 'principles'}}\n    {{#with item}}\n      <a href=\"{{url}}\">\n        <div class=\"_individual-result\" data-sr>\n          <div class=\"_result-block\"></div>\n          <span class=\"_result -large-title -smaller -block -grey-dark\">\n            {{name}}\n          </span>\n          <div class=\"_results-button -relative-inline-block\">\n            <span class=\"_result-group-title -action -grey-lighter\">View Principles</span>\n          </div>\n        </div>\n      </a>\n    {{/with}}\n  {{/if_eq}}\n</script>\n\n\n    \n<script>\n  $(function() {\n    $('.region-link').click(function(evt) {\n      country_code = $(evt.target).attr('data-country-code');\n      lang_code = $(evt.target).attr('data-language-code');\n      Cookies.remove('nf_country');\n      Cookies.set('nf_country', country_code, { path: '/' });\n      Cookies.remove('nf_lang');\n      Cookies.set('nf_lang', lang_code, { path: '/' });\n    });\n  });\n</script>\n\n<div class=\"more-menu _container js-more-menu\">\n  <div class=\"more-menu _menu-holder js-more-menu-content\">\n    <div class=\"close-button js-close-more-menu\">\n    <img class=\"inject-svg\" src=\"https://d33wubrfki0l68.cloudfront.net/a8b7be45fe2d685ee537fa87db5c476a021a8ef8/66ded/img/close-x.svg\" />\n    </div>\n\n      <ul class=\"more-menu _menu-list -overlay-menu-title -grey-dark jq-more-menu js-hide-on-password-reset\">\n        <li>\n          <a class=\"-relative-inline-block\" href=\"/jobs/\">Jobs</a>\n        </li>\n        <li>\n          <a class=\"-relative-inline-block\" href=\"/contact/menlo-park/\">Contact</a>\n        </li>\n        <li>\n          <a class=\"-relative-inline-block\" href=\"/legal/\">Legal</a>\n        </li>\n      </ul>\n        <div class=\"more-menu _menu-list -overlay-menu-title -grey-dark hidden js-show-on-password-reset\">\n          Password Reset! Please continue below.\n          <div class=\" more-menu _login -action -grey-lighter -body-copy-medium\"></div>\n        </div>\n        <div class=\"more-menu _login js-more-login hidden js-show-on-password-reset\">\n          <span class=\"_button -body-copy-medium -grey-lighter -bold js-more-login-button\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Login Click', 'Toggle Login Expander');\">Login\n           <img class=\"inject-svg svg-arrow\" src=\"https://d33wubrfki0l68.cloudfront.net/7fed4f4b37269ba82a6747922500c20ad78ed110/9de0c/img/left-arrow-tight.svg\" />\n          </span>\n          <ul>\n            <li class=\"-action -grey-lighter\"><a onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Login Click', 'Click Scouts Login');\" href=\"https://scouts.sequoiacap.com\">Sequoia Scouts</a></li>\n            <li class=\"-action -grey-lighter\"><a onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Login Click', 'Click Founder Login');\" href=\"https://commons.sequoiacap.com\">Sequoia Commons</a></li>\n            <li class=\"-action -grey-lighter\"><a onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Login Click', 'Click Limited Partner Login');\" href=\"https://partnerlogin.sequoiacap.com\">Limited Partner</a></li>\n          </ul>\n        </div>\n        <div class=\"more-menu _login js-more-login js-hide-on-password-reset\">\n          <span class=\"_button -body-copy-medium -grey-lighter -bold js-more-login-button\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Login Click', 'Toggle Login Expander');\">Login\n           <img class=\"inject-svg svg-arrow\" src=\"https://d33wubrfki0l68.cloudfront.net/7fed4f4b37269ba82a6747922500c20ad78ed110/9de0c/img/left-arrow-tight.svg\" />\n          </span>\n          <ul>\n            <li class=\"-action -grey-lighter\"><a onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Login Click', 'Click Founder Login');\" href=\"https://commons.sequoiacap.com\">Sequoia Commons</a></li>\n            <li class=\"-action -grey-lighter\"><a onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Login Click', 'Click Limited Partner Login');\" href=\"https://partnerlogin.sequoiacap.com\">Limited Partner</a></li>\n          </ul>\n        </div>\n\n      <div class=\"more-menu _region js-more-login  js-hide-on-password-reset\">\n        <span class=\"_button -body-copy-medium -grey-lighter -bold js-more-login-button\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Toggle Region Expander');\">\n          United States\n         <img class=\"inject-svg svg-arrow\" src=\"https://d33wubrfki0l68.cloudfront.net/7fed4f4b37269ba82a6747922500c20ad78ed110/9de0c/img/left-arrow-tight.svg\" />\n        </span>\n        <ul>\n                 <li class=\"-action -grey-lighter\">\n<a class=\"region-link\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Click 中国');\" data-country-code=\"cn\" data-language-code=\"zh\" href=\"/china/\">                     中国\n</a>                 </li>\n                 <li class=\"-action -grey-lighter\">\n<a class=\"region-link\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Click China');\" data-country-code=\"cn\" data-language-code=\"en\" href=\"/china/en/\">                     China\n</a>                 </li>\n                 <li class=\"-action -grey-lighter\">\n<a class=\"region-link\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Click India');\" data-country-code=\"in\" data-language-code=\"en\" href=\"/india/\">                     India\n</a>                 </li>\n                 <li class=\"-action -grey-lighter\">\n<a class=\"region-link\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Click Israel');\" data-country-code=\"il\" data-language-code=\"en\" href=\"/israel/\">                     Israel\n</a>                 </li>\n        </ul>\n      </div>\n  </div>\n</div>\n\n\n    <div class=\"company-holder _close js-company-close\" onClick=\"sq.main.closeCompany();\">\n  <div class=\"close-button -animate\">\n    <img src=\"https://d33wubrfki0l68.cloudfront.net/a8b7be45fe2d685ee537fa87db5c476a021a8ef8/66ded/img/close-x.svg\" />\n  </div>\n</div>\n\n\n<div class=\"company-holder _container js-company-holder js-expand-color \">\n\n  <div class=\"company-holder _close-mobile js-company-close\" onClick=\"sq.main.closeCompany();\">\n    <div class=\"close-button\">\n      <img src=\"https://d33wubrfki0l68.cloudfront.net/a8b7be45fe2d685ee537fa87db5c476a021a8ef8/66ded/img/close-x.svg\" />\n    </div>\n  </div>\n\n  <div class=\"js-company-partial-holder\">\n  </div>\n\n</div>\n\n\n    <div class=\"overlay js-white-overlay\"></div>\n\n    <div class=\"mobile-nav _container\">\n      <div class=\"mobile-nav _logo js-mobile-logo\">\n<a href=\"/\">          <img width=\"114\" height=\"15\" class=\"nav _logo\" src=\"https://d33wubrfki0l68.cloudfront.net/c39159fd819325c94bae081cf65414e390e29fe7/c04d3/img/sequoia-mark-full-grey.svg\" />\n</a>      </div>\n      <div class=\"mobile-nav _button\" onClick=\"sq.main.openMobileMenu()\">\n        <img src=\"https://d33wubrfki0l68.cloudfront.net/cec44d75c1ca8d731cecb40b5562af25176e7460/f9399/img/burger.svg\" />\n      </div>\n    </div>\n\n    <div class=\"mobile-nav _menu js-mobile-menu\">\n      <div class=\"mobile-nav _menu-content js-mobile-menu-content\">\n        <div class=\"mobile-nav _close js-mobile-menu-close\" onClick=\"sq.main.closeMobileMenu()\">\n          <div class=\"close-button pointer\">\n            <img src=\"https://d33wubrfki0l68.cloudfront.net/a8b7be45fe2d685ee537fa87db5c476a021a8ef8/66ded/img/close-x.svg\" />\n          </div>\n        </div>\n\n        <ul class=\"mobile-nav _links -mobile-nav-button-text -smaller\">\n            <li ><a href=\"/people/\">People</a></li>\n            <li ><a href=\"/build/\">Build</a></li>\n            <li ><a href=\"/companies/\">Companies</a></li>\n            <li ><a href=\"/\">Stories</a></li>\n        </ul>\n\n          <ul class=\"mobile-nav _links -mobile-nav-button-text -smaller -grey-dark\">\n            <li class=\"-pointer\"><a onClick=\"sq.search.openSearch();\">Search</a></li>\n            <li ><a href=\"/jobs/\">Jobs</a></li>\n            <li ><a href=\"/contact/menlo-park/\">Contact</a></li>\n            <li ><a href=\"/legal/\">Legal</a></li>\n          </ul>\n          <div class=\"mobile-nav _dropdowns\">\n              <div class=\"more-menu _login js-more-login\">\n                <span class=\"_button -body-copy-medium -grey-lighter -bold js-more-login-button\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Login Click', 'Toggle Login Expander');\">Login\n                <img class=\"inject-svg svg-arrow\" src=\"https://d33wubrfki0l68.cloudfront.net/7fed4f4b37269ba82a6747922500c20ad78ed110/9de0c/img/left-arrow-tight.svg\" /></span>\n\n                <ul>\n                  <li class=\"-action -grey-lighter\"><a onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Login Click', 'Click Founder Login');\" href=\"https://commons.sequoiacap.com\">Sequoia Commons</a></li>\n                  <li class=\"-action -grey-lighter\"><a onClick=\"trackItem('Click Limited Partner Login', 'global');\" href=\"https://partnerlogin.sequoiacap.com\">Limited Partner</a></li>\n                </ul>\n\n              </div>\n\n            <div class=\"more-menu _region js-more-login  \">\n              <span class=\"_button -body-copy-medium -grey-lighter -bold js-more-login-button\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Toggle Region Expander');\">United States</span>\n              <img class=\"inject-svg svg-arrow\" src=\"https://d33wubrfki0l68.cloudfront.net/7fed4f4b37269ba82a6747922500c20ad78ed110/9de0c/img/left-arrow-tight.svg\" />\n\n              <ul>\n                     <li class=\"-action -grey-lighter\">\n<a class=\"region-link\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Click 中国');\" data-country-code=\"cn\" data-language-code=\"zh\" href=\"/china/\">                         中国\n</a>                     </li>\n                     <li class=\"-action -grey-lighter\">\n<a class=\"region-link\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Click China');\" data-country-code=\"cn\" data-language-code=\"en\" href=\"/china/en/\">                         China\n</a>                     </li>\n                     <li class=\"-action -grey-lighter\">\n<a class=\"region-link\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Click India');\" data-country-code=\"in\" data-language-code=\"en\" href=\"/india/\">                         India\n</a>                     </li>\n                     <li class=\"-action -grey-lighter\">\n<a class=\"region-link\" onClick=\"trackItem('All Pages', 'Global Navigation', 'More Menu Region Click', 'Click Israel');\" data-country-code=\"il\" data-language-code=\"en\" href=\"/israel/\">                         Israel\n</a>                     </li>\n              </ul>\n\n            </div>\n          </div>\n\n        <div class=\"mobile-nav _end-leaf\">\n        <img src=\"https://d33wubrfki0l68.cloudfront.net/6bf68b8923722af685dc3328b67d68e95c3ff162/2921d/img/sequoia-leaf.svg\" />\n        </div>\n\n      </div>\n    </div>\n\n    <div class=\"announcement _container js-warning\">\n  <div class=\"announcement _background js-close-warning\"></div>\n    <div class=\"announcement _inside -warning -no-image\">\n      <div class=\"_content-holder -warning\">\n        <div class=\"_leaf -warning\">\n          <img width=\"80\" height=\"80\" src=\"https://d33wubrfki0l68.cloudfront.net/704e630a05d966198ae2611d70dd6ac88dbb1c9c/d0c8e/img/warning.svg\" />\n        </div>\n\n        <div class=\"_title -large-title -white\">Sorry. This page is not\nyet translated.</div>\n\n        <div class=\"_button-holder -action -white -warning\">\n          <span class=\"_button\"><a href=\"#\" class=\"js-close-warning\">Continue to english version</a></span>\n        </div>\n      </div>\n  </div>\n</div>\n\n\n    <script>\n      var currentAnnouncement = null;\n    </script>\n\n    <div class=\"main-logo -home js-main-logo \">\n<a href=\"/\">        <img width=\"149\" height=\"21\" class=\"nav _logo _green\" src=\"https://d33wubrfki0l68.cloudfront.net/ab0c562df0efa9d35aee5ead288f4a96ec43c25a/e77b4/img/sequoia-mark-full-green.svg\" />\n        <img width=\"149\" height=\"21\" class=\"nav _logo _grey\" src=\"https://d33wubrfki0l68.cloudfront.net/c39159fd819325c94bae081cf65414e390e29fe7/c04d3/img/sequoia-mark-full-grey.svg\" />\n</a>    </div>\n\n    <div class=\"nav js-nav-container _container \">\n\n      <div class=\"nav _right js-nav-right\">\n        <ul class=\"nav _nav-links -black\">\n            <li class=\"\"><a href=\"/people/\">People</a></li>\n            <li ><a href=\"/build/\">Build</a></li>\n            <li ><a href=\"/companies/\">Companies</a></li>\n          <li class=\"-pointer\" onClick=\"sq.search.openSearch();\">\n            <img width=\"14\" height=\"14\" class=\"inject-svg search-glass\" src=\"https://d33wubrfki0l68.cloudfront.net/ef96b66a9477de58ee8e18d02f7eeeb64001cc7f/69c15/img/search.svg\" />\n          </li>\n          <li class=\"-pointer\" onClick=\"sq.main.openMoreMenu();trackItem('All Pages', 'Global Navigation', 'Open More Menu Click', 'More Menu Icon');\">\n            <img width=\"30\" height=\"14\" class=\"inject-svg\" src=\"https://d33wubrfki0l68.cloudfront.net/3fdb188080543769512136b7a10acfc5218260a9/3fc1e/img/dotdotdot.svg\" />\n          </li>\n        </ul>\n      </div>\n\n    </div>\n\n    <div class=\"page-content js-page-holder -home\">\n      \n\n\n\n<div class=\"job _container\">\n\n  <div class=\"job _header\">\n\n    <div class=\"_large-title -large-title -block\">GitHub</div>\n\n    <div class=\"_intro-copy\">\n      <p class=\"-body-copy-medium\">Where people build software.</p>\n    </div>\n  </div>\n\n  <div class=\"job _content\">\n    <span class=\"job _job-desc-title -headline -bold -block -black\">Senior Application Engineer, Identity</span>\n    <div class=\"-body-copy-medium -grey -block\">\n      San Francisco, CA, US<br>\n    </div>\n    <div class=\"job _job-description\">\n      <span class=\"-body-copy-medium -bold\">Job Description / Skills Required</span>\n      <p class=\"-body-copy-medium -grey\">GitHub is changing the way the world builds software, and we want you to help build GitHub. We’re looking for an experienced application engineer to work on GitHub.com — you’ll work with our team of engineers to build and maintain features that create rich and compelling experiences with millions of developers across the world.<br />\r\n<br />\r\nThe main focus of this role is to build customer-facing products for GitHub.com, working to create and deliver features that make our users&#039; lives better.<br />\r\nRESPONSIBILITIES:<br />\r\n<br />\r\nWriting and reviewing application code<br />\r\nWorking with Product teams to define new features<br />\r\nDocumenting the systems you help build<br />\r\nCoordinating with engineering leadership to define and prioritize engineering projects<br />\r\nWorking with support to triage and debug technical support requests<br />\r\nQUALIFICATIONS:<br />\r\n<br />\r\n4+ of experience developing web applications (preferably some Ruby on Rails)<br />\r\nExperience leading a non-trivial technical effort with two or more peers<br />\r\nExperience with Git and GitHub<br />\r\nSQL and general database knowledge<br />\r\nA background in refactoring large-scale systems<br />\r\nSolid knowledge of testing principles<br />\r\nStrong communication skills<br />\r\nGitHub is committed to building a diverse workforce and strongly encourages applications from people of color and other groups currently underrepresented in tech. We are looking for candidates who:<br />\r\n<br />\r\n•Display a strong commitment to building an inclusive tech environment<br />\r\n•Have demonstrated resilience and resourcefulness both in and outside of the workplace<br />\r\n•Can bring a new perspective based on unique educational, professional, and lived experiences<br />\r\n•Can effectively communicate with people from disparate backgrounds<br />\r\n•Have experience mentoring/coaching/teaching, particularly in environments with diverse students/participants<br />\r\n<br />\r\nWHO WE ARE<br />\r\n<br />\r\nGitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. Over ten million people use GitHub to build amazing things together. With the collaborative features of GitHub.com, our desktop and mobile apps, and GitHub Enterprise, it has never been easier for individuals and teams to write better code, faster.<br />\r\n<br />\r\nWe have a lot of exciting things to do, and we’re looking for the right people to grow with us!<br />\r\n<br />\r\nWHY YOU SHOULD JOIN<br />\r\n<br />\r\nWorking at GitHub is, to put it simply, a special slice of the universe. We&#039;re committed to transparency, collaboration, experimentation, and always staying classy.<br />\r\n<br />\r\nBecause of this unique perspective, we&#039;ve established one of the most flexible and well designed physical workspaces around that encourages you to work as you work best. Right now, over 60% of our employees are based outside of our San Francisco (SOMA) headquarters and work according to how they get their best stuff done.<br />\r\n<br />\r\nEnsuring that GitHubbers are healthy, motivated, focused and creative is how GitHub stays awesome. Part of this is ensuring that our benefits* are out of this world.<br />\r\n<br />\r\nIn a nutshell, we&#039;ve built and are growing a place where we truly love working, and we think you will too.<br />\r\n<br />\r\nGitHub is made up of people with many different backgrounds and lifestyles, and we like it that way. We invite applications from people of all stripes. We don&#039;t discriminate against employees or applicants based on gender identity or expression, sexual orientation, race, religion, age, national origin, citizenship, disability, pregnancy status, veteran status, or any other differences that people imagine to discriminate against one another. Also, if you have a disability, please let us know if there&#039;s anything we can do to make the interview process better for you; we&#039;re happy to accommodate.</p>\n    </div>\n\n\n    <div class=\"job _apply-area\">\n        <a onClick=\"trackItem('Job Detail', 'Jobs Navigation', 'Apply Click', 'Apply GitHub Senior Application Engineer, Identity');\" href=\"https://ventureloop.com/ventureloop/api/rapi.php?jobId=NDg4fDYwMDMxNA==\" target=\"_blank\">\n        <button class=\"-extra-pad\">Apply</button>\n      </a>\n    </div>\n\n    <div class=\"job _company-info\">\n      <span class=\"_more-jobs-title -block -body-copy -bold -black\">More Jobs at GitHub</span>\n      <ul class=\"job _jobs-list\">\n            <li class=\"-body-copy -grey-light\">\n<a href=\"/jobs/585982/\">                <span class=\"_job-title -block\"><b>Director of HR Operations</b></span>\n                <span class=\"_city -block\">San Francisco, CA, US</span>\n</a>            </li>\n            <li class=\"-body-copy -grey-light\">\n<a href=\"/jobs/566059/\">                <span class=\"_job-title -block\"><b>Application Engineer: Atom</b></span>\n                <span class=\"_city -block\">San Francisco, CA, US</span>\n</a>            </li>\n            <li class=\"-body-copy -grey-light\">\n<a href=\"/jobs/563506/\">                <span class=\"_job-title -block\"><b>Application Security Engineer - Systems</b></span>\n                <span class=\"_city -block\">world wide</span>\n</a>            </li>\n      </ul>\n      <span class=\"_back-to-all -block -action -green\">\n<a href=\"/jobs/\">        Back to All Jobs\n</a>      </span>\n    </div>\n  </div>\n</div>\n\n\n        <div class=\"footer _container js-footer\">\n  <div class=\"footer _end-leaf js-footer-leaf\" data-sr>\n<a href=\"/\">      <img src=\"https://d33wubrfki0l68.cloudfront.net/6bf68b8923722af685dc3328b67d68e95c3ff162/2921d/img/sequoia-leaf.svg\" />\n</a>  </div>\n</div>\n\n    </div>\n\n  <script type='text/javascript' src='https://d33wubrfki0l68.cloudfront.net/bundles/c177cd2c39d38973a591c3d2351d97ebc54373be.js'></script>\n  <script>\n    function trackItem(page, category, action, label){\n        analytics.track(action, {\n          category: category,\n          label: label,\n          page: page,\n          region: regionSlug\n        });\n    }\n\n    function resizeInitScrollReveal(){\n      var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n      if(w >= 768){\n        $(window).off('resize', resizeInitScrollReveal);\n        initScrollReveal();\n      }\n    }\n\n    function initScrollReveal(container) {\n      var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n      if(w < 768 && !container){\n        $(window).on('resize', resizeInitScrollReveal);\n        return;\n      }\n\n      var srConfig = {\n        viewport: window.document.documentElement,\n        move: '20px',\n        enter: 'bottom',\n        opacity: 0,\n        over: '1s',\n        scale: { direction: 'up', power: '0%' },\n        reset:  false,\n        delay: '.2s',\n        vFactor: 0.1,\n        mobile: false\n      }\n\n      if(container){\n        srConfig.viewport = container;\n\n        if(!window.srs){\n          window.srs = new searchReveal(srConfig);\n        }\n\n        srs.init(srConfig);\n\n      }else {\n        if(!window.sr){\n          window.sr = new scrollReveal(srConfig);\n        }\n\n        sr.init(srConfig);\n      }\n    }\n  </script>\n    <script type=\"text/javascript\">\n      !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error(\"Segment snippet included twice.\");else{analytics.invoked=!0;analytics.methods=[\"trackSubmit\",\"trackClick\",\"trackLink\",\"trackForm\",\"pageview\",\"identify\",\"group\",\"track\",\"ready\",\"alias\",\"page\",\"once\",\"off\",\"on\"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement(\"script\");e.type=\"text/javascript\";e.async=!0;e.src=(\"https:\"===document.location.protocol?\"https://\":\"http://\")+\"cdn.segment.com/analytics.js/v1/\"+t+\"/analytics.min.js\";var n=document.getElementsByTagName(\"script\")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION=\"3.0.1\";\n      analytics.load(\"g7ESSC63cwnIvbak7YG2VBiz4oWpgV5I\");\n      analytics.page()\n      }}();\n    </script>\n</html>\n
  '''

  def perform(url, :test) do
    @body
    |> Floki.parse
    |> params(url)
    |> upsert
  end

  def perform(url) do
    body(url)
    |> Floki.parse
    |> params(url)
    |> upsert
  end

  @defaultTimeout 10000

  defp body(url) do
    %HTTPoison.Response{body: body} = HTTPoison.get!(url, %{}, hackney: [recv_timeout: @defaultTimeout, timeout: @defaultTimeout])
    body
  end

  defp upsert(params) do
    JobSourceCreator.perform(params)
  end

  defp params(xml, url) do
    detail = build_detail(xml)
    job_title = job_title(xml)
    keywords = TechKeywordsFinder.perform(detail)
     %{
       url: url,
       name: company_name(xml),
       title: job_title,
       job_title: job_title,
       intro: intro(xml),
       place: place(xml),
       detail: detail,
       source: "Sequoia",
       keywords: keywords
     }
  end

  def company_name(xml) do
    xml
    |> Floki.find("._large-title")
    |> Floki.text
  end

  defp job_title(xml) do
    xml
    |> Floki.find("._job-desc-title")
    |> Floki.text
  end

  defp intro(xml) do
    xml
    |> Floki.find("._intro-copy")
    |> Floki.text
  end

  def place(xml) do
    xml
    |> Floki.find("._content")
    |> Floki.find(".-block")
    |> Floki.find(".-grey")
    |> Floki.text
    |> String.trim
  end

  defp build_detail(xml) do
    xml
      |> Floki.find("._job-description")
      |> Floki.find(".-grey")
      |> Floki.text
      |> String.replace("\n", "<br>")
      |> String.replace("\r", "")
  end

end
