flask
: for our api applicationbs4
: for scrappingrequests
: for authenticating with linkedinpickle
: for storing the cookijar (maintain the authenticated session)
production
serverless
: [aws-lambda, aws-api-gateway, cloudfront, s3-bucket] for running the applications3-bucket
: for storing the cookiecloudflare,aws certificate manager
: for availing custom domainboto3
: for s3 integration (write/read cookie)
-
-
requesting data : you can request any one of the data below at a time
data : firstName/lastName/summary/headline
Request sample
Resposne sample
-
-
curl request format
curl -X POST -d 'data=<requesting data>&url=https://www.linkedin.com/in/<user>/' https://scrap-api.ajmalaju.com/api/v1/linkedin/
data : firstName/lastName/summary/headline eg:-
curl -X POST -d 'data=headline&url=https://www.linkedin.com/in/ajmalaju/' https://scrap-api.ajmalaju.com/api/v1/linkedin/
Resposne sample : curl
-
-
git clone https://github.com/Ajuajmal/scrap-flask-api.git
- change dir
cd scrap-flask-api/local
- change dir
-
virtualenv -p python3 env
- activate virtualenv
source env/bin/activate
- activate virtualenv
-
pip3 install -r requirements.txt
-
cp .env.local .env
-
edit and add the following in .env file
nano .env
-
eg : -
-
-
LINKEDIN_MAIL = '[email protected]'
LINKEDIN_PASSWORD = 'password12345'
- save
.env
file byCTRL+O
and exit the editorCTRL+X
if your env Variables not picked automatically(during runtime), then please try this guide https://help.pythonanywhere.com/pages/environment-variables-for-web-apps/
-
flask run