I’m a newbie trying to build a web scraper application using openai. The fist task is to find the relative xpaths from a page . Can someone guide me on how to go about this problem? I’m good with python and prefer to use it for the development.
My first question would be, why do you want to use a GPT model for web scraping? It doesn’t seem like the right tool for the job unless you’ve got a very specific reason for choosing it.
2 ways to do this:
1 - use chrome’s dev tab to find the elements and copy xpath (right click) then write your python code.
2 - find the elements/text from the HTML (download and/or open in notepad), copy and paste a snippet of the HTML code on GPT and ask it to write you the code.
Bonus: if you have Code Interpreter, you can upload the html file and it’ll write you the whole script!