Scrapy is a fast high-level web crawling and web scraping framework, used to crawl websites and extract structured data from their pages.
Scrapyは高速で高レベルのWebクロール(web crawling)およびWebスクレイピング(web scraping)フレームワークであり、Webサイトをクロールし、ページから構造化データを抽出するために使用されます。
Scrapyはスクレイピングだけでなくクローリングも行う。複数ページを対象とするのならScrapyのほうが便利。
Scrapy はこれらのライブラリと違うレイヤーのもので、クローラーのアプリケーション全体を実装するためのフレームワークです
The easiest option would be to extract //body//text() and join everything found: ''.join(sel.select("//body//text()").extract()).strip()
Another option is to use BeautifulSoup's get_text():
今回はクローリングで得られた値を、バリデーションしてPostgreSQLに保存するPipelineを実装します。
See this answer for an explanation and a workaround if you don't want to download all 4GB: stackoverflow.com/a/43409948/5910149 –
Scrapy 2.5.0 (2021-04-06) - Official Python 3.9 support
you can't install scrapy using python 3.9+, it depends on Twisted which can't be installed using pip starting 3.9 because of deprecation issue, the only way to do it is to downgrade you're python version (can be done easily with pyenv) or to download and install Twisted manually