title: Repeat element found once in page multiple times in CSV file (forum post parsing)
body: <p>I'm using BS4 on Python 2.7.13 to parse forum posts from a website that I will ultimately put in a CSV file.  My issue is that only the first post in the thread has data on the title of the thread, but I want to the title of the post to appear in each line of the CSV file I am creating of the forum posts.  Each line should have the post title, the post's author, the post date and time, and the post's content.  When I search for author, date/time, and content, I receive as many results as there are in the page, so 19 in this instance.  So there should be 19 lines in the CSV file.  However, I only receive one line of output in the CSV, and I presume this is because BS4 can only find one instance of an "h4" tag with attribute "post-name" whereas the other three pieces of data are found multiple times.</p>
  
  <p>Can I write code where the first instance of the title is repeated for all the posts in the page and put into the CSV document?  I have tried to use if/else syntax, but I haven't found a way to tell BS4 that if it cannot find the title for a subsequent post, it should just include the initial soup.title.</p>
  
  <p>I really appreciate your help as I couldn't find a solution for this anywhere.  Maybe I am searching for the wrong thing.  Here is the code I'm using:</p>
  
  <pre><code>from bs4 import BeautifulSoup
  import csv
  import urllib2
  page = urllib2.urlopen("http://en.community.dell.com/support-forums/desktop/f/3513/t/20015349?pi21953=1")
  soup = BeautifulSoup(page, "lxml")
  
  one = soup.findAll("h4", attrs={"post-name"})
  two = soup.findAll("a", attrs={"internal-link view-user-profile"})
  three = soup.findAll("a", attrs={"internal-link view-post"})
  four = soup.findAll("div", attrs={"post-content user-defined-markup"})
  
  posttitle = []
  poster = []
  postdateandtime = []
  postcontent = []
  
  for post in one:
      text = BeautifulSoup(str(post).strip()).get_text().encode("utf-8").replace("\n", " ")
      posttitle.append(text.strip())
  
  for post in two:
      text2 = BeautifulSoup(str(post).strip()).get_text().encode("utf-8").replace("\n", " ")
      poster.append(text2.strip())
  
  for post in three:
      text3 = BeautifulSoup(str(post).strip()).get_text().encode("utf-8").replace("\n", " ")
      postdateandtime.append(text3.strip())
  
  for post in four:
      text4 = BeautifulSoup(str(post).strip()).get_text().encode("utf-8").replace("\n", " ")
      postcontent.append(text4.strip())
  
  csvfile = open('test.csv', 'wb')
  
  writer = csv.writer(csvfile)
  
  writer.writerow(["Post Title", "Poster", "Post Date and Time", "Post Content"])
  
  for posttitle, poster, postdateandtime, postcontent in zip(posttitle, poster, postdateandtime, postcontent):
  writer.writerow([posttitle, poster, postdateandtime, postcontent])
  
  csvfile.close()
  </code></pre>