Coder Social home page Coder Social logo

Comments (16)

harrypython avatar harrypython commented on May 30, 2024 1

hi harry,
After 17 days ! no reply ? no action ?

You need to work on your motivational speech bro 😂

from itsagramlive.

harrypython avatar harrypython commented on May 30, 2024 1

The endpoint media/configure_to_igtv demand a signed_bod with the following parameters:

{
   "igtv_ads_toggled_on":"0",
   "_csrftoken":self.token,
   "source_type":"4",
   "_uid":self.username_id,
   "device_id":self.device_id,
   "keep_shoppable_products":"0",
   "_uuid":self.uuid,
   "title":"the live title",
   "caption":"the live description",
   "upload_id":self.upload_live_thumbnails(),
   "igtv_composer_session_id":"***HERE IS MY PROBLEM***",
   "device":{
      "manufacturer":self.DEVICE_SETS["manufacturer"],
      "model":self.DEVICE_SETS["model"],
      "android_version":self.DEVICE_SETS["android_version"],
      "android_release":self.DEVICE_SETS["android_release"]
   },
   "extra":{
      "source_width":576,
      "source_height":944
   }
}

The 1 million dollars question is: what use in igtv_composer_session_id?

from itsagramlive.

Don-Stive avatar Don-Stive commented on May 30, 2024

hi harry,
After 17 days ! no reply ? no action ?

from itsagramlive.

Aydin47 avatar Aydin47 commented on May 30, 2024

@harrypython
I use this steps for posting a live video after finishing it:
1: End Live -> /live/{0}/end_broadcast/
2: Creating tools -> /igtv/igtv_creation_tools/
3: Download the Thumbnails -> /live/"BroadcastID"/get_post_live_thumbnails/
4: Post them to IGTV: /media/configure_to_igtv/

from itsagramlive.

Aydin47 avatar Aydin47 commented on May 30, 2024

It's just a GUID (Globally Unique Identifier), just use a new Instance of a Guid, like you do to generate session-ID its a randome 128-bit identifier.
ex : 4fd33ed5-cef5-4737-9ba2-dcb614ce872b
https://www.guidgenerator.com/online-guid-generator.aspx

from itsagramlive.

Aydin47 avatar Aydin47 commented on May 30, 2024

And add these headers to your signed request : (C# code)
`
request.Headers.Add("retry_context", retryContext);

     request.Headers.Add("is_igtv_video", "true");

     request.Headers.Add("DEBUG-IG-USER-ID", _yourPk_);

     request.Headers.Add("Priority", "u=3");

     request.Headers.Add("X-Bloks-Is-Panorama-Enabled", "true");

     request.Headers.Add("X-FB-Client-IP", "true");

     where retryContext  is:  new JObject
            {
                {"num_step_auto_retry", 0},
                {"num_reupload", 0},
                {"num_step_manual_retry", 0}
            }.ToString(Formatting.None);

`

from itsagramlive.

harrypython avatar harrypython commented on May 30, 2024

@Aydin47 I create a new branch to test https://github.com/harrypython/itsagramlive/tree/issue40

This is my signed body

data = json.dumps({
            "igtv_ads_toggled_on": "0",
            "timezone_offset": "-28800",
            "_csrftoken": self.token,
            "source_type": "4",
            "_uid": self.username_id,
            "device_id": self.device_id,
            "keep_shoppable_products": "0",
            "_uuid": self.uuid,
            "title": title,
            "caption": description,
            "igtv_share_preview_to_feed": "1",
            "upload_id": self.upload_live_thumbnails(),
            "igtv_composer_session_id": self.generate_UUID(True),
            "device": {
                "manufacturer": self.DEVICE_SETS["manufacturer"],
                "model": self.DEVICE_SETS["model"],
                "android_version": self.DEVICE_SETS["android_version"],
                "android_release": self.DEVICE_SETS["android_release"]},
            "extra": {"source_width": 504, "source_height": 896}})

and the header with your suggestions:

h = {
            'X-IG-App-Locale': 'en_US',
            'X-IG-Device-Locale': 'en_US',
            'X-IG-Mapped-Locale': 'en_US',
            'X-IG-Device-ID': self.device_id,
            'X-Bloks-Is-Layout-RTL': 'false',
            'X-Bloks-Is-Panorama-Enabled': 'true',
            'is_igtv_video': '1',
            'Priority': 'u = 3',
            'retry_context': '{"num_reupload": 0, "num_step_auto_retry": 0, "num_step_manual_retry": 0}',
            'IG-U-DS-USER-ID': str(self.username_id),
            'IG-INTENDED-USER-ID': str(self.username_id),
            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
            'Accept-Encoding': 'gzip, deflate',
            'Connection': 'close',
            'X-FB-HTTP-Engine': 'Liger',
            'X-FB-Client-IP': 'True',
            'X-FB-Server-Cluster': 'True',
        }

and my response is:
ERROR(400): Pre-allocated media not Found.

from itsagramlive.

Aydin47 avatar Aydin47 commented on May 30, 2024

@harrypython
I will fork it and try, but i just searched for "igtv_creation_tools" didn't find it in ItsAGramLive.py
the sequence is: (After Ending live)
/// GET /api/v1/igtv/igtv_creation_tools/
/// GET /api/v1/live/17906827711706707/get_post_live_thumbnails/
/// POST /rupload_igphoto/5375224842268_0_-249004301
/// POST /api/v1/media/configure_to_igtv/

I could provide you the curl for them...

from itsagramlive.

harrypython avatar harrypython commented on May 30, 2024

I will fork it and try, but i just searched for "igtv_creation_tools" didn't find it in ItsAGramLive.py
My bad. Fixed!

But now I have an 408 timeout error when I try to get igtv/igtv_creation_tools 😭

I could provide you the curl for them...

Thank you for your help.

from itsagramlive.

Aydin47 avatar Aydin47 commented on May 30, 2024

Now I pushed something, check it out

from itsagramlive.

harrypython avatar harrypython commented on May 30, 2024

Finally, a have a response when I call igtv/igtv_creation_tools 🥳, thank you @Aydin47

But I'm back in the original error. When I try media/configure_to_igtv I receive the error:

400 - 'Pre-allocated media not Found.' 😭

the branch https://github.com/harrypython/itsagramlive/tree/issue40 has my last code

from itsagramlive.

Aydin47 avatar Aydin47 commented on May 30, 2024

hhhmmmm... I checked your code again, Do you actually stream something via OBS to the instagram with the url that you get? (stay live more than 1 min of course) if not,
Try to call upload_live_thumbnails() and wait for status 200 or succesed then go for media/configure_to_igtv/,
burpsuite shows sometimes it may need more time for upload_live_thumbnails
or Try to call add_post_live_to_igtv in debug mode and check if you get upload_live_thumbnails there.

from itsagramlive.

harrypython avatar harrypython commented on May 30, 2024

IT'S A LIVE, I mean, it's working!

Thank you for your help @Aydin47 you are the best.

I will publish a new version soon.

from itsagramlive.

Aydin47 avatar Aydin47 commented on May 30, 2024

fyiiiiiiiiiiiiiiiiii

from itsagramlive.

dedshit avatar dedshit commented on May 30, 2024

increase stream limit to 4 hours

Screenshot_20211027-210738_Termux

i'm testing live stream in heroku but stream stops before 60 minutes

it will be good if you increase stream limit 1hr - 4 hrs

from itsagramlive.

dedshit avatar dedshit commented on May 30, 2024

20211028_083209

from itsagramlive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.