Skip to content

Commit

Permalink
update headers
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Jul 27, 2024
1 parent 11a0619 commit ac33cb5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/cron_reddit_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ def get_updated_post_data(permalink):
# Create a dictionary of existing posts for faster lookup and update
existing_posts = {post['id']: post for post in existing_data}

headers = {
'User-Agent': 'python:myapp:v1.0 (by /u/mrahimi114313)'
}

# Send a GET request to the API
response = requests.get(url, headers={'User-agent': 'Mozilla/5.0'})
response = requests.get(url, headers=headers)

counter = 0
# Check if the request was successful
Expand Down

0 comments on commit ac33cb5

Please sign in to comment.