Тёмный
No video :(

API Endpoints? Get data from the web easily with PYTHON 

John Watson Rooney
Подписаться 81 тыс.
Просмотров 65 тыс.
50% 1

This is another way to web scrape with Python. Find where the website gets its data from and then mimic this request programmatically.
Postman: www.postman.com/
Insomnia REST Client: insomnia.rest/
-------------------------------------
twitter / jhnwr
code editor code.visualstu...
WSL2 (linux on windows) docs.microsoft...
-------------------------------------
Disclaimer: These are affiliate links and as an Amazon Associate I earn from qualifying purchases
mouse amzn.to/2SH1ssK
27" monitor amzn.to/2GAH4r9
24" monitor (vertical) amzn.to/3jIFamt
dual monitor arm amzn.to/3lyFS6s
microphone amzn.to/36TbaAW
mic arm amzn.to/33NJI5v
audio interface amzn.to/2FlnfU0
keyboard amzn.to/2SKrjQA
lights amzn.to/2GN7INg
webcam amzn.to/2SJHopS
camera amzn.to/3iVIJol
gfx card amzn.to/2SKYraW
ssd amzn.to/3lAjMAy

Опубликовано:

 

18 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 66   
@amineboutaghou4714
@amineboutaghou4714 4 года назад
Great video John - many thanks for sharing. it's been months that I was trying to scrape a hotel booking engine and I could not do it through the classic way. I managed to do it with Selenium, by it was very slow and plenty of errors were happening. Thanks to this video I managed to get the data straight from the API and thousands of data are scrapped within seconds and with very high accuracy. Again many thanks and hopefully you will continue sharing these great skills !
@isam789
@isam789 Год назад
Just watched this video and have subscribed. Exactly what I was looking for as I am learning Python now for a career change. Thank you and look forward to watching more videos in my journey
@JohnWatsonRooney
@JohnWatsonRooney Год назад
Thank you I have lots of more videos planned I think you will enjoy
@isam789
@isam789 Год назад
@@JohnWatsonRooney Thank you excited for them. Just a quick question, I use Chrome and have been playing around with the chrome dev tool. Is there a video that explains how to optimise scraping using that and Python?
@maskahleo
@maskahleo 4 года назад
Thanks John, you really made it simple. Liked , Subscribed and smashed the notification bell.
@paulmaloney585
@paulmaloney585 Год назад
Thanks so much for this! This was a massive life saver for a project I am working on
@gisleberge4363
@gisleberge4363 3 года назад
Real interesting...alternative to what I so far have considered webscraping. COOL. Thanks for the effort.
@JustJoelTV
@JustJoelTV 3 года назад
Thanks for this John! Smashed the like button
@JohnWatsonRooney
@JohnWatsonRooney 3 года назад
Much appreciated!
@wangdanny178
@wangdanny178 2 года назад
Hey John Thanks for the video. BTW, I watched the sunglass and livescores episodes. I think this way of getting data is my new one. THANKS!
@themilkyway4525
@themilkyway4525 2 года назад
How can I acces specific element from this result ? Result format is like string, There is no dictionaries or something, so I can`t acces for example if I want only 'Names' or something like this...
@sinamobasheri3632
@sinamobasheri3632 4 года назад
loading entire page with selenium is awful its very slow for scraping bunch of data specially when you need speed up work as well as you can this method it way better than selenium thanks you again sir 🖤🙏🏻
@keepcontinue
@keepcontinue 5 месяцев назад
what a great video. I was having a time problem while scraping with selenium and with the help of this video I solved it thx.
@muratpinkman9679
@muratpinkman9679 4 месяца назад
bu adam goat ciddi
@thatolebethe3238
@thatolebethe3238 3 года назад
This video saved my life for a job. Thanks mate
@JohnWatsonRooney
@JohnWatsonRooney 3 года назад
Glad it helped!!
@sinamobasheri3632
@sinamobasheri3632 4 года назад
you change my life sir thank you for this great information 🖤🖤🖤🖤🖤🖤🖤🖤🍻🍻🍻👌🏻👌🏻🍻🍻🍾🍾🍾🍾
@martpagente7587
@martpagente7587 4 года назад
Hi John, I wish you can create more example of this kind of scraping data from a website, getting data through API Endpoints, I'm stuck here now, this is the trickiest way of scraping data I think, it requires more investigation, so very much appreciated if you can create more examples like this.
@JohnWatsonRooney
@JohnWatsonRooney 4 года назад
Hi Mart - sure I have some videos coming up to show multiple ways to scrape the same website so this will be covered again.
@cyborg69420
@cyborg69420 Год назад
you are the man who actually taught me something [
@tokoindependen7458
@tokoindependen7458 3 года назад
this the most exactly what i looking for, imsomnia doing good job, simple and work, i try postman it failed respon my curl header
@Kralnor
@Kralnor 2 месяца назад
After both Postman and Insomnia have become more walled in tools requiring you to have an account, are there any other similar tools that you would recommend nowadays?
@JohnWatsonRooney
@JohnWatsonRooney 2 месяца назад
Yeah it’s a shame, I don’t use either anymore - I just use httpx, it has a cli tool and I do it from the terminal
@carloseortega
@carloseortega Год назад
Thanks. Been learning a lot from your videos. Question. What do you do when the API requires an auth token like a Bearer token? Thanks
@_domdge_687
@_domdge_687 23 дня назад
i have no copy as curl option. Only shows copy as curl (cmd or bash)
@JohnWatsonRooney
@JohnWatsonRooney 22 дня назад
Bash should work, or try using another browser. Also there’s a website now called curl converter that’s quick and easy to get Python code from curl commands
@quangtuan202
@quangtuan202 Год назад
Thank you so much! You are my life saver!
@patriciodiaz2377
@patriciodiaz2377 2 года назад
Thank you very much for the info!
@juleswinnfield1437
@juleswinnfield1437 2 года назад
Hey, great video - thanks! I have a question, I'm trying to build an app ontop of a website. Is it possible to locate the API used to make user accounts, for example? Would I be able to post my own data to their API to make an account. Thanks :)
@mariadaza3579
@mariadaza3579 Год назад
You are a genius at explaining python!
@andyrothwell
@andyrothwell 4 года назад
This is great, thanks! What are the benefits of going through postman/insomnia rather than just using the endpoint directly in requests.get(url)?
@JohnWatsonRooney
@JohnWatsonRooney 4 года назад
Thanks Andy! Postman makes it easier to tailor the request exactly how you want it by quickly changing parameters. Although I didn’t change anything in my example when you start to work with APIs more you see the benefits!
@liviuchristianfotache1172
@liviuchristianfotache1172 Год назад
Hi, I'm looking for an automated way to discover public API endpoints, not the manual version (inspect - network - XHR). Could you help me with any clue if there is an open source piece of software that does API endpoints search & discovery?
@JohnWatsonRooney
@JohnWatsonRooney Год назад
You can use a automated browser to load the page and have it dump out any requests made - this will show what you are after I think. I can’t remember the exact name but it’s definitely there. I have a playwright video on it on my channel
@muhammadirshad7497
@muhammadirshad7497 Год назад
which browser you are using i am hoping that aap by chrom but every thing is changed
@JohnWatsonRooney
@JohnWatsonRooney Год назад
this is old but i think its firefox, i usually use chrome now for this sort of thing though
@user-kk2kt3qf3e
@user-kk2kt3qf3e 7 месяцев назад
Hi John, I am trying to get the information from Network > XHR, but there is any request with JSON data retrieved, what can i do?
@higiniofuentes2551
@higiniofuentes2551 2 года назад
Thank you for this very useful video!
@sampathkumar-yp8hp
@sampathkumar-yp8hp 3 года назад
Thanks, helpful!
@basicallytrying7856
@basicallytrying7856 Год назад
Help me a lot
@rshrott
@rshrott 2 года назад
Please do airbnb next!
@benjibo6451
@benjibo6451 Год назад
Very useful! I'm stuck on one thing though. I need to extract a cookie from a network request that happens after I make my initial request. I can't make this request directly. Is there any way to inspect sub-requests like this with Python?
@eric24g
@eric24g 2 года назад
what if you don't see the json data in the webpage when you are inspecting. I notice some websites don't show it. Are some sites just hiding that data or is there a workaround for that. Thanks
@JohnWatsonRooney
@JohnWatsonRooney 2 года назад
That site may either be hiding it well, or not using this method. My best advice is to open the network tab and start clicking on links on the site, best ones to check are next pages or load more, and see what comes up
@eric24g
@eric24g 2 года назад
@@JohnWatsonRooney thanks for your response. 🙏🙏
@jendrik3495
@jendrik3495 Год назад
Hi John, again really great video! I tries this method for a sports website but it returns a 403 error. Do you have any idea on how to solve this?
@JohnWatsonRooney
@JohnWatsonRooney Год назад
Thanks, 403 is forbidden, make sure you are copying all the headers over too including the cookie part and it should work
@WalkingWRPT
@WalkingWRPT Год назад
When I do this on Mac, I get the code but nothing in the output. My friend does the exact same on Windows, and runs it, and get the data outputted. Is there a method for mac?
@albinmiftari1832
@albinmiftari1832 Год назад
Why do you need postman/insomnia? I always just get the JSON with requests and get the data that way.
@JohnWatsonRooney
@JohnWatsonRooney Год назад
You don’t need it - it just helps see what is going on and a chance to see if you can change some of the parameters. Its also an easy way to generate initial code
@tunamusic2314
@tunamusic2314 28 дней назад
@@JohnWatsonRooney some params and may be header authentication required
@thatolebethe3238
@thatolebethe3238 3 года назад
How can u solve if insomnia is blocked by website. I.e saying that I'm a suspected robot when doing the curl request?
@JohnWatsonRooney
@JohnWatsonRooney 3 года назад
Did you copy all the headers including the cookie?
@thatolebethe3238
@thatolebethe3238 3 года назад
So basically. I copied the API endpoint as curl pasted it into insomnia. Then I get suspected robot notification where the Json should be. Website in question is infojobs.net you can search data analyst
@Semihszy
@Semihszy Год назад
thnaks man another great video! i am trying to use scrapy for a similar website (oddsportal1) but the URL of request keep changing by time and by each item so is there a way i can use the page URL and catch the req URL by a partial match? or is there another way to reach the jason data of each item in a list on the main page ? thanks again for such a good content i really feel like i owe you something :)
@aaammm1888
@aaammm1888 3 года назад
Hi Pal I want to Build a website where all the crypto rates of staking apy are I found all the endpoint api I have about 35 api which i want to get the data from cron 30mins and save the data i need to my database then make a simple frontend so I can find the best rate and the platform How can I go on about this
@sifat19
@sifat19 Год назад
on point!
@lordlegendsss7776
@lordlegendsss7776 9 месяцев назад
Where to find amazon api
@edinhofilho22
@edinhofilho22 2 года назад
Hi, I love your tutorials, could you help me, how can I use this wonderful information to create an API from scratch? I know programming, but I don't know where to start a Scrap API, I mean, an API of its own, where my data would come from these endpoints that you explained. Thanks John for the content
@JohnWatsonRooney
@JohnWatsonRooney 2 года назад
Hey! What I do is create scripts to fill a database at a certain time/times of day, then use a framework like django rest framework or flask to then serve your own api endpoints. Hope that makes sense
@superadam908
@superadam908 2 года назад
how to get json url in mobile android?
@john-r-edge
@john-r-edge 2 года назад
John. This is useful. But how to handle authentication with Insomnia? I have to sign onto the site of interest using a username and password. I logged in using Chrome, and located the correct xhr line in Network which corresponds to the table data being returned. So I copied the request as you demonstrated via Copy -> Curl, and pasted that as a new Get request Taking a look at the data copied and pasted - it includes multiple lines including a line containing a cookie. The cookie line starts like this -H "Cookie: __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; oc_sessionPassphrase= However when I send this, the response is either "401 unauthorised" or some xml saying "Current user is not logged in". Only thing a bit different was that i could copy as :"curl (bash)" or as "curl(cmd)" Thanks
@john-r-edge
@john-r-edge 2 года назад
I worked it out - i found a feature in Insomnia which fixed the problem. I pasted in the request but Insomnia gave errors. I found the "Auth" tab, and selected the "Basic" method - and Insomnia gives a dialog to add a user id and password. Then it finally connected ok with the right cookies
@saeedjudia6850
@saeedjudia6850 3 года назад
🙏
@satyamvirat3489
@satyamvirat3489 7 месяцев назад
That is incredible. I was just looking for this info. Thnks a knowledge for this man. Subscribed 🫂
@dananjayachathuranga7113
@dananjayachathuranga7113 Год назад
Далее
Basic Webscraper : Get info from the web with Python
19:15
Tanish holatmi?😅❤️
00:41
Просмотров 523 тыс.
would you eat this? #shorts
00:39
Просмотров 3,5 млн
What is an API Endpoint?
8:09
Просмотров 12 тыс.
Always Check for the Hidden API when Web Scraping
11:50
Industrial-scale Web Scraping with AI & Proxy Networks
6:17
The most important Python script I ever wrote
19:58
Просмотров 182 тыс.
Pull data from API using Python
6:27
Просмотров 40 тыс.
The Biggest Mistake Beginners Make When Web Scraping
10:21