FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lambda-scraper/src/lambda_function.py at main · symplecticmaths/lambda-scraper · GitHub
symplecticmaths
/
lambda-scraper
Public
forked from
teticio/lambda-scraper
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lambda-scraper
/
src
/
lambda_function.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (16 loc) · 687 Bytes
Breadcrumbs
lambda-scraper
/
src
/
lambda_function.py
Copy path
File metadata and controls
19 lines (16 loc) · 687 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from
base64
import
b64encode
from
requests_html
import
HTMLSession
def
lambda_handler
(
event
,
context
):
session
=
HTMLSession
()
response
=
session
.
request
(
method
=
event
.
get
(
'method'
,
'GET'
),
url
=
event
[
'url'
],
headers
=
event
.
get
(
'headers'
,
None
),
data
=
event
.
get
(
'data'
,
None
),
json
=
event
.
get
(
'json'
,
None
),
stream
=
True
)
return
{
'headers'
:
dict
(
response
.
headers
),
'statusCode'
:
response
.
status_code
,
'body'
:
b64encode
(
response
.
raw
.
read
(
decode_content
=
True
)),
'isBase64Encoded'
:
True
}
Back
|
FazBrowse Home
|
New Git URL