I am trying to scrape the text only from body using python Scrapy, but haven’t had any luck yet.
Wishing some scholars might be able to help me here scraping all the text from the <body> tag.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Scrapy uses XPath notation to extract parts of a HTML document. So, have you tried just using the
/html/bodypath to extract<body>? (assuming it’s nested in<html>). It might be even simpler to use the//bodyselector:You can find more information about the selectors Scrapy provides here.