• Categories
  • Search
  • unogs
  • Register
  • Login
uNoGS Forum
  • Categories
  • Search
  • unogs
  • Register
  • Login
ad

Part 2: A simple script to pull information

Netflix API Details
netflix api
8
44
95.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ?
    Guest
    last edited by 11 Jul 2017, 17:20

    Thanks for the reply. Unfortunately im getting HTTP ERROR 403.

    I am trying to get with curl as get request
    https://api-global.netflix.com/win/uwa/2.20?falcor_server=0.1.0&materialize=true&winx_lang=en-GB&method=get&path=%5b%22shows%22%2c%2280133311%22%2c%22browse%22%5d

    Was trying to add headers with data from chrome request... but with no success. Any idea, what i am doing wrong?

    Thanks in advance

    F 1 Reply Last reply 12 Jul 2017, 18:37 Reply Quote 0
    • F
      FrankieD @Guest
      last edited by FrankieD 12 Jul 2017, 18:37 12 Jul 2017, 18:37

      Well, for one, the API path seems weird to me, can't make out if its the Win8.1 API (version 2.20 or higher) or the Win10 API (6.20 or higher).
      However, 403 means you're not authorising properly. Perhaps they patched the system so that the same cookie will not work across different APIs. My advice for you would be to grab the cookies from the Windows 10 app and try those.

      1 Reply Last reply Reply Quote 0
      • ?
        Guest
        last edited by 29 Jul 2017, 19:07

        What would be the best way to simply check if a particular title is available? Use the pathEvaluator to do a search query?

        A 1 Reply Last reply 30 Jul 2017, 19:14 Reply Quote 0
        • A
          admin @Guest
          last edited by 30 Jul 2017, 19:14

          https://unogs.com

          ? 1 Reply Last reply 2 Aug 2017, 14:20 Reply Quote 0
          • ?
            Guest @admin
            last edited by 2 Aug 2017, 14:20

            @admin Yes thank you :) I mean pulling the information directly from Netflix like in the script you posted.

            A 1 Reply Last reply 2 Aug 2017, 15:02 Reply Quote 0
            • A
              admin @Guest
              last edited by 2 Aug 2017, 15:02

              The following JSON should do it:
              $search='your search string'
              $min='start of your search count, 0 typically'
              $max='max results'
              $at='your auth code discussed previously (may not be necessary)'

              {"paths":[["search","$search",{"from":$min,"to":$max},["availability"]],["search","$search",{"from":$min,"to":$max},"boxarts","_342x192","webp"]],"authURL":"$at"}
              
              1 Reply Last reply Reply Quote 0
              • ?
                Guest
                last edited by 12 Aug 2017, 16:33

                Thank you! I included "titles" as well (after "$search") and it worked for me. The auth code wasn't necessary.

                1 Reply Last reply Reply Quote 0
                • ?
                  Guest
                  last edited by 11 Sept 2017, 02:33

                  How do you get the information about WHEN titles will become available or expire?

                  A 1 Reply Last reply 14 Sept 2017, 12:26 Reply Quote 0
                  • A
                    admin @Guest
                    last edited by 14 Sept 2017, 12:26

                    availabilityEndDateNear

                    ["subtitles","audio","availability","availabilityEndDateNear"]
                    

                    Now easy way to get when new titles are available that I know of...

                    S 1 Reply Last reply 2 Oct 2017, 15:54 Reply Quote 0
                    • S
                      spiffylogic @admin
                      last edited by 2 Oct 2017, 15:54

                      @admin When I use "availabilityEndDateNear" (for a title that I know is expiring soon) I get back something I don't understand:

                      u'availabilityEndDateNear': {u'$size': 16, u'$type': u'sentinel', u'size': 16}
                      

                      What does this mean?

                      A 1 Reply Last reply 2 Oct 2017, 16:03 Reply Quote 0
                      • A
                        admin @spiffylogic
                        last edited by 2 Oct 2017, 16:03

                        @spiffylogic what title in what country?

                        S 1 Reply Last reply 2 Oct 2017, 16:29 Reply Quote 0
                        • S
                          spiffylogic @admin
                          last edited by 2 Oct 2017, 16:29

                          @admin That was "You Laugh But It's True" in Canada

                          A 1 Reply Last reply 2 Oct 2017, 17:03 Reply Quote 0
                          • A
                            admin @spiffylogic
                            last edited by 2 Oct 2017, 17:03

                            @spiffylogic It works fine for me, can you post the PATH JSON you are using?

                            S 1 Reply Last reply 2 Oct 2017, 17:23 Reply Quote 0
                            • S
                              spiffylogic @admin
                              last edited by 2 Oct 2017, 17:23

                              @admin Sorry it is actually working but I got lost in the sea of output. The data for that title indeed shows

                              u'availabilityEndDateNear': u'2017-10-05'
                              

                              but for all other titles it has that sentinel blob (which is still curious to me...).

                              Thanks for your help and for this great forum!

                              A 1 Reply Last reply 2 Oct 2017, 17:39 Reply Quote 0
                              • A
                                admin @spiffylogic
                                last edited by 2 Oct 2017, 17:39

                                @spiffylogic Glad to hear it... https://jsonformatter.curiousconcept.com/ is your friend

                                1 Reply Last reply Reply Quote 0
                                • ?
                                  Guest @FrankieD
                                  last edited by 6 Oct 2017, 17:02

                                  @frankied said in Part 2: A simple script to pull information:

                                  Requesting

                                  When I try your code I get this response:
                                  '''
                                  {u'paths': [[u'shows'], [u'80113701'], [u'browse']],
                                  u'value': {u'$size': 48,
                                  u'80113701': {u'$size': 16, u'$type': u'sentinel', u'size': 16},
                                  u'browse': {u'$size': 16, u'$type': u'sentinel', u'size': 16},
                                  u'shows': {u'$size': 16, u'$type': u'sentinel', u'size': 16},
                                  u'size': 48}}
                                  '''

                                  1 Reply Last reply Reply Quote 0
                                  • ?
                                    Guest
                                    last edited by 7 Oct 2017, 12:49

                                    Do you guys know how I can get the titles actors, directors and creators?
                                    Thanks in advance! :)

                                    1 Reply Last reply Reply Quote 0
                                    • ?
                                      Guest
                                      last edited by 23 Jan 2018, 15:36

                                      I'm trying to accomplish the same thing as this code sample in c#, I was able to get a working response in python but the rest of my project is in c#.

                                      However when I use a HTTPWebRequest to get the response stream, the response looks like this:
                                      "\u001f�\b\0\0\0\0\0\0\0ܖKo�F\fǿ�B�q�%�=�\u0015i\u000e)�&��T\u0004\u0006g�\u0013+Qv\u0017+���\u07fd#m��_M\u0011 \a�F��P\u007f�(��T�Ԟqu����k>\u0017C(i���^���\u0018�_m�ê�u߬����9hn3�ܔ\u0004��ݮ)'w���mL1�:��j����!�u&�\u0002\u001b��L�BP^��\u0018}d��LL9�(]&O�u\u0014Z9\u0017\u0010<\n\u001b2xͬ]\0��\u0010g2�Z��\u0010E��������2uܽ.e���\u001d�@���\u0012XKgIHr |

                                      (Shortened so not to overwhelm)

                                      I'm at a loss as to why the response I'm getting in c# is a unicode mess but the python code gets a nice clean response.

                                      Any ideas?

                                              string genres = "0,\"to\":1";
                                              string rmax = "5";
                                              string sbase = "[[\"newarrivals\",{\"from\":" + genres + "},{\"from\":0,\"to\":" + rmax + "},[\"title\",\"availability\"]],[\"newarrivals\",{\"from\":" + genres + "},{\"from\":0,\"to\":" + rmax + "},\"boxarts\",\"_342x192\",\"jpg\"]]";
                                              string data = "{\"paths\":" + sbase + ",\"authURL\":\"1516657903506.SW2aceZfllyxCd5V5TPHJdJiMxQ=\"}";
                                      
                                              byte[] byteArray = Encoding.UTF8.GetBytes(data);
                                              request.ContentLength = byteArray.Length;
                                              Stream dataStream = request.GetRequestStream();
                                              dataStream.Write(byteArray, 0, byteArray.Length);
                                              WebResponse response = request.GetResponse();
                                              dataStream = response.GetResponseStream();
                                              StreamReader reader = new StreamReader(dataStream);
                                              string responseFromServer = reader.ReadToEnd();
                                      
                                      A 1 Reply Last reply 25 Jan 2018, 09:19 Reply Quote 0
                                      • A
                                        admin @Guest
                                        last edited by 25 Jan 2018, 09:19

                                        unfortunately I have never played with C# so I can't be much help there...

                                        ? 1 Reply Last reply 7 Mar 2018, 02:25 Reply Quote 0
                                        • ?
                                          Guest @admin
                                          last edited by 7 Mar 2018, 02:25

                                          @admin I've been trying to do a search call to pathevaluator, even copied exactly what is being sent on netflix's search page, but there must be some kind of sorting going on? For example when I search "shark" I'm getting little rascals at the top. Little rascals is also on the netflix page but down on around row 10.

                                          Any idea if theres some relevancy value I need? Thanks in advance.

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post