1. syd2oo2

    syd2oo2 Well-Known Member

    Oct 8, 2011
    I'm trying to make a python script to upload to clipwatching via api, but I'm stuck. Below is a script I use and the response, I get. No error, but also no file in my account. I can't figure what I'm doing wrong. Can anyone help?

    #!/usr/bin/env python3

    import requests


    resp_prepare = requests.get('https://clipwatching.com/api/upload/server?key='+api_key)

    upload_url = resp_prepare.json()["result"]

    params = {
    'api_key' : api_key

    headers_post = {
    'cache-control': 'no-cache',
    'content-type': 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW',

    response = requests.post(upload_url, headers=headers_post,params=params, files={'file': open('test_video.mp4','rb')})

    b'<HTML><BODY><Form name=\'F1\' action=\'https://clipwatching.com/\' target=\'_parent\' method=\'POST\'><textarea name="op">upload_result</textarea></Form><Script>document.location=\'javascript:false\';document.F1.submit();</Script></BODY></HTML>'
  2. vitoscripter

    vitoscripter Well-Known Member

    Mar 26, 2019
    you didnt write the leecher code.
  3. syd2oo2

    syd2oo2 Well-Known Member

    Oct 8, 2011
    What do you mean leecher code? I just want to upload a local file, in this case test_video.mp4, that is in the same folder where the script is via api. This exact script works on some hosters, and doesn't on clipwatching.
  4. himal

    himal Well-Known Member

    Jun 15, 2012
    If you can PM me a demo account then I can take a look.

Share This Page