- How to Get This Project
- Features
- Details and Endpoints
- File Structure and Usage
- Tutorial: Hosting on Render.com
- Additional Information
-
Clone the Repository:
git clone https://github.com/your-repo/image-search-app.git cd image-search-app -
Install Dependencies:
npm install
-
Set Up SSL Certificates:
- Place your SSL certificate files (
server.keyandserver.cert) in thecertsdirectory.
- Place your SSL certificate files (
-
Add Bing Cookies:
- Update
cookies.jsonwith your Bing cookies.
- Update
- Image Search: Allows users to search for images and displays results with visual effects.
- Multiple Cookies Support: Utilizes multiple cookies for fetching images, automatically switching if one fails.
- Data Persistence: Saves retrieved image URLs and prompts in
bingData.json. - Logging: Logs server and error messages using Winston.
- HTTPS Server: Secure server setup with status check endpoint.
-
Endpoint:
/api/bing- Method: GET
- Parameters:
prompt(required) - The search term for images. - Response: JSON containing image URLs.
-
Status Check:
/status- Method: GET
- Response: JSON indicating the server status.
index.js: Main server setup, initializes routes and middleware.routes/bing.js: Handles image search requests, manages cookies, and saves image data.httpsServer.js: Sets up an HTTPS server with a status endpoint.logger.js: Configures Winston for logging.cookies.json: Stores Bing cookies.bingData.json: Persists image URLs and prompts.certs/: Contains SSL certificate files.
-
Create a New Web Service:
- Sign up at Render.com and create a new web service.
- Link your GitHub repository to the service.
- Put some information like
- npm install
- node index js
-
Environment Configuration:
- Set environment variables if needed, such as
PORT.
- Set environment variables if needed, such as
-
Deploy:
- Render will automatically build and deploy your project.
-
SSL Configuration:
- Use Render's built-in SSL feature or provide your own certificates.
-
Install PM2:
npm install pm2 -g
-
Start Your Application with PM2:
pm2 start app.js --name "my-app" -
Ensure PM2 Restart on Server Reboot:
pm2 startup pm2 save
- CSS Styles:
- Edit styles in the HTML file (
index.html) to change image box appearance and effects.
- Edit styles in the HTML file (
- Winston Logging:
- Adjust logging levels and formats in
logger.jsfor production needs.
- Adjust logging levels and formats in
- Configure Environment Variables:
- Use
.envfiles or set directly in your hosting platform for sensitive data like API keys.
- Use
-
SSL Certificates:
- Always use HTTPS in production for secure data transmission.
-
Input Validation:
- Implement input validation to prevent injection attacks and handle user errors gracefully.
To update the tutorial with detailed steps on how users can obtain the (_U) cookie from Bing.com using the "Edit This Cookie" extension on the Kiwi Browser for Android, follow these comprehensive instructions:
-
Install Kiwi Browser:
- Visit the Google Play Store on your Android device.
- Search for "Kiwi Browser" and install it.
-
Install "Edit This Cookie" Extension:
- Open Kiwi Browser and go to the Kiwi Web Store (accessible via Kiwi Browser's menu or directly through a search engine).
- Search for "Edit This Cookie" extension and add it to Kiwi Browser.
-
Enable Desktop Mode:
- Launch Kiwi Browser on your Android device.
- Tap on the three vertical dots (menu) in the top right corner.
- Select "Desktop site" from the menu to enable desktop mode.
-
Navigate to Bing.com:
- Enter bing.com into the address bar and press Enter to visit the Bing homepage.
- Navigate to Bing Images Creator:
- Go to bing.com/images/creator using the Kiwi Browser.
-
Open "Edit This Cookie" Extension:
- Click on the "Edit This Cookie" extension icon in the Kiwi Browser toolbar.
-
Search for _U Cookie:
- In the "Edit This Cookie" extension popup, click on the search icon or use the search field to find the _U cookie.
- Look for a cookie named "_U" associated with "bing.com".
-
Lock _U Cookie:
- Once located, click on the lock icon next to the _U cookie. This prevents the cookie from expiring or being modified inadvertently.
-
Copy the _U Cookie Value:
- Click on the _U cookie value to select it.
- Right-click (or long-press) and choose "Copy" to copy the _U cookie value to your clipboard.
- Paste and Use _U Cookie:
- Paste the copied _U cookie value into your application or
cookies.jsonfile where required to authenticate requests to Bing's APIs.
- Paste the copied _U cookie value into your application or
-
Privacy and Security:
- Treat the _U cookie as sensitive information and store it securely.
- Avoid sharing or exposing cookies in public or unsecured environments to prevent unauthorized access to your Bing account.
-
Browser Extensions:
- Kiwi Browser supports a range of Chrome extensions, enhancing functionality and customization options for users.
By following these detailed steps, users can effectively obtain the _U cookie from Bing.com using the "Edit This Cookie" extension in Kiwi Browser on their Android devices. This process ensures secure access to Bing's services and facilitates seamless integration into applications requiring Bing API authentication.
- Contributions Welcome:
- Fork the repository, make changes, and submit pull requests for feature enhancements or bug fixes.
- Contact for Help:
- Reach out to the project maintainer via email or GitHub issues for assistance.
Email: aryanchauhan78577@gmail.com
Phone: +919317171638