When I open ELL.SE in a browser, I get a list of 48 questions. I want to manipulate these questions in Python with a Beautiful Soup script.
But when I download the page with the requests
library in Python, the resulting page only has 14 questions, not 48. I'd like to know how to submit the request so that I get the full page back with 48 questions.
Here's my code:
url = 'https://ell.stackexchange.com'
request = requests.get(url)
html_text = request.text
print(html_text.count('s-post-summary js-post-summary'))
soup = BeautifulSoup(html_text, 'lxml')
print(len(soup.find_all('div', attrs={'data-post-type-id':'1'})))
Result:
14
14
web-scraping
. Might not be exactly about ell.se but certainly there should be a lot that cover different aspects around web-scraping.