scrap.py`というファイルに以下のコードを書く：

```python
import sys
import requests
from bs4 import BeautifulSoup

def scrap(url: str) -> str:
    # Download the page with an HTTP GET.
    response = requests.get(url)
    if response.status_code == 200:
        # Extract text from the page’s HTML.
        return BeautifulSoup(response.content, 'html.parser').get_text()
    else:
        raise Exception(f"scrap: fetching URL {url} failed with error {response.status_code}")

if __name__ == '__main__':
    print(scrap(sys.argv[1]))
```

ターミナルでコマンド `python3 scrap.py https://example.com` で実行できます。
Write the following code in a file called `scrap.py`:

```python
import sys
import requests
from bs4 import BeautifulSoup

def scrap(url: str) -> str:
    # Download the page with an HTTP GET.
    response = requests.get(url)
    if response.status_code == 200:
        # Extract text from the page’s HTML.
        return BeautifulSoup(response.content, 'html.parser').get_text()
    else:
        raise Exception(f"scrap: fetching URL {url} failed with error {response.status_code}")

if __name__ == '__main__':
    print(scrap(sys.argv[1]))
```

You can run it in your terminal with the command `python3 scrap.py https://example.com`.