Javascript 如何下载此网址的来源?

Javascript 如何下载此网址的来源?,javascript,selenium,curl,web-scraping,phantomjs,Javascript,Selenium,Curl,Web Scraping,Phantomjs,我正在尝试下载的源代码。我想得到我使用Chrome保存url时得到的相同文件 我首先尝试了wget和curl,但没有成功。我的意思是,下载的源代码大部分是空的;该页面可能使用Javascript创建其内容 然后我做了一些谷歌搜索,并尝试了这个。它不工作,退出时出现以下异常: TypeError: undefined is not a constructor (evaluating 'suffix.startsWith('http:')') https://outline.com/app.j

我正在尝试下载的源代码。我想得到我使用Chrome保存url时得到的相同文件

我首先尝试了wget和curl,但没有成功。我的意思是,下载的源代码大部分是空的;该页面可能使用Javascript创建其内容

然后我做了一些谷歌搜索,并尝试了这个。它不工作,退出时出现以下异常:

TypeError: undefined is not a constructor (evaluating 'suffix.startsWith('http:')')

  https://outline.com/app.js:20767
  https://outline.com/app.js:17217
  https://outline.com/app.js:17113 in onEachEvent
  https://outline.com/app.js:17210 in value
  https://outline.com/app.js:18695
  https://outline.com/app.js:18792
  https://outline.com/app.js:19000 in each
  https://outline.com/app.js:18792 in toggle
  https://outline.com/app.js:18683
  https://outline.com/app.js:19498 in mountTo
  https://outline.com/app.js:19638 in pushTags
  https://outline.com/app.js:19000 in each
  https://outline.com/app.js:19642 in pushTags
  https://outline.com/app.js:19693 in mount
  https://outline.com/app.js:20112
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" lang="en" class=" js csstransforms3d csstransitions" style=""><head>
        <title>Outline - Read &amp; annotate without distractions</title>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,height=device-height">
        <meta name="description" content="Outline is a free service for reading and annotating news articles. We remove the clutter so you can analyze and comment on the content.">
        <meta name="keywords" content="clean links readable readability medium typography annotations annotate">

        <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/daoolpmoieinofbnddaofhkhmbagfmnj">



        <link rel="stylesheet" href="https://outline.com/css/outline.css?v=1.0.1">
        <link rel="shortcut icon" href="https://outline.com/favicon.png">

        <!--[if lte IE 8]><script src="js/html5shiv.js"></script><![endif]-->
        <script async="" src="https://www.google-analytics.com/analytics.js"></script><script src="https://outline.com/js/modernizr.custom.js"></script>
        <script src="https://outline.com/app.js"></script>

        <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
        <script>
          (adsbygoogle = window.adsbygoogle || []).push({
            google_ad_client: "ca-pub-2748618594698147",
            enable_page_level_ads: true
          });
        </script>
    <style type="text/css">.yue { max-width: 650px; margin: 0 auto; }</style></head>
    <body>
        <outline-app></outline-app>
        <script>
            var riot = require('riot')
            require('initialize')
        </script>


</body></html>

我能做什么?

哦,是的,它能。要查看生成的页面,您应该在浏览器中打开该页面,并在开发人员模式下查看。

这不是错误描述。您收到了哪条错误消息?@jens没有错误,但页面使用Javascript创建其内容。TypeError:undefined不是计算后缀的构造函数。startsWith'http:显示此代码仅适用于httpnot forhttps@Jens我不认为这是我尝试使用http时遇到的问题,它也适用于https google.com,但即使是,我的问题是关于下载那个页面,那个代码只是作为我一次失败尝试的一个例子。冷静点。