Skip to content

Commit

Permalink
if no coins slow generation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DedInc committed Dec 3, 2023
1 parent cdc253d commit 4f95860
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion bingart/bingart.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def generate_images(self, query):
except IndexError:
raise AuthCookieError('Auth cookie failed!')

url = f'https://www.bing.com/images/create?{encoded_query}&rt=' + '4' if coins > 0 else '3' + '&FORM=GENCRE'
url = f'https://www.bing.com/images/create?{encoded_query}&rt='
rt = '4' if coins > 0 else '3'
url += rt
url += '&FORM=GENCRE'

with requests.Session() as session:
session.headers = headers
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

setup(
name='bingart',
version='1.0.1',
version='1.0.2',
author='Maehdakvan',
author_email='[email protected]',
description='bingart is an unofficial 🤫 API wrapper for Bing Image Creator (based on DALL-E 3).',
description='bingart is an unofficial API wrapper for Bing Image Creator (based on DALL-E 3).',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/DedInc/bingart',
Expand Down

0 comments on commit 4f95860

Please sign in to comment.