#openai #chatgpt
Subscribe To Our Channel :


If the graph is given anyone can use Bread first search algorithms to Traverse it this is easy that's why I Will use bre first search algorithms to Traverse the internet every website is a Node just one problem we don't have a Graph but all websites have links that Point to other websites so I will use Web scraping to find new website Earls To create a graph then Traverse it then Again scrape it add new nodes in the Graph then Traverse it and I will do it Simultaneously something like this visit A website scrape all links in it add Them to the queue and repeat this for All links this is how bre first search Algorithm works so this will be a Never-ending process this is similar to Crawler or Spiderbots this is my prompt it's Basically a pseudo code for what I want To do let's give this prompt to chat GPT And now chat GPT is writing code and it Will be ready in a few seconds and our Code is ready now it will be a heavy Task since I want to visit more than 50,000 websites so I will use Google Collab platform and it's free fast and 12 GB RAM and let you run python code Like jupyter notebook now copy and paste Our python code for BFS search let's Execute this code it's asking for an Entry point I'm going to use python .org Then press enter and our traversal

Begins on the left side it shows how Many websites we visited and then it Shows URL of the current website this is A slow process compared to what we do in Competitive programming or on lead code Because there we have given a graph Which is nothing but some location on Computer memory so we can visit 1,000 Nodes in just a second here we are Finding new nodes with web scraping and Takes a few seconds for each Website I will let it run until we cross 50,000 website visits in case you didn't Know this is how web crawlers or Spiderbots work maybe in the next video We will build our crawler just like Google spiderbot or Bing bought that Collect website URLs and store them into A database let me fast forward the video [Music] [Music] And finally we visited 50,000 websites Or so-called nodes and it took 2 hours Try to run deth first search on your own It would be fun thanks for watching and See you in the next video