title: How to scrape all text or paragraph using beautiful soup
body: <p>i want to scrape all text in paragraph. Below is the link and code that i have made:
  note: currently want to extract 10 pages first.</p>
  <pre><code>import requests
  from bs4 import BeautifulSoup
  import numpy as np
  import pandas as pd
  import re
  import time
  
  #create a list
  Title = []
  Paragraph = []
  
  #scrape the first 10 page data(the no of pages can be changed)
  pages = np.arange(1, 10)
  
  for page in pages: 
    
      page = requests.get(&quot;https://www.malaymail.com/news/money?page=&quot; +  str(page))
      
      soup = BeautifulSoup(page.text, 'html.parser')
      
      list_all = soup.find_all('div',class_='data')
      
      for h in list_all:
          title=h.find('h2').text
          parag=h.find('p',attrs={'class':'summary d-none d-md-block'})
          
          Title.append(title if title else '')
          Paragraph.append(parag if parag else '')
      
  #create a dataframe
  pd.set_option('display.max_rows', None)
  pd.set_option('display.max_colwidth', None)
  
  df = pd.DataFrame({'Title':Title,
                     'Content':Paragraph})
  df
  
  </code></pre>
  <p>current output:
  <a href="https://i.stack.imgur.com/XArg1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XArg1.png" alt="below is the current output that i get" /></a></p>
  <p>so, expected output that i want is:</p>
  <ol>
  <li>Currently, value at column 'Content' not scrape full text. What i want is full text and want remove sign '[]'</li>
  <li>Currently, first 18 rows not return Content value. why it happen?. and how to fill in this part too.</li>
  </ol>