Skip to content

Commit dd532bb

Browse files
Tony QiuTony Qiu
authored andcommitted
Merge branch 'main' of https://github.com/ericahan22/Wat2Do
2 parents daa3b5c + aa68d8c commit dd532bb

File tree

5 files changed

+4
-20
lines changed

5 files changed

+4
-20
lines changed

.github/workflows/update-events-data.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,3 @@ jobs:
7777
backend/scraping/logs/scraping.log
7878
backend/scraping/apify_raw_results.json
7979
if-no-files-found: 'ignore'
80-
81-
- name: Generate static data file
82-
id: generate_static
83-
working-directory: backend/scraping
84-
run: python generate_static_data.py
85-
86-
- name: Commit and push changes
87-
if: steps.generate_static.outcome == 'success'
88-
run: |
89-
git config --global user.name 'github-actions[bot]'
90-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
91-
git add frontend/src/data/staticData.ts frontend/public/rss.xml
92-
git commit -m "chore: update static data from DB" || echo "No changes to commit"
93-
git pull --rebase && git push --force

backend/scraping/instagram_feed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def get_apify_input(username=None):
309309

310310
if username:
311311
usernames = [username]
312-
logger.info(f"Scraping @{username}")
312+
logger.info(f"Scraping @{username}...")
313313
else:
314314
usernames = []
315315
for url in FULL_URLS:

backend/scraping/logging_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ def setup_logging():
1919
logging.getLogger("botocore").setLevel(logging.WARNING)
2020
logging.getLogger("httpcore").setLevel(logging.WARNING)
2121
logging.getLogger("openai").setLevel(logging.WARNING)
22-
logging.getLogger("PIL").setLevel(logging.INFO)
22+
logging.getLogger("PIL").setLevel(logging.WARNING)
2323
logging.getLogger("apify_client").setLevel(logging.WARNING)
2424

25-
fmt = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
25+
fmt = "%(asctime)s - %(levelname)s - %(message)s"
2626
handlers = [
2727
logging.StreamHandler(sys.stdout),
2828
logging.FileHandler(LOG_FILE, encoding="utf-8"),

backend/scraping/process_single_user.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def main():
2222
logger.error("No TARGET_USERNAME provided.")
2323
sys.exit(1)
2424

25-
logger.info(f"Scraping @{target_user}...")
2625
posts_data = run_apify_scraper(username=target_user)
2726
if not posts_data:
2827
logger.warning("No posts found.")
@@ -33,7 +32,6 @@ def main():
3332

3433
try:
3534
asyncio.run(process_scraped_posts(posts_data, cutoff_date))
36-
logger.info("Done.")
3735
except Exception as e:
3836
logger.error(f"Error during processing: {e}")
3937
sys.exit(1)

backend/services/openai_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def extract_events_from_caption(
189189
* If both "non-member" / "general admission" and "member" prices appear, use the non-member/general admission numeric price.
190190
* If only member prices are given and non-member price is absent, use the listed member price.
191191
* If multiple ticket tiers are listed (e.g., "early bird" and "regular"), use the lowest applicable price (e.g., early bird price).
192-
* Parse dollar amounts and return a numeric value (e.g., "$15" -> 15.0). Use null for free events or when no price is mentioned.
192+
* Parse dollar amounts and return a numeric value (e.g., "$15" -> 15.0). Use 0 for free events and null for when price is not mentioned.
193193
- For food: Only set this field if the post says food or drinks will be served, provided, or available for attendees. If specific food or beverage items are mentioned (e.g., "pizza", "bubble tea", "snacks"), list them separated by commas and capitalize ONLY the first item. If the post explicitly says food is provided but does not specify what kind (e.g., "free food", "food provided", "there will be food"), output "Yes!" (exactly). If there is no mention of food or drinks, output an empty string "".
194194
- For registration: only set to true if there is a clear instruction to register, RSVP, or sign up, otherwise set to false.
195195
- For description: Make this the caption text word-for-word. If there is no caption text, use the image text.

0 commit comments

Comments
 (0)