Listen "ChatGPT: web scraping and talking OpenAPI specs"
Episode Synopsis
IntroKerri and Ash talk trees! Unfortunately for us all, Ash turns this into a recurring analogy about giving in to our AI overlords.Talk to your OpenAPI specIf a tree is going to fall on your house, do you ignore it... or talk to ChatGPT?Well, Ash is excited about OpenAPI specs that talk back. Our co-hosts talk through a fun approach to this:Paste in your OpenAPI specAsk some yes/no questions about capabilities, correct as neededAsk some how-to questions, correct as neededHave fun!**Fun = ask for Getting Started guides, look for issues, get it to code, etc**As part of this, Kerri and Ash talk about learning how to ask good questions:❌ "What would a Getting Started guide look like?" → (You get an outline of best practices.)✅ "Write me a Getting Started guide for Node.js 18 developers." → (You get an actual Getting Started guide that a developer could use.)Thank you AI. We are better humans now.Writing a scraper with ChatGPTChatGPT can't scrape webpages at the moment, but it caaaaan tell you how!Ash talks about using ChatGPT to write a webpage scraper in Node.js and clobber it together with the Google Books API.ChatGPT does a great job functionally, but requires some guidance on coding opinions. Ash has coding opinions, so he asks the AI to:Use ESM imports instead of CommonJS requiresUse async/await syntax instead of PromisesUse Node.js-native fetch instead of axiosKerri points out how interesting it is that ChatGPT fumbles with ESM imports in the same way that a human would.Mid-project, Ash teeters on the edge between the theory and reality of an xkcd automation classic... but he triumphs in the end? (He does!)More funKerri mentions that she's looking into a game streaming setup. Ash plans to be the first sub.Ash mentions that he recently spoke at apiDays. The video will be on the apiDays YouTube channel soon.===** ChatGPT advised that:the bullet point "Fun = ask for Getting Started guides, look for issues, get it to code, etc." could be expanded to better explain what fun means in this context.But we're confident the real human scripters know what fun means 👾
More episodes of the podcast I'd Rather Be Scripting
A hundred years later
30/06/2024
Looking ahead to 2024
10/03/2024
2023 in Review
31/12/2023
Staying up-to-date
22/11/2023
Desk Setups and iStat Menus
05/11/2023
Beyond OpenAI APIs with Hugging Face
27/08/2023
Adobe Express add-ons
13/08/2023
ZARZA We are Zarza, the prestigious firm behind major projects in information technology.