Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
a61d736
chore: updates gitignore for working .masa files, cleans up .env.example
grantdfoster Jul 17, 2025
e5eec47
feat: refactored capabilities
grantdfoster Jul 17, 2025
4f25e9f
fix: dedupe in job server
grantdfoster Jul 17, 2025
182e742
chore: rename scraper to jobType for consistency
grantdfoster Jul 22, 2025
f9fd65f
fix: updates compose to support easy change of port, adds make comman…
grantdfoster Jul 22, 2025
bcfaeb0
chore: cleanup compose, example, and makefile testing
grantdfoster Jul 22, 2025
d3016d2
chore: update compose and makefile for simpler job testing
grantdfoster Jul 22, 2025
a5deb86
fix: improves job testing with twitter to mimic production
grantdfoster Jul 22, 2025
d1c1a65
chore: rename scraper capability to job capability
grantdfoster Jul 23, 2025
912097d
chore: telemetry test and fix twitter unmarshalling
grantdfoster Jul 23, 2025
83df0f3
chore: adds api key to twitter test
grantdfoster Jul 23, 2025
e967a4a
fix: makefile tesitng to support optional .env
grantdfoster Jul 23, 2025
9f33e5d
fix: listen address in compose
grantdfoster Jul 23, 2025
39986ac
chore: removes focused test for ci cd
grantdfoster Jul 23, 2025
127b7d1
chore: remove unused in gitignore
grantdfoster Jul 23, 2025
2902782
chore: cleanup unsued vars in worker json
grantdfoster Jul 23, 2025
fba92c9
chore: rename local variable
grantdfoster Jul 23, 2025
497ecc6
chore: update local variable
grantdfoster Jul 23, 2025
7f4fc9e
fix: add back env name
grantdfoster Jul 23, 2025
08dba61
chore: fixes scrape profile test
grantdfoster Jul 23, 2025
6f0adcc
chore: fixes half of the twitter tests
grantdfoster Jul 23, 2025
e7d2731
chore: fixes all twitter tests
grantdfoster Jul 23, 2025
9ec3848
fix: removes focused test
grantdfoster Jul 23, 2025
f28db1e
chore: reorganizes tests
grantdfoster Jul 23, 2025
64d6815
fix: comment out piece of followers test verifying scrape stats
grantdfoster Jul 23, 2025
9432471
fix: all tests cleaned for twitter
grantdfoster Jul 23, 2025
1076cf4
fix: cleanup first test
grantdfoster Jul 23, 2025
2da5180
chore: capabilities readme
grantdfoster Jul 23, 2025
2b78020
chore: updates actual capabilities
grantdfoster Jul 23, 2025
995ae57
fix: remove mentions of manual capabilities
grantdfoster Jul 23, 2025
ca7e73c
fix: readme capabilities
grantdfoster Jul 23, 2025
a35377c
fix: readme
grantdfoster Jul 23, 2025
f78ff0f
fix: cleanup readme job subtypes
grantdfoster Jul 23, 2025
ebc86c8
fix: adds api key back into worker json
grantdfoster Jul 23, 2025
3ed3703
chore: refactor to use centralized tee-types, pointing locally for no…
grantdfoster Jul 23, 2025
84246a2
fix: always available capabilities to the top
grantdfoster Jul 23, 2025
fe10a21
fix: uses centralized types from tee types
grantdfoster Jul 24, 2025
dcfd9cf
chore: cleanup mod for tee types v1.1.0
grantdfoster Jul 24, 2025
5c2b064
fix: detector duplicates
grantdfoster Jul 24, 2025
c522186
fix: api test and telemetry test
grantdfoster Jul 24, 2025
a4a0451
fix: update removed vars
grantdfoster Jul 24, 2025
5abfe13
chore: fix simulate command
grantdfoster Jul 24, 2025
4cb514c
fix: makefile .env
grantdfoster Jul 24, 2025
5c0827b
fix: makefile updates
grantdfoster Jul 24, 2025
617dcc7
fix: revise comment in twitter test
grantdfoster Jul 24, 2025
506d241
chore: better go idiom with capability exists
grantdfoster Jul 24, 2025
fe82ad0
fix: prefer maps.keys
grantdfoster Jul 24, 2025
49d90b3
fix: cleanup test and job server logging
grantdfoster Jul 24, 2025
6c55f65
fix: correctly mount home/masa
grantdfoster Jul 24, 2025
b1f6520
fix: improve twitter testing
grantdfoster Jul 24, 2025
f6b7a8b
feat: adds getbyid and getprofilebyid to twitter-api type
grantdfoster Jul 24, 2025
109d869
chore: twitter tests done
grantdfoster Jul 24, 2025
22ce9ff
fix: improve detection logic for elevated api keys
grantdfoster Jul 24, 2025
4a1d555
fix: removes duplicate typing
grantdfoster Jul 24, 2025
c86c809
fix: use tee types in detector test
grantdfoster Jul 24, 2025
63381c9
fix: readme order
grantdfoster Jul 25, 2025
ff27b5e
fix: move telemetry to last
grantdfoster Jul 25, 2025
69b6e76
chore: uses teetypes instead of string casting
grantdfoster Jul 25, 2025
1a1901b
fix: jobtype instead of string casting
grantdfoster Jul 25, 2025
9ee119f
fix: safe access and jobtype casting
grantdfoster Jul 25, 2025
35793ef
chore: update gitignore for broader .masa files
grantdfoster Jul 25, 2025
0180cfc
fix: retur []string{}
grantdfoster Jul 25, 2025
dcd030f
chore: skip tests that are stil lin progress
grantdfoster Jul 25, 2025
c948e64
fix: favor errors.new
grantdfoster Jul 25, 2025
7dac955
fix: test
grantdfoster Jul 25, 2025
8f941a9
fix: predict capacity of capabilities
grantdfoster Jul 25, 2025
121c332
fix: favor slice library
grantdfoster Jul 25, 2025
576acf0
fix: detector test
grantdfoster Jul 25, 2025
647e2bf
fix: detector test
grantdfoster Jul 25, 2025
8c602cf
fix: cleanup redundant init
grantdfoster Jul 25, 2025
7243c6c
fix: jobserver
grantdfoster Jul 25, 2025
ab7b9bf
chore: bump to teetypes v1.1.2
grantdfoster Jul 25, 2025
6adcd3d
fix: refactor capabilities into map
grantdfoster Jul 28, 2025
8c3086e
fix: telemetry
grantdfoster Jul 28, 2025
8d76c0a
chore: updates twitter test to use teetypes
grantdfoster Jul 28, 2025
39cc78f
chore: update string literals to use new tee types
grantdfoster Jul 28, 2025
8820358
chore: remove unused function
grantdfoster Jul 28, 2025
9d8ed02
chore: point to tee types feature branch
grantdfoster Jul 29, 2025
de81215
Merge branch 'main' of https://github.com/masa-finance/tee-worker int…
grantdfoster Jul 29, 2025
2ed543a
fix: job server type
grantdfoster Jul 29, 2025
f22c4b1
chore: revert to use function names in non loaded scrapers
grantdfoster Jul 29, 2025
d2eb382
chore: unmarshalling using new job arg validation
grantdfoster Jul 30, 2025
7afa6d3
fix: point to latest tee types
grantdfoster Jul 30, 2025
cab27cf
chore: points to latest tee types branch
grantdfoster Jul 31, 2025
ca0758d
fix: unmarshalling in worker
grantdfoster Jul 31, 2025
b764afd
fix: updated tee types
grantdfoster Jul 31, 2025
422af94
chore: updates to latest tee types
grantdfoster Jul 31, 2025
23898ad
chore: remove legacy args
grantdfoster Jul 31, 2025
7ad74b0
feat: apify client
grantdfoster Jul 31, 2025
fa6e7c3
fix: max followers and following query
grantdfoster Jul 31, 2025
c1df2ac
fix: twitter tests
grantdfoster Jul 31, 2025
4c34313
fix: update to latest types
grantdfoster Jul 31, 2025
d411661
chore: updates twitter tests for unmarshalling errors
grantdfoster Jul 31, 2025
3277270
chore: update readme
grantdfoster Jul 31, 2025
81abafe
fix: web
grantdfoster Jul 31, 2025
013eee6
fix: latest types
grantdfoster Jul 31, 2025
51595b7
fix: web errors
grantdfoster Jul 31, 2025
a468b46
fix: tests
grantdfoster Jul 31, 2025
ae69699
fix: tests
grantdfoster Jul 31, 2025
95add17
fix: api test
grantdfoster Jul 31, 2025
690cce5
fix: adds env var to worker json
grantdfoster Jul 31, 2025
692ff51
chore: moves twitter specific struct to twitter client instead of gen…
grantdfoster Aug 1, 2025
025dace
chore: dedicated scraper functions
grantdfoster Aug 1, 2025
99d00e0
chore: updates to latest tee types
grantdfoster Aug 5, 2025
eb2adf7
fix: test twitter x key
grantdfoster Aug 6, 2025
2856e9e
chore: updates key detection on api side - users/me previously throwi…
grantdfoster Aug 6, 2025
34f84f9
fix: valid call to twitter api
grantdfoster Aug 6, 2025
9c97b9c
fix: adds apify login checking
grantdfoster Aug 6, 2025
0f59314
feat: add one time apify validation and cleanup unused api scraper logic
grantdfoster Aug 6, 2025
31bfd47
chore: simplify function name
grantdfoster Aug 6, 2025
e3c6914
fix: dont allow exposure of creds or keys in unmarshalling
grantdfoster Aug 6, 2025
f9770a1
chore: direct access
grantdfoster Aug 6, 2025
b0870ad
fix: remove unecessary variables
grantdfoster Aug 6, 2025
9abcb4c
fix: variable naming in apify actors
grantdfoster Aug 7, 2025
752f1d0
fix: updated max polls to be constant
grantdfoster Aug 7, 2025
72ee1a2
fix: improved web testing
grantdfoster Aug 7, 2025
89e0f90
fix: use functional options pattern in apfiy client
grantdfoster Aug 7, 2025
10cfea4
fix: constants for apify job statuses
grantdfoster Aug 7, 2025
c3a740a
chore: updates to switch statement
grantdfoster Aug 7, 2025
c30ac5d
chore: latest tee-types for ci testing
grantdfoster Aug 7, 2025
f61214d
chore: updates egover to latest to support tee-types requirement
grantdfoster Aug 7, 2025
8fa5f00
chore: latest tee types
grantdfoster Aug 7, 2025
5f2ee48
chore: clean up readme with new job types
grantdfoster Aug 7, 2025
9b9529b
chore: updates mod
grantdfoster Aug 7, 2025
7a9e6ac
chore: tee types to 1.1.5
grantdfoster Aug 11, 2025
108e021
fix: add capabilties in the twitter jobs
grantdfoster Aug 11, 2025
4ee391f
fix: add job server job type
grantdfoster Aug 11, 2025
772f27f
fix: removes uncessesary json tags
grantdfoster Aug 11, 2025
c75541a
chore: simplifies apify client
grantdfoster Aug 11, 2025
841c952
fix: pagination logic on twitter apify worker
grantdfoster Aug 12, 2025
179a21a
fix: use utils.max
grantdfoster Aug 12, 2025
b9fbe76
fix: update tee types and expose video url
grantdfoster Aug 12, 2025
eb08c74
chore: add fixme comment
grantdfoster Aug 12, 2025
31874e6
fix: removes errors when unmarshalling ends
grantdfoster Aug 12, 2025
4607beb
chore: removes error counting
grantdfoster Aug 12, 2025
9a4a064
fix: remove total in apify client
grantdfoster Aug 12, 2025
1a8c8b0
fix: point to the right tee types
grantdfoster Aug 12, 2025
a9e082f
fix: tiktok error test
grantdfoster Aug 12, 2025
bb74d71
chore: bumps tee types to 1.1.6
grantdfoster Aug 12, 2025
67358b3
Merge branch 'main' into feat--apify-get-followers
grantdfoster Aug 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG egover=1.6.0
ARG egover=1.7.2
ARG baseimage=ghcr.io/edgelesssys/ego-deploy:v${egover}
ARG VERSION

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,8 @@ test-jobs: docker-build-test
test-twitter: docker-build-test
@docker run --user root $(ENV_FILE_ARG) -v $(PWD)/.masa:/home/masa -v $(PWD)/coverage:/app/coverage --rm --workdir /app -e DATA_DIR=/home/masa $(TEST_IMAGE) go test -v ./internal/jobs/twitter_test.go ./internal/jobs/jobs_suite_test.go

test-web: docker-build-test
@docker run --user root $(ENV_FILE_ARG) -v $(PWD)/.masa:/home/masa -v $(PWD)/coverage:/app/coverage --rm --workdir /app -e DATA_DIR=/home/masa $(TEST_IMAGE) go test -v ./internal/jobs/webscraper_test.go ./internal/jobs/jobs_suite_test.go

test-telemetry: docker-build-test
@docker run --user root $(ENV_FILE_ARG) -v $(PWD)/.masa:/home/masa -v $(PWD)/coverage:/app/coverage --rm --workdir /app -e DATA_DIR=/home/masa $(TEST_IMAGE) go test -v ./internal/jobs/telemetry_test.go ./internal/jobs/jobs_suite_test.go
99 changes: 73 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The tee-worker requires various environment variables for operation. These shoul
- `TWITTER_SKIP_LOGIN_VERIFICATION`: Set to `true` to skip Twitter's login verification step. This can help avoid rate limiting issues with Twitter's verify_credentials API endpoint when running multiple workers or processing large volumes of requests.
- `TIKTOK_DEFAULT_LANGUAGE`: Default language for TikTok transcriptions (default: `eng-US`).
- `TIKTOK_API_USER_AGENT`: User-Agent header for TikTok API requests (default: standard mobile browser user agent).
- `APIFY_API_KEY`: API key for Apify Twitter scraping services. Required for `twitter-apify` job type and enables enhanced follower/following data collection.
- `LISTEN_ADDRESS`: The address the service listens on (default: `:8080`).
- `RESULT_CACHE_MAX_SIZE`: Maximum number of job results to keep in the result cache (default: `1000`).
- `RESULT_CACHE_MAX_AGE_SECONDS`: Maximum age (in seconds) to keep a result in the cache (default: `600`).
Expand All @@ -72,11 +73,11 @@ The worker automatically detects and exposes capabilities based on available con
**Core Services (Always Available):**

1. **`web`** - Web scraping services
- **Sub-capabilities**: `["web-scraper"]`
- **Sub-capabilities**: `["scraper"]`
- **Requirements**: None (always available)

2. **`tiktok`** - TikTok video processing
- **Sub-capabilities**: `["tiktok-transcription"]`
- **Sub-capabilities**: `["transcription"]`
- **Requirements**: None (always available)

**Twitter Services (Configuration-Dependent):**
Expand All @@ -90,12 +91,17 @@ The worker automatically detects and exposes capabilities based on available con
- **Requirements**: `TWITTER_API_KEYS` environment variable

5. **`twitter`** - General Twitter scraping (uses best available auth)
- **Sub-capabilities**: Dynamic based on available authentication (same as credential or API depending on what's configured)
- **Requirements**: Either `TWITTER_ACCOUNTS` or `TWITTER_API_KEYS`
- **Sub-capabilities**: Dynamic based on available authentication (combines capabilities from credential, API, and Apify depending on what's configured)
- **Requirements**: Either `TWITTER_ACCOUNTS`, `TWITTER_API_KEYS`, or `APIFY_API_KEY`
- **Priority**: For follower/following operations: Apify > Credentials. For search operations: Credentials > API.

6. **`twitter-apify`** - Twitter scraping using Apify's API (requires `APIFY_API_KEY`)
- **Sub-capabilities**: `["getfollowers", "getfollowing"]`
- **Requirements**: `APIFY_API_KEY` environment variable

**Stats Service (Always Available):**

6. **`telemetry`** - Worker monitoring and stats
7. **`telemetry`** - Worker monitoring and stats
- **Sub-capabilities**: `["telemetry"]`
- **Requirements**: None (always available)

Expand Down Expand Up @@ -142,7 +148,7 @@ curl -s localhost:8080/job/result \

All job types follow the same API flow above. Here are the available job types and their specific parameters:

#### `web-scraper`
#### `web`
Scrapes content from web pages.

**Parameters:**
Expand All @@ -151,8 +157,9 @@ Scrapes content from web pages.

```json
{
"type": "web-scraper",
"type": "web",
"arguments": {
"type": "scraper",
"url": "https://www.google.com",
"depth": 1
}
Expand Down Expand Up @@ -185,8 +192,9 @@ Transcribes TikTok videos to text.

```json
{
"type": "tiktok-transcription",
"type": "tiktok",
"arguments": {
"type": "transcription",
"video_url": "https://www.tiktok.com/@coachty23/video/7502100651397172526",
"language": "eng-US"
}
Expand All @@ -195,10 +203,11 @@ Transcribes TikTok videos to text.

#### Twitter Job Types

Twitter scraping is available through three job types:
- `twitter-scraper`: Uses best available auth method (credential or API)
- `twitter-credential-scraper`: Forces credential-based scraping (requires `TWITTER_ACCOUNTS`)
- `twitter-api-scraper`: Forces API-based scraping (requires `TWITTER_API_KEYS`)
Twitter scraping is available through four job types:
- `twitter`: Uses best available auth method (credential, API, or Apify)
- `twitter-credential`: Forces credential-based scraping (requires `TWITTER_ACCOUNTS`)
- `twitter-api`: Forces API-based scraping (requires `TWITTER_API_KEYS`)
- `twitter-apify`: Forces Apify-based scraping (requires `APIFY_API_KEY`)

**Common Parameters:**
- `type` (string, required): The operation type (see sub-capabilities below)
Expand All @@ -211,7 +220,7 @@ Twitter scraping is available through three job types:
**`searchbyquery`** - Search tweets using Twitter query syntax
```json
{
"type": "twitter-scraper",
"type": "twitter",
"arguments": {
"type": "searchbyquery",
"query": "climate change",
Expand All @@ -223,7 +232,7 @@ Twitter scraping is available through three job types:
**`searchbyfullarchive`** - Search full tweet archive (requires elevated API key for API-based scraping)
```json
{
"type": "twitter-api-scraper",
"type": "twitter-api",
"arguments": {
"type": "searchbyfullarchive",
"query": "NASA",
Expand All @@ -235,7 +244,7 @@ Twitter scraping is available through three job types:
**`getbyid`** - Get specific tweet by ID
```json
{
"type": "twitter-scraper",
"type": "twitter",
"arguments": {
"type": "getbyid",
"query": "1881258110712492142"
Expand All @@ -246,7 +255,7 @@ Twitter scraping is available through three job types:
**`getreplies`** - Get replies to a specific tweet
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "getreplies",
"query": "1234567890",
Expand All @@ -258,7 +267,7 @@ Twitter scraping is available through three job types:
**`getretweeters`** - Get users who retweeted a specific tweet
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "getretweeters",
"query": "1234567890",
Expand All @@ -272,7 +281,7 @@ Twitter scraping is available through three job types:
**`gettweets`** - Get tweets from a user's timeline
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "gettweets",
"query": "NASA",
Expand All @@ -284,7 +293,7 @@ Twitter scraping is available through three job types:
**`getmedia`** - Get media (photos/videos) from a user
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "getmedia",
"query": "NASA",
Expand All @@ -296,7 +305,7 @@ Twitter scraping is available through three job types:
**`gethometweets`** - Get authenticated user's home timeline (credential-based only)
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "gethometweets",
"max_results": 30
Expand All @@ -307,7 +316,7 @@ Twitter scraping is available through three job types:
**`getforyoutweets`** - Get "For You" timeline (credential-based only)
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "getforyoutweets",
"max_results": 25
Expand All @@ -320,7 +329,7 @@ Twitter scraping is available through three job types:
**`searchbyprofile`** - Get user profile information
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "searchbyprofile",
"query": "NASA_Marshall"
Expand All @@ -331,7 +340,7 @@ Twitter scraping is available through three job types:
**`getprofilebyid`** - Get user profile by user ID
```json
{
"type": "twitter-scraper",
"type": "twitter",
"arguments": {
"type": "getprofilebyid",
"query": "44196397"
Expand All @@ -342,7 +351,7 @@ Twitter scraping is available through three job types:
**`getfollowers`** - Get followers of a profile
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "getfollowers",
"query": "NASA",
Expand All @@ -351,10 +360,23 @@ Twitter scraping is available through three job types:
}
```

**`getfollowers`** (using Apify for enhanced data) - Get followers with detailed profile information
```json
{
"type": "twitter-apify",
"arguments": {
"type": "getfollowers",
"query": "NASA",
"max_results": 100,
"next_cursor": "optional_pagination_cursor"
}
}
```

**`getfollowing`** - Get users that a profile is following
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "getfollowing",
"query": "NASA",
Expand All @@ -363,18 +385,43 @@ Twitter scraping is available through three job types:
}
```

**`getfollowing`** (using Apify for enhanced data) - Get following with detailed profile information
```json
{
"type": "twitter-apify",
"arguments": {
"type": "getfollowing",
"query": "NASA",
"max_results": 100,
"next_cursor": "optional_pagination_cursor"
}
}
```

##### Other Operations

**`gettrends`** - Get trending topics (no query required)
```json
{
"type": "twitter-credential-scraper",
"type": "twitter-credential",
"arguments": {
"type": "gettrends"
}
}
```

##### Return Types

**Enhanced Profile Data with Apify**: When using `twitter-apify` for `getfollowers` or `getfollowing` operations, the response returns `ProfileResultApify` objects which include comprehensive profile information such as:
- Basic profile data (ID, name, screen name, location, description)
- Detailed follower/following counts and engagement metrics
- Profile appearance settings and colors
- Account verification and security status
- Privacy and interaction settings
- Business account information when available

This enhanced data provides richer insights compared to standard credential or API-based profile results.

### Health Check Endpoints

The service provides health check endpoints:
Expand Down
22 changes: 22 additions & 0 deletions api/types/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,25 @@ func (jc JobConfiguration) GetBool(key string, def bool) bool {
}
return def
}

// TwitterScraperConfig represents the configuration needed for Twitter scraping
// This is defined here to avoid circular imports between api/types and internal/jobs
type TwitterScraperConfig struct {
Accounts []string
ApiKeys []string
ApifyApiKey string
DataDir string
SkipLoginVerification bool
}

// GetTwitterConfig constructs a TwitterScraperConfig directly from the JobConfiguration
// This eliminates the need for JSON marshaling/unmarshaling
func (jc JobConfiguration) GetTwitterConfig() TwitterScraperConfig {
return TwitterScraperConfig{
Accounts: jc.GetStringSlice("twitter_accounts", []string{}),
ApiKeys: jc.GetStringSlice("twitter_api_keys", []string{}),
ApifyApiKey: jc.GetString("apify_api_key", ""),
DataDir: jc.GetString("data_dir", ""),
SkipLoginVerification: jc.GetBool("skip_login_verification", false),
}
}
9 changes: 9 additions & 0 deletions cmd/tee-worker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ func readConfig() types.JobConfiguration {
jc["twitter_api_keys"] = []string{}
}

// Apify API key loading
apifyApiKey := os.Getenv("APIFY_API_KEY")
if apifyApiKey != "" {
logrus.Info("Apify API key found")
jc["apify_api_key"] = apifyApiKey
} else {
jc["apify_api_key"] = ""
}

tikTokLang := os.Getenv("TIKTOK_DEFAULT_LANGUAGE")
if tikTokLang == "" {
tikTokLang = "eng-US"
Expand Down
Loading
Loading