updating domains - panuozzo77/StreamingCommunity GitHub Wiki

Updating Domains

This document explains how to update the domains for the supported streaming sites in StreamingCommunity. As streaming sites frequently change their domain names to avoid blocking, keeping these domains updated is essential for the application to function properly.

Overview

StreamingCommunity offers two methods for updating the domains of supported websites:

  1. Using Local Configuration: Create and maintain a local domains.json file
  2. Using API (Legacy): Use the built-in API to fetch domain updates

Using Local Configuration (Recommended)

This is the recommended method as it gives you full control over the domain configuration.

Steps to Update Domains Locally

  1. Create a domains.json file in the root directory of the project (same level as config.json)

  2. Add your domain configuration in the following format:

    {
       "altadefinizione": {
           "domain": "si",
           "full_url": "https://altadefinizione.si/"
       },
       "animeunity": {
           "domain": "it",
           "full_url": "https://animeunity.it/"
       },
       "animeworld": {
           "domain": "bz",
           "full_url": "https://www.animeworld.bz/"
       }
    }
  3. Set use_api to false in the DEFAULT section of your config.json:

    {
       "DEFAULT": {
          "use_api": false
       }
    }

Domain Configuration Format

For each site, you need to specify:

  • domain: The domain extension or identifier (e.g., "si", "it", "bz")
  • full_url: The complete URL including protocol and path

Finding Current Domains

To find the current domains for streaming sites:

  1. Search engines: Search for the site name and look for recent results
  2. Social media: Check the official social media accounts of the sites
  3. Forums: Check forums like Reddit where users share updated domains
  4. Discord: Join the StreamingCommunity Discord for the latest domain information

Using API (Legacy)

The API-based domain updates are currently deprecated but still functional.

Steps to Use the API

  1. Set use_api to true in the DEFAULT section of your config.json:

    {
       "DEFAULT": {
          "use_api": true
       }
    }
  2. Run the application - it will automatically fetch domain updates from the API

Limitations of the API Method

  • The API may not always have the most up-to-date domains
  • API updates depend on the maintainers keeping the API current
  • Some sites may not be included in the API

Automatic Updates

The application includes an update script that can help keep domains current:

# On Windows
python update.py

# On Linux/macOS
python3 update.py

This script attempts to:

  1. Update the application code from GitHub
  2. Check for domain updates
  3. Apply any available updates

Troubleshooting Domain Issues

Common Domain-Related Problems

  1. "Site not available" errors

    • The domain may have changed
    • Try updating your domains.json file with the latest domain
    • Check if the site is actually down
  2. "Connection refused" or timeout errors

    • The site may be blocking requests from the application
    • Try using a different domain for the same site
    • Some sites may implement anti-scraping measures
  3. "Invalid domain configuration" errors

    • Check your domains.json syntax
    • Ensure all required fields are present
    • Verify the URLs are correctly formatted with protocol (http:// or https://)

Adding a New Site to the Legacy API

If you want to add a new site to the legacy API:

  1. Message the maintainers on the Discord server
  2. Provide the site name and current domain
  3. The maintainers will evaluate and potentially add it to the API

Best Practices

  • Regular Updates: Check for domain updates regularly
  • Backup Your Configuration: Keep a backup of your working domains.json file
  • Multiple Domains: For some sites, you might want to keep multiple alternative domains in case one becomes unavailable
  • Community Resources: Stay connected with the community for the latest domain information

Related Documentation

⚠️ **GitHub.com Fallback** ⚠️