I scraped some data from a website but it does not contain the sections I need. The section is at the lower half of the website and I want to scrape the name, date, protest location, age, current whereabouts, info, and the news link.
I started with the "name" first but it did not contain the h2 tags. Upon closer inspection using soup.prettify, I found that the page ends some lines above the section I need. I read that scrappers have failed due to jquery or javascript but I do not see such issue here.
Thanks in advance for your help.
import requests
import bs4
root_url = 'http://www.savetibet.org'
index_url = root_url + '/resources/fact-sheets/self-immolations-by-tibetans/'
def get_names_age():
response = requests.get(index_url)
soup = bs4.BeautifulSoup(response.text)
print(soup.prettify())
'''
name_list = soup.find('div', {'class': 'entry'})
for name in name_list:
try:
print(name.h2.text)
except AttributeError:
continue
'''
get_names_age()