Skip to content

Commit

Permalink
Merge pull request #193 from pyconjp/t192-fix-scraping
Browse files Browse the repository at this point in the history
refs #192 fix scraping code
  • Loading branch information
takanory committed Nov 19, 2022
2 parents 3596d4c + ebc3e83 commit 7b12ae6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/textbook/7_scraping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ Web APIの例としてconnpassのAPIを実行して、pythonというキーワ
シンプルなスクレイピングのコード
================================
スクレイピングの例として、docs.python.orgの組み込み関数一覧のページ(https://docs.python.org/ja/3/library/functions.html)から関数名の情報を抜き出します。
スクレイピングの例として、docs.python.orgの組み込み関数一覧のページ(https://docs.python.org/ja/3.10/library/functions.html)から関数名の情報を抜き出します。

.. figure:: images/func-list.png
:width: 30%
:width: 50%

組み込み関数一覧ページ

Expand All @@ -187,7 +187,7 @@ Web APIの例としてconnpassのAPIを実行して、pythonというキーワ
def main():
url = 'https://docs.python.org/ja/3/library/functions.html'
url = 'https://docs.python.org/ja/3.10/library/functions.html'
res = requests.get(url)
content = res.content
soup = BeautifulSoup(content, 'html.parser')
Expand Down Expand Up @@ -264,7 +264,7 @@ Web APIの例としてconnpassのAPIを実行して、pythonというキーワ
.. code-block:: python
:caption: ページの内容を取得
url = 'https://docs.python.org/ja/3/library/functions.html'
url = 'https://docs.python.org/ja/3.10/library/functions.html'
res = requests.get(url)
content = res.content
Expand Down

0 comments on commit 7b12ae6

Please sign in to comment.