Currently, I am working on a website project utilizing Squarespace. This site will feature multiple pages dedicated to individuals who have reached a level of notability worthy of having their own Wikipedia page. With over 150 pages planned, manually writing out biographies for each person is proving to be extremely time-consuming. To streamline this process and ensure that the information remains up-to-date, I am exploring the option of pulling text directly from the introductory sections of these individuals' Wikipedia pages.
To illustrate my concept, I have outlined a basic format using Beyonce's Wikipedia article as an example. The following code snippet displays the Wikipedia page within an iframe element. Please note that the specific height and width values are arbitrary:
<iframe src="https://en.wikipedia.org/wiki/Beyoncé" height="551" width="705"></iframe>
This setup gives me:
<iframe src="https://en.wikipedia.org/wiki/Beyoncé" height="551" width="705"></iframe>
My main query pertains to extracting only the textual content from the Wikipedia pages while excluding images, sidebars, tables of contents, and other elements. This approach aims to maintain a visually consistent design across all pages on my website. Additionally, I am curious if iframes are the most suitable tool for achieving this goal.
Any suggestions or guidance on how to efficiently extract and display text-only content from Wikipedia pages would be greatly appreciated.
Thank you, K