Home ยป Education ยป Part 2: Scraping data with Python BeautifulSoup to ChatGPT API

Part 2: Scraping data with Python BeautifulSoup to ChatGPT API

Written By Nefer Lopez on Monday, Mar 06, 2023 | 06:28 PM

 
I got it to work! Here's the code: https://gist.github.com/thatguynef/8406a13dcdb6621c04f2041b9202cdea I was able to use a Python library called, BeautifulSoup4, to scrape data from web pages, format in a JSON friendly way that won't cause errors, and then create JSON files. One thing to note, some websites have blockers that won't let BeautifulSoup scrape. This was more common than I thought. In any case, I'm still have with this solution and hope you find it useful for feeding data into your ChatGPT API.