小编Koh*_*ami的帖子

如何在 Colaboratory Google 上使用 Selenium?

我从网上抓取了很多信息,我希望它可以在云上运行。所以我想使用 colaboratory,但它变成了错误

WebDriverException                        Traceback (most recent call last)
<ipython-input-35-abcc3b93dfa7> in <module>()
     20 options.add_argument("--start-maximized");
     21 options.add_argument("--headless");
---> 22 driver = webdriver.Chrome('chromedriver', chrome_options=options)
     23 
     24 book  = cd + "/target.xlsx"

/usr/local/lib/python3.6/dist-packages/selenium/webdriver/chrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive)
     71             service_args=service_args,
     72             log_path=service_log_path)
---> 73         self.service.start()
     74 
     75         try:

/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py in start(self)
     96         count = 0
     97         while True:
---> 98             self.assert_process_still_running()
     99             if self.is_connectable():
    100                 break

/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py in assert_process_still_running(self)
    109             raise WebDriverException(
    110                 'Service %s unexpectedly exited. Status code …
Run Code Online (Sandbox Code Playgroud)

python selenium python-3.x selenium-chromedriver selenium-webdriver

7
推荐指数
2
解决办法
6468
查看次数

如何绑定来自 Svelte 子组件的输入值?

理想的

我想从子组件获取输入数据。

我试过的

<script>
  import Input from "./Input.svelte";
  let userGoal = "";
</script>

<h1>Your Goal is {userGoal}</h1>

<Input {userGoal} />
Run Code Online (Sandbox Code Playgroud)
<script>
  export let userGoal = "";

  $: console.log(userGoal);
</script>

<input type="text" bind:value={userGoal} />
Run Code Online (Sandbox Code Playgroud)

$: console.log(userGoal);正如我预期的那样,在每个事件中都显示 userGoal。但是,它不会影响父组件。

概括

我是 Svelte 的新手。任何帮助表示赞赏。

javascript single-page-application svelte

2
推荐指数
1
解决办法
1611
查看次数