Commit 7f149669 authored by Narbe Voskanian's avatar Narbe Voskanian
Browse files

update README.md & clean up variable name

parent 32533ad6
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -25,6 +25,25 @@ docker run --restart=unless-stopped -p 8000:8000 -e GUNICORN_WORKERS=4 thetechro
### Running outside of Docker (unsupported)
You should be able to check the Dockerfile for what it is doing during the build (it's a glorified shell script).

## User-Agent Configuration

You can set the `User-Agent` globally in your `config.yml` file:

### Example `config.yml`

```yaml
version: 3

# Global User-Agent
user_agent: "MyCustomUserAgent/1.0"

methods:
  youtube:
    title: YouTube
    enabled: true
...
```

## Licence

Copyright (c) 2022-2024 TheTechRobo
+1 −1
Original line number Diff line number Diff line
@@ -61,4 +61,4 @@ methods:
    enabled: true

# uncomment below to set a user agent
# user-agent: FindYoutubeVideo/1.0 operated by TheTechRobo
 No newline at end of file
# user_agent: FindYoutubeVideo/1.0 operated by TheTechRobo
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ from snscrape.base import _JSONDataclass as JSONDataclass
with open('config.yml', 'r') as file:
    config_yml = yaml.safe_load(file)
    methods = config_yml["methods"]
    user_agent = config_yml.get("user-agent") # defaults to None if not set
    user_agent = config_yml.get("user_agent") # defaults to None if not set

@dataclasses.dataclass
class Service(JSONDataclass):