Closed lpwyz closed 3 weeks ago
the api endpoint has changed in v10, here are new docs: https://github.com/imputnet/cobalt/blob/main/docs/api.md
all other docs are also listed in the main readme.
Hello, I have seen this document. Perhaps my technical skills are too poor, and I still didn't understand its meaning. I have already run this project locally. How can I call the interface? Or do you have any fees for APIs that can be called? Because I really don't know how to enable this interface now
the interface as in the api endpoint or web ui?
the new api post endpoint is /
, previously it was /api/json
I ran the page like this, and just saw that the latest endpoint you mentioned is/indeed, Postman has not returned the HMTL page now, but has been requesting for a long time, and the final page returned is like the picture below ![Uploading 8080.png…]()
I ran the page like this, and just saw that the latest endpoint you mentioned is/indeed, Postman has not returned the HMTL page now, but has been requesting for a long time, and the last page returned is the image sent above
this error means that youtube is either inaccessible (on the network) or you need to setup account cookies: https://github.com/imputnet/cobalt/blob/main/docs/configure-for-youtube.md
(1) Okay, thank you. Let me take a closer look at this document again. Is it true that my project is now running and has its own interface? If some cookies are configured and placed on the server, can my app call them. (2) Because I am in China, I just tried this cobalt and it supports Bilibili. When I ran Postman, I found that it resolved successfully, but the resolved address is as follows. My browser also cannot open it, so I would like to ask if there is anything that needs to be configured here. The data returned by Bilibili is shown in the following figure:
Is it true that my project is now running and has its own interface
yep, all you see is your own api
If some cookies are configured and placed on the server, can my app call them
yeah, you'll see a console message (with a green checkmark) about successful cookie file loading if it's configured correctly
My browser also cannot open it
what error do you see when you try to open the tunnel url?
(1)Okay, the following picture is a screenshot of my project running: does it look like it ran successfully?
(2)When I open the URL returned by Cobalt( http://localhost:9000/tunnel?id=v7IQ886Pnv8b4upRfTHsE&exp=1730366718680&sig=_J2kR6zaWlepilq6EDaU3oNPVrXJ968rzg -When using the address tuv2Kieo&sec=1AiBcG7deb97E5-xsNGU-44FhS6GrZ5hMjkE cee is&iv=L7BaUly31Csid2353-3z2Q, the page returns as follows:
(3)When I open the URL returned by Cobalt( http://localhost:9000/tunnel?id=v7IQ886Pnv8b4upRfTHsE&exp=1730366718680&sig=_J2kR6zaWlepilq6EDaU3oNPVrXJ968rzg -When I add the file name to this address suffix, the page returns as follows:
It is the returned URL+filename, the browser returns 400 when entering URL, and the browser returns 401 when entering URL
tunnel links expire after 90 seconds, and you shouldn't put the filename anywhere in the url
Oh, hello, I just reproduced the problem and was able to quickly parse Bilibili videos. Then, I directly obtained the URL, accessed it through the browser, and took a screenshot of the browser as shown below. Then, I found that my local Cobalt project immediately reported an error. Let me show you the screenshot of the error, which is also shown in the following picture :
did you install all dependencies with pnpm install
?
EACCES error code means that it can't access ffmpeg, maybe something's wrong with permissions?
I'm sure I installed it. Please see the picture below:
Could it be because I am a Mac computer?
i use a mac too and it runs fine, i feel like something's off about node permissions
Thank you very much for keeping coming back to me. It's time for dinner here, so I'll go have a meal first. Thank you very much. I'll ask you later,
发自我的iPhone
------------------ Original ------------------ From: wukko @.> Date: Thu,Oct 31,2024 6:04 PM To: imputnet/cobalt @.> Cc: Benjamin @.>, Author @.> Subject: Re: [imputnet/cobalt] Why can't I use the interface after runningthis project locally? Did I make a mistake in the steps (Issue #874)
i use a mac too and it runs fine, i feel like something's off about node permissions
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
i really hope you got it to work, but i came here to say thank you for being nice to me yesterday, it made my day and i'm still thinking about it. people usually yell at me as if i'm their slave, but you didn't. thank you for being kind!
what a sweet person. lpwyz, did it work for you?
描述一件事。人们通常会对我大喊大叫,希望我是他们的奴隶,但你没有。谢谢你的好意!
I should thank you, your cobalt has been a great help to me. I found out that I was running the Cobalt project locally, but I also found that I couldn't get the Instagram link. Although my local project was running, I couldn't get all the videos. Did I miss some steps ,
This link: https://www.instagram.com/reel/C-4IG4ZsVFV/?igsh=MWFwY2tkMWR1dHhxYw== The website on the Cobalt official website can be extracted
多么可爱的一个人啊。 lpwyz,对你有用吗?
Can you help me if I need assistance? Because I saw from Cobalt that the public API will not be open on November 11th, so I want to create an interface on my own server. I ran the Cobalt project locally according to the document, but I also sent it to Cobalt just now. It seems that all the projects linked to my local running cannot obtain videos
Oh, hello, I noticed that if I directly use Docker to create a Cobalt project based on the document on my Mac computer, I can obtain the video link after running it locally, such as on Instagram and YouTube. However, I have two new questions. Can you help me answer them?
(1) After successfully running the project as shown in the picture below, the YouTube video address cannot be opened locally (2) For example, after installing Docker on my own server and running the Cobalt project with Docker, I can use it as my own interface for my website, but there are a few new issues as follows:
(1) For example, if the logic of obtaining videos on YouTube or Instagram changes, the code for Cobalt will definitely change. How can I update my own latest Cobalt code in a timely manner? Because if I don't update the code, I may not be able to obtain videos. (2) Can this project be used for a long time
After successfully running the project as shown in the picture below, the YouTube video address cannot be opened locally
i think you’re missing :9000 in your API_URL
, it should be something like http://localhost:9000
How can I update my own latest Cobalt code in a timely manner
for auto updates, we recommend using watchtower, which is in the example docker compose file here: https://github.com/imputnet/cobalt/blob/main/docs/examples/docker-compose.example.yml
it doesn’t require any additional configuration and will update the image by itself in the background
Can this project be used for a long time
yeah! it can work for as long as your computer is on (i think)
成功运行项目后如下图所示,无法在本地打开YouTube视频地址
我认为你遗漏了 :9000
API_URL
,它应该是这样的http://localhost:9000
如何才能及时更新自己最新的Cobalt代码
对于自动更新,我们建议使用 watchtower,它位于此处的示例 docker compose 文件中: https: //github.com/imputnet/cobalt/blob/main/docs/examples/docker-compose.example.yml
它不需要任何额外的配置,并将在后台自动更新图像
这个项目能长期使用吗
是的!只要你的电脑开着它就可以工作(我认为)
Yes, that's right. Big shot, you're amazing! You're really impressive. Just now I tested again, and it's true that the URL returned by my interface doesn't include the username 9000. After adding it, you can download the file. I still have a few questions I want to consult with you:
(1) I ran it on Docker, and the yml in it is from the copied cobalt document. I remember it was written in the document, ports: -9000: Why isn't 9000 added to the returned URL? Is there a way to control the return URL to also include the 9000 port number? (2) In the current yml file configuration, my environment is: API_URL: " http://localhost:/ It is configured in this way, so the URL prefix of the obtained YouTube videos is http://localhost Right, for example, my server's IP is 106.45xx.xx. Does that mean the returned URL prefix is 106.45xx.xx? Or can I fill in my API-URL freely, even if it's not my own server IP? (3): I remember the documentation said that cookies need to be configured in YouTube, why can I still get YouTube videos without configuring them now? Is it because Docker runs the Cobalt API, which automatically configures YouTube's Coolike for us? If so, I don't need to worry about Coolike, right (4) Is there a concurrent QPS of 20 for this interface
Is there a way to control the return URL to also include the 9000 port number?
you may have cobalt behind a reverse proxy, so we can't really add a port by default without making it more complex to configre. you just have to add a port to API_URL
if you're not using a domain or a reverse proxy (like nginx).
Does that mean the returned URL prefix is 106.45xx.xx?
if you want to access the instance outside of local network, then yes, you need to set API_URL
to http://106.45xx.xx:9000
why can I still get YouTube videos without configuring them now?
if it works fine now, then you probably don't need cookies. cookies are required only when your IP address has poor reputation and youtube blocks requests as "bot".
Is there a concurrent QPS of 20 for this interface
not sure what you mean, but if you mean the rate limit, then it can be modified via the RATELIMIT_MAX
environment variable
you can see a list of all environment variables here: https://github.com/imputnet/cobalt/blob/main/docs/run-an-instance.md#list-of-environment-variables-for-api
Understood, thank you. What I mean by 20QPS is that you can access the interface up to 20 times in one second at most. There's another issue, although it hasn't happened yet, which is that if my IP is blocked by YouTube and I need cookies, as you mentioned earlier, there will be two new problems:
(1) Does this cookie require me to create a new YouTube account and obtain the account's cookie? Can I buy this new YouTube account cookie with money? Do you have any recommended places or websites, (2) After obtaining the cookie, where should I add it because I am running cobalt on Docker? According to the documentation, I added it in youtube_oauth. Now that Docker is running, where should I add it (3) Is it only YouTube that needs this type of cookie? Are there any other websites that also need it? I will check in advance so that if there are any issues with the project in the future, it can be resolved more quickly.
Thank you again for your reply
problem description
I followed the documentation, git clone, installed the dependencies, and then pnpm start ran successfully. The. env file format is also API-URL= http://localhost:9000/ Then I use my local postman http://localhost:9000/api/json Then I added the request header and URL, and when calling it, it returns an HTML with the content Cannon POST/API/JSON. I think I might have taken the wrong steps. Can you teach me? Because I saw on the official website that public APIs will no longer be available after November 11th, I wanted to run the Cobalt project on my own server and open an interface. How should I implement this
your instance configuration