Bimg icon indicating copy to clipboard operation
Bimg copied to clipboard

Stopped working 26th November 2023

Open Brad3273 opened this issue 1 year ago • 13 comments

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 { } Redirected to https://www.bing.com/images/create?q=A%20bicycle&rt=3&FORM=GENCRE Waiting for results... . { end: '', flush: true } imagesResponse.data: { errorMessage: 'Pending', showContent: '', enableDebug: false } file:///home/azureus2/node_modules/bimg/dist/imgen.js:81 throw new 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."); ^

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.

Brad3273 avatar Nov 27 '23 01:11 Brad3273

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?

Brad3273 avatar Nov 27 '23 08:11 Brad3273

the same problem was solved by adding values to the cookie for BCP= and SRCHHPGUSR=

Saitgalin avatar Nov 29 '23 12:11 Saitgalin

My browser doesn't have a BCP cookie when using Bing Image Creator?

Brad3273 avatar Nov 29 '23 20:11 Brad3273

maybe BCP needed only in my case, i changed the code a little. does it work with the addition of SRCHHPGUSR= in your case?

Saitgalin avatar Nov 30 '23 14:11 Saitgalin

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.

Brad3273 avatar Dec 01 '23 01:12 Brad3273

does this method still work?

rizxyu avatar Dec 10 '23 05:12 rizxyu

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.

Brad3273 avatar Dec 10 '23 05:12 Brad3273

does this method still work?

ERLANRAHMAT avatar Dec 25 '23 01:12 ERLANRAHMAT

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.

Brad3273 avatar Dec 25 '23 20:12 Brad3273

ok,thanks info i will try

ERLANRAHMAT avatar Dec 25 '23 22:12 ERLANRAHMAT

This method works, thank you very much 🙏🏻

ERLANRAHMAT avatar Dec 25 '23 23:12 ERLANRAHMAT

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...

Legends-of-NGDB avatar Mar 08 '24 01:03 Legends-of-NGDB

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!

Brad3273 avatar Mar 08 '24 01:03 Brad3273