Make API Calls Like a PRO - Python API Client x Shopify

Поділитися
Вставка
  • Опубліковано 16 сер 2022
  • How to use a session object to make a more robust API client with Python
    Patreon: / johnwatsonrooney
    Donations: www.paypal.com/donate/?hosted...
    Proxies: iproyal.club/JWR50
    Hosting: Digital Ocean: m.do.co/c/c7c90f161ff6
    Gear I use: www.amazon.co.uk/shop/johnwat...
  • Наука та технологія

КОМЕНТАРІ • 64

  • @ZhCrypto
    @ZhCrypto Рік тому +10

    You are the best Python Tutor in whole world , Love you a lot bcz of scraping & automation tips and tricks

  • @CodePhiles
    @CodePhiles Рік тому +10

    Excellent job John, every video you provide , you add the level up, thank you John.

  • @abrartareen100
    @abrartareen100 Рік тому +1

    Thank you, John. Another very useful tutorial. Excellent job!

  • @shanevarnum
    @shanevarnum Рік тому +4

    Good stuff. Thanks for all of the time and effort you put into your videos. Love the web scraping info. And would really like to see more on APIs. Python OOP building API clients.

  • @djangodeveloper07
    @djangodeveloper07 Рік тому +1

    something new i learned today. i was scraping from last 3 years and never use this thing this way. Thank you for sharing. Thumbs Up

  • @gabrieljeca
    @gabrieljeca Рік тому +1

    Love how your thumbnails makes me think I’m a half-ass programmer. And I also love how your content proves that indeed I’m a half-ass programmer.
    Amazing content JWR! Learning more and more each day with your videos

  • @mabdurrafeyahmed9256
    @mabdurrafeyahmed9256 Рік тому +1

    Awesome, always love watching your videos, always helpful

  • @systematical88
    @systematical88 Рік тому +4

    Such a good video... exactly what I needed (and didn't even know it).

  • @marcosdanielreyesgarces2261
    @marcosdanielreyesgarces2261 Рік тому +2

    Thank you so much! This is exactly what I've been looking for

  • @Jakobowsky
    @Jakobowsky Рік тому +1

    This is super useful. I am using sessions mostly when dealing with authentication, so I am logged in once :)
    Thanks John!

    • @aflous
      @aflous Рік тому

      Use session's 🍪 ;)

  • @ferrandonea
    @ferrandonea Рік тому +2

    Excellent video , as usual, I have been struggling with catching exceptions and retries with requests , probably that could be interesting for another video

  • @PolSenserrich
    @PolSenserrich Рік тому +1

    Really great explanation. Thanks

  • @felipemartinsdiel
    @felipemartinsdiel Рік тому +1

    This is awesome. Thanks a lot! 👍

  • @deeperblue77
    @deeperblue77 Рік тому +1

    Thanks John! Very valuable. Chris

  • @geehaf
    @geehaf Рік тому +1

    Great vid. Very useful - thanks.

  • @jagdish1o1
    @jagdish1o1 Рік тому +1

    Damn! Thanks man. Really helpful ❤️

  • @evolv_85
    @evolv_85 Рік тому +1

    Awesome vid.

  • @mahedulhasan5515
    @mahedulhasan5515 Рік тому +1

    super dope... thanks

  • @rizalsofyans
    @rizalsofyans Рік тому +1

    Thank you!

  • @cpurper
    @cpurper Рік тому +1

    You are a legend

  • @cdemafia
    @cdemafia Рік тому

    Thanks, very useful. BTW, which color scheme are you using?

  • @gh0sthussi3n83
    @gh0sthussi3n83 Рік тому +1

    man, it always fascinats me that you're using i3
    great channel and great content overall dude
    keep it up ❤️

  • @PeterFletcherDNADeliverer
    @PeterFletcherDNADeliverer Рік тому +1

    Great info thank you

  • @PeterBruno1
    @PeterBruno1 Рік тому +1

    Thank you. Was looking for a simple introduction to better re-use of sessions.
    Question/suggestion - why not use: "if int(calls_left[0]) == int(calls_left[1]) - 1:"

  • @abel4776
    @abel4776 Рік тому

    Hey John, thanks a ton, finished a sophisticated scraping script of about 1000 urls, multiple pages per url. It is a JavaScript site so I went ahead and used playwright. It takes me no less than 3 hours hours to scrape on a VPS. Is there ANY WAY to pull headers, cookies, etc. and not render the JavaScript pages? Is there a way to "fool" the request, load a payload, etc. and only download the necessary data without rendering pages in a headless environment? There must be a way. I don't want to async just yet. Thanks.

  • @kamutabung511
    @kamutabung511 10 місяців тому +1

    i found good tutor here, thanks you earn my subcribe

  • @mohamednashaat4288
    @mohamednashaat4288 Рік тому

    How co when you clicked in your gms soft the notes were so short and when I play mine they roll over each other?

  • @cardosofede
    @cardosofede Рік тому +1

    Awesome John! Can you make a video using a Throttler instead?

  • @strawberriesandcum
    @strawberriesandcum Рік тому

    I had no idea you can use hooks this will be very useful thank you John also how would you go about a session restart once it was forcibly closed and use that one instead of the old one?

    • @JohnWatsonRooney
      @JohnWatsonRooney  Рік тому +1

      They are quite useful! If you are using a context manager they will close automatically once done, otherwise there’s a session.close() function to do it for you

  • @goodnight4606
    @goodnight4606 Рік тому

    Thank for the video
    Some websites know that iam using slenium . How can i avoid that ?

  • @Karma-xz4si
    @Karma-xz4si Рік тому

    Very informative.
    Does anyone know how to get all the customer records or get the next page URL. The API call return 250 records at max and in my case I am not able to find the next page URL.

  • @IllIlIllIIIl
    @IllIlIllIIIl Рік тому

    Any tips for avoiding/bypassing post request 405 method not allowed if selenium alternative is too slow for my needs? Ty

    • @larryrennoldson4937
      @larryrennoldson4937 Рік тому +1

      You can’t 405 means the method is wrong, so try performing the request with GET instead

  • @dragon3602010
    @dragon3602010 Рік тому +2

    Awesome thanks, is there another use cases with hooks in python?

    • @JohnWatsonRooney
      @JohnWatsonRooney  Рік тому

      Common uses are error handling and logging, along with what I showed here. Or anything other that you might have specifically!

  • @deadspeedv
    @deadspeedv Місяць тому

    Cool way to do it. Unfortunately for me the API rate limit isn't in the header....or anyway

  • @vinni113
    @vinni113 Рік тому +1

    Great tutorial as always. Do you know of a way to find an API rate limit from an API that doesn't return a limit header?

    • @JohnWatsonRooney
      @JohnWatsonRooney  Рік тому +1

      It’s usually returned there, sometimes in the body too - if you aren’t sure what it is I would check the api docs and see how it handles rates

    • @vinni113
      @vinni113 Рік тому +1

      @@JohnWatsonRooney thanks for the reply. Unfortunately not using an API that is being advertised haha so unlikely I'll be finding out that info

  • @Rocky_.6
    @Rocky_.6 Рік тому +1

    why is my gms softing like static?

  • @sonnguyenhong269
    @sonnguyenhong269 Рік тому

    Hello John Watson Rooney
    I don't know where to find 'import creds' can you help with this

  • @_manasikara
    @_manasikara Рік тому

    AttributeError: module 'creds' has no attribute 'token'

  • @PolSenserrich
    @PolSenserrich Рік тому +1

    It Would be a greatfull video if you teach us how to make Bulk operations with this python API to Shopify. For example, updating stock to a large list of products is kind of dificult.

  • @kattoman7548
    @kattoman7548 Рік тому +1

    Hi guys I am starting on python, please can you tell me which code editor John is using? cheers

    • @JohnWatsonRooney
      @JohnWatsonRooney  Рік тому +1

      Hey, this is PyCharm community edition (free). I prefer it to vs code

    • @kattoman7548
      @kattoman7548 Рік тому

      @@JohnWatsonRooney thanks so much

  • @bakasenpaidesu
    @bakasenpaidesu Рік тому +2

    ;)

  • @MrUSmarines1
    @MrUSmarines1 Рік тому

    Hey John, I been taking 100 days of python course on udemy and stuck on one of the capstone api projects. Any way you can do a tutorial for us rookies? I could send you the instructions. I tried for weeks but i'm at a point where i need an expert step by step video. I'm sure your viewers could benefit. Thanks

  • @MDPARVEZ-np6wl
    @MDPARVEZ-np6wl Рік тому

    Mlk, se pá que o canal foi hackeado

  • @dopy8418
    @dopy8418 Рік тому

    Your rythm was better before. Slow the pace down just a bit. Feels rushed.