Skip to content
Snippets Groups Projects
Commit 3f9a7f9b authored by Harkanwar Singh Waraich's avatar Harkanwar Singh Waraich
Browse files

Updated Variables

parent 4385385c
No related branches found
No related tags found
1 merge request!2Firebase init
......@@ -130,4 +130,5 @@ dmypy.json
firebase_tools/trenddit-db-cred.json
tokens.txt
.DS_Store
\ No newline at end of file
.DS_Store
run.sh
\ No newline at end of file
import praw
from os import environ
# reddit = praw.Reddit(
# client_id="_cYY9dLkaIUy6I-p_yzXgw",
# client_secret="hO6SAqvDBRu7rIyei6C9uE-JscMPtA",
# user_agent="Trenddit/0.0.1",
# )
reddit = praw.Reddit(
client_id=environ.get('Client_id'),
client_secret=environ.get('seceret_id'),
client_id=environ.get('CLIENT_ID'),
client_secret=environ.get('SECRET_ID'),
user_agent="Trenddit/0.0.2",
refresh_token="2350269160941-a5OpOSu7rTd4TTVmIKDAtO2zQPcSag",
password=environ.get('user_id'),
username=environ.get('password'),
refresh_token='2350269160941-tBMkp2mTTMS_UUidLWbSwazOXzP4CA',
username=environ.get('USER_ID'),
password=environ.get('PASSWORD'),
)
print(reddit.read_only)
reddit.read_only = True
......@@ -25,4 +23,7 @@ print(subreddit.display_name)
# Output: redditdev
print(subreddit.title)
# Output: reddit development
print(subreddit.description)
\ No newline at end of file
# print(subreddit.description)
for submission in reddit.subreddit("canada").hot(limit=10):
print(submission.title)
\ No newline at end of file
import requests
from os import environ
# note that CLIENT_ID refers to 'personal use script' and SECRET_TOKEN to 'token'
auth = requests.auth.HTTPBasicAuth('-jZtWxCPaO8z8h_fmhfhhw', 'DEzwCKBY-LjaMKrLCHHdkrGsc-HvCA')
auth = requests.auth.HTTPBasicAuth(environ.get('CLIENT_ID'), environ.get('SECRET_ID'))
print(environ.get('CLIENT_ID'))
# here we pass our login method (password), username, and password
data = {'grant_type': 'password',
'username': environ.get('user_id'),
'password': environ.get('password')}
'username': environ.get('USER_ID'),
'password': environ.get('PASSWORD')}
# setup our header info, which gives reddit a brief description of our app
......
asyncio==3.4.3
CacheControl==0.12.11
cachetools==5.2.0
certifi==2022.9.24
cffi==1.15.1
charset-normalizer==2.1.1
click==8.1.3
cryptography==38.0.3
firebase-admin==6.0.1
Flask==2.2.2
Flask-Cors==3.0.10
gcloud==0.17.0
google-api-core==2.10.2
google-api-python-client==2.65.0
google-auth==2.14.1
google-auth-httplib2==0.1.0
google-cloud-core==2.3.2
google-cloud-firestore==2.7.2
google-cloud-storage==2.6.0
google-crc32c==1.5.0
google-resumable-media==2.4.0
googleapis-common-protos==1.56.4
grpcio==1.50.0
grpcio-status==1.50.0
httplib2==0.21.0
idna==3.4
importlib-metadata==5.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
json2html==1.3.0
jws==0.1.3
MarkupSafe==2.1.1
msgpack==1.0.4
oauth2client==3.0.0
praw==7.6.0
prawcore==2.3.0
proto-plus==1.22.1
protobuf==4.21.9
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pycryptodome==3.4.3
PyJWT==2.6.0
pyparsing==3.0.9
Pyrebase==3.0.27
python-jwt==2.0.1
requests==2.28.1
requests-toolbelt==0.7.0
rsa==4.9
simplejson==3.17.6
six==1.16.0
update-checker==0.18.0
uritemplate==4.1.1
urllib3==1.26.12
websocket-client==1.4.2
Werkzeug==2.2.2
zipp==3.10.0
asyncio
CacheControl
cachetools
certifi
cffi
charset-normalizer
click
cryptography
firebase-admin
Flask
Flask-Cors
gcloud
google-api-core
google-api-python-clint
google-auth
google-auth-httplib2
google-cloud-core
google-cloud-firestore
google-cloud-storage
google-crc32c
google-resumable-media
googleapis-common-protos
grpcio
grpcio-status
httplib2
idna
importlib-metadata
itsdangerous
Jinja2
json2html
jws
MarkupSafe
msgpack
oauth2client
praw
prawcore
proto-plus
protobuf
pyasn1
pyasn1-modules
pycparser
pycryptodome
PyJWT
pyparsing
Pyrebase
python-jwt
requests
requests-toolbelt
rsa
simplejson
six
update-checker
uritemplate
urllib3
websocket-client
Werkzeug
zipp
export CLIENT_ID='7dlaGED5g8Z9nqyuWifKqA'
export SECRET_ID='qLG8_LvLVlix4p8gfjMJ1LOyTOZ8pg'
export USER_ID='Varun@legend'
export PASSWORD='trenddit-dev'
source ./venv/bin/activate
pip install -r requirements.txt
python3 application.py -p 5000
\ No newline at end of file
# python3 application.py -p 500
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment