-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
38 lines (28 loc) · 1.06 KB
/
config.py
File metadata and controls
38 lines (28 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# CONFIGURE HTTP
# What domain are we scraping?
scrape_domain = 'http://www.theorbitalmechanics.com'
# What domain are we posting to?
upload_domain = 'http://localhost:3000/'
# what path are we posting to?
create_path = 'episodes/'
create_url = upload_domain+create_path
# What path are we patching to?
image_path = 'episodes/upload_image/'
audio_path = 'episodes/upload_audio/'
# make it easy
image_url = upload_domain+image_path
audio_url = upload_domain+audio_path
# What headers to use while uploading?
headers = {'user-agent': 'TOM-upload V1.0', 'Accept': 'application/json', 'Content-Type': 'application/json'}
headers_without_content = headers.copy()
headers_without_content.pop('Content-Type')
# How many seconds should we sleep between requests (to avoid throttling)?
sleep_interval = 5
# CONFIGURE LOCAL FILES
# Where to output text? Be sure to initialize this file with {}.
scraped = 'scraped.json'
# Where to store detailed logs?
logs = 'log.txt'
# What folder to store images and audio in?
files = 'files/'
# Be sure to create a file secrets.py that sets bot_token!