Bimg
Bimg copied to clipboard
Stopped working 26th November 2023
I was using this for the last two-odd weeks, since the 13th November 2023. It worked great! Thank you.
It suddenly stopped working in the morning of the 26th November 2023 GMT. 'Stopped working' as in it immediately returns with an error:
$ node ./getbing.js "A bicycle"
Prompt: A bicycle
Sending request...
https://www.bing.com/images/create?q=A%20bicycle&rt=3&FORM=GENCRE
done with no errors!
Promise {
Error: This prompt has been blocked by Bing. Bing's system flagged this prompt because it may conflict with their content policy. More policy violations may lead to automatic suspension of your access. at getImages (file:///home/azureus2/node_modules/bimg/dist/imgen.js:81:15) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async generateImageFiles (file:///home/azureus2/node_modules/bimg/dist/imgen.js:157:24)
I put in a couple of lines of debug so the output and line numbers won't agree with the repository.
I can still submit prompts to Bing via my Chrome browser using the same IP address. I've double checked the cookie (which hasn't changed) in the .env file.
This was an excellent tool and was very useful. I don't know what Microsoft did, but it would appear something's now blocking what Bimg does.
I don't know much about this sort of thing, but ... I grabbed all of the cookies from a Bing browser sesson (using the DevTools Network inspector) and just copied them in their entirety into dist/imgen.js instead of just '_U' and it's worked twice in a row for a simple prompt.
I'm wary about continuing to use it, though, as I don't know whether using ALL of the cookies will look super-suspicious; maybe some are supposed to change with each query?
the same problem was solved by adding values to the cookie for BCP= and SRCHHPGUSR=
My browser doesn't have a BCP cookie when using Bing Image Creator?
maybe BCP needed only in my case, i changed the code a little. does it work with the addition of SRCHHPGUSR= in your case?
does it work with the addition of SRCHHPGUSR= in your case?
Yes it does! Thanks. So, I've got just _U and SRCHHPGUSR cookies and it appears to be working again.
does this method still work?
After a day or two it stopped working for me again, so I went back to copying all the cookies, and that has been working to date.
does this method still work?
Yes, it is still working for me. I'm copying the entire 'cookie' string from the browser's requests header for the /images/create?q=... query into dist/imgen.js before I run bimg.
ok,thanks info i will try
This method works, thank you very much 🙏🏻
Does, this still work? I've tried your method and it did work for the first day but then Bing is blocking it and not redirecting...
Bimg has been working brilliantly for me every day, as of 24 hours ago when I last used it. As per my last comment I copy the entire cookie header from my browser into imgen.js.
It's great and I'm very grateful to the author for providing the program!