全てのWebサイトをAPIを自動変換できる「ToAPI」のインストール

スポンサーリンク

全てのWebサイトをAPIを自動変換できる「ToAPI」のインストールについて解説しています。

「Toapi(https://gaojiuli.github.io/toapi/,https://github.com/gaojiuli/toapi)」は、全てのWebサイトにAPIを提供させることができるPythonライブラリです。WebサイトがAPIサービスに自動変換されます。

■Python

今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows10)(pythonランチャーでの確認)

■toapiをインストールする

toapiをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install toapi

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、バージョンの切り替えを行います。

py -3.8 -m pip install toapi

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable
Collecting toapi
Downloading toapi-2.1.3-py3-none-any.whl (5.4 kB)
Requirement already satisfied: colorama<0.5.0,>=0.4.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (0.4.4)
Requirement already satisfied: click<9.0.0,>=8.0.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (8.0.4)
Requirement already satisfied: flask<3.0.0,>=2.0.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (2.0.1)
Collecting htmlfetcher<0.0.7,>=0.0.6
Downloading htmlfetcher-0.0.6.tar.gz (1.4 kB)
Preparing metadata (setup.py) ... done
Collecting htmlparsing<0.2.0,>=0.1.5
Downloading htmlparsing-0.1.5.tar.gz (2.2 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: requests<3.0.0,>=2.25.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (2.27.1)
Requirement already satisfied: cssselect<2.0.0,>=1.1.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (1.1.0)
Collecting cchardet<3.0.0,>=2.1.7
Downloading cchardet-2.1.7-cp38-cp38-win_amd64.whl (115 kB)
---------------------------------------- 115.2/115.2 kB 1.3 MB/s eta 0:00:00
Requirement already satisfied: Jinja2>=3.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from flask<3.0.0,>=2.0.1->toapi) (3.0.1)
Requirement already satisfied: Werkzeug>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from flask<3.0.0,>=2.0.1->toapi) (2.0.1)
Requirement already satisfied: itsdangerous>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from flask<3.0.0,>=2.0.1->toapi) (2.0.1)
Requirement already satisfied: selenium in c:\users\user_\appdata\roaming\python\python38\site-packages (from htmlfetcher<0.0.7,>=0.0.6->toapi) (4.1.5)
Requirement already satisfied: parse in c:\users\user_\appdata\roaming\python\python38\site-packages (from htmlparsing<0.2.0,>=0.1.5->toapi) (1.19.0)
Requirement already satisfied: lxml in c:\users\user_\appdata\roaming\python\python38\site-packages (from htmlparsing<0.2.0,>=0.1.5->toapi) (4.8.0)
Collecting html2text
Downloading html2text-2020.1.16-py3-none-any.whl (32 kB)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0,>=2.25.1->toapi) (2.0.12)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0,>=2.25.1->toapi) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0,>=2.25.1->toapi) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0,>=2.25.1->toapi) (2021.10.8)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from Jinja2>=3.0->flask<3.0.0,>=2.0.1->toapi) (2.0.1)
Requirement already satisfied: trio-websocket~=0.9 in c:\users\user_\appdata\roaming\python\python38\site-packages (from selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (0.9.2)
Requirement already satisfied: trio~=0.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (0.20.0)
Requirement already satisfied: attrs>=19.2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (21.4.0)
Requirement already satisfied: outcome in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.1.0)
Requirement already satisfied: sniffio in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.2.0)
Requirement already satisfied: cffi>=1.14 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.15.0)
Requirement already satisfied: async-generator>=1.9 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.10)
Requirement already satisfied: sortedcontainers in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (2.4.0)
Requirement already satisfied: wsproto>=0.14 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio-websocket~=0.9->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.1.0)
Requirement already satisfied: pyOpenSSL>=0.14 in c:\users\user_\appdata\roaming\python\python38\site-packages (from urllib3<1.27,>=1.21.1->requests<3.0.0,>=2.25.1->toapi) (22.0.0)
Requirement already satisfied: cryptography>=1.3.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from urllib3<1.27,>=1.21.1->requests<3.0.0,>=2.25.1->toapi) (37.0.2)
Requirement already satisfied: PySocks!=1.5.7,<2.0,>=1.5.6 in c:\users\user_\appdata\roaming\python\python38\site-packages (from urllib3<1.27,>=1.21.1->requests<3.0.0,>=2.25.1->toapi) (1.7.1)
Requirement already satisfied: pycparser in c:\users\user_\appdata\roaming\python\python38\site-packages (from cffi>=1.14->trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (2.21)
Requirement already satisfied: h11<1,>=0.9.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (0.13.0)
Building wheels for collected packages: htmlfetcher, htmlparsing
Building wheel for htmlfetcher (setup.py) ... done
Created wheel for htmlfetcher: filename=htmlfetcher-0.0.6-py3-none-any.whl size=1746 sha256=35b4f2a9def028cadebb8b2104da0087b10a68d3e902cd8e09704b81abea2f6a
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\f7
Defaulting to user installation because normal site-packages is not writeable
Collecting toapi
Downloading toapi-2.1.3-py3-none-any.whl (5.4 kB)
Requirement already satisfied: colorama<0.5.0,>=0.4.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (0.4.4)
Requirement already satisfied: click<9.0.0,>=8.0.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (8.0.4)
Requirement already satisfied: flask<3.0.0,>=2.0.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (2.0.1)
Collecting htmlfetcher<0.0.7,>=0.0.6
Downloading htmlfetcher-0.0.6.tar.gz (1.4 kB)
Preparing metadata (setup.py) ... done
Collecting htmlparsing<0.2.0,>=0.1.5
Downloading htmlparsing-0.1.5.tar.gz (2.2 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: requests<3.0.0,>=2.25.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (2.27.1)
Requirement already satisfied: cssselect<2.0.0,>=1.1.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from toapi) (1.1.0)
Collecting cchardet<3.0.0,>=2.1.7
Downloading cchardet-2.1.7-cp38-cp38-win_amd64.whl (115 kB)
---------------------------------------- 115.2/115.2 kB 1.3 MB/s eta 0:00:00
Requirement already satisfied: Jinja2>=3.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from flask<3.0.0,>=2.0.1->toapi) (3.0.1)
Requirement already satisfied: Werkzeug>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from flask<3.0.0,>=2.0.1->toapi) (2.0.1)
Requirement already satisfied: itsdangerous>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from flask<3.0.0,>=2.0.1->toapi) (2.0.1)
Requirement already satisfied: selenium in c:\users\user_\appdata\roaming\python\python38\site-packages (from htmlfetcher<0.0.7,>=0.0.6->toapi) (4.1.5)
Requirement already satisfied: parse in c:\users\user_\appdata\roaming\python\python38\site-packages (from htmlparsing<0.2.0,>=0.1.5->toapi) (1.19.0)
Requirement already satisfied: lxml in c:\users\user_\appdata\roaming\python\python38\site-packages (from htmlparsing<0.2.0,>=0.1.5->toapi) (4.8.0)
Collecting html2text
Downloading html2text-2020.1.16-py3-none-any.whl (32 kB)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0,>=2.25.1->toapi) (2.0.12)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0,>=2.25.1->toapi) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0,>=2.25.1->toapi) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0,>=2.25.1->toapi) (2021.10.8)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from Jinja2>=3.0->flask<3.0.0,>=2.0.1->toapi) (2.0.1)
Requirement already satisfied: trio-websocket~=0.9 in c:\users\user_\appdata\roaming\python\python38\site-packages (from selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (0.9.2)
Requirement already satisfied: trio~=0.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (0.20.0)
Requirement already satisfied: attrs>=19.2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (21.4.0)
Requirement already satisfied: outcome in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.1.0)
Requirement already satisfied: sniffio in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.2.0)
Requirement already satisfied: cffi>=1.14 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.15.0)
Requirement already satisfied: async-generator>=1.9 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.10)
Requirement already satisfied: sortedcontainers in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (2.4.0)
Requirement already satisfied: wsproto>=0.14 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio-websocket~=0.9->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (1.1.0)
Requirement already satisfied: pyOpenSSL>=0.14 in c:\users\user_\appdata\roaming\python\python38\site-packages (from urllib3<1.27,>=1.21.1->requests<3.0.0,>=2.25.1->toapi) (22.0.0)
Requirement already satisfied: cryptography>=1.3.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from urllib3<1.27,>=1.21.1->requests<3.0.0,>=2.25.1->toapi) (37.0.2)
Requirement already satisfied: PySocks!=1.5.7,<2.0,>=1.5.6 in c:\users\user_\appdata\roaming\python\python38\site-packages (from urllib3<1.27,>=1.21.1->requests<3.0.0,>=2.25.1->toapi) (1.7.1)
Requirement already satisfied: pycparser in c:\users\user_\appdata\roaming\python\python38\site-packages (from cffi>=1.14->trio~=0.17->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (2.21)
Requirement already satisfied: h11<1,>=0.9.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium->htmlfetcher<0.0.7,>=0.0.6->toapi) (0.13.0)
Building wheels for collected packages: htmlfetcher, htmlparsing
Building wheel for htmlfetcher (setup.py) ... done
Created wheel for htmlfetcher: filename=htmlfetcher-0.0.6-py3-none-any.whl size=1746 sha256=35b4f2a9def028cadebb8b2104da0087b10a68d3e902cd8e09704b81abea2f6a
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\45\f7\0a\785ee35a22c4a5b2fcc07fcaf4a2c3b0661a9e2b6692367009
Building wheel for htmlparsing (setup.py) ... done
Created wheel for htmlparsing: filename=htmlparsing-0.1.5-py3-none-any.whl size=2158 sha256=afb97857ea542e62eb1e3b15d73cb955288255278d81ed368a5419c5b7d4b90d
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\40\18\20\623a69b2bff9d83c87b9bd75e4f44c54ddb910323b3a137605
Successfully built htmlfetcher htmlparsing
Installing collected packages: cchardet, html2text, htmlparsing, htmlfetcher, toapi
Successfully installed cchardet-2.1.7 html2text-2020.1.16 htmlfetcher-0.0.6 htmlparsing-0.1.5 toapi-2.1.3
a5ee35a22c4a5b2fcc07fcaf4a2c3b0661a9e2b6692367009 Building wheel for htmlparsing (setup.py) ... done Created wheel for htmlparsing: filename=htmlparsing-0.1.5-py3-none-any.whl size=2158 sha256=afb97857ea542e62eb1e3b15d73cb955288255278d81ed368a5419c5b7d4b90d Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels3a69b2bff9d83c87b9bd75e4f44c54ddb910323b3a137605 Successfully built htmlfetcher htmlparsing Installing collected packages: cchardet, html2text, htmlparsing, htmlfetcher, toapi Successfully installed cchardet-2.1.7 html2text-2020.1.16 htmlfetcher-0.0.6 htmlparsing-0.1.5 toapi-2.1.3

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、toapiが正常にインストールされたことになります。

なお、今回はtoapiのバージョン2.1.3をインストールしました。

 

コメント

タイトルとURLをコピーしました