FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
My-Python-Code/Google-description-date-Scrape.py at main · Hamisheonline/My-Python-Code · GitHub
Hamisheonline
/
My-Python-Code
Public
forked from
aminzayer/My-Python-Code
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
My-Python-Code
/
Google-description-date-Scrape.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (26 loc) · 917 Bytes
Breadcrumbs
My-Python-Code
/
Google-description-date-Scrape.py
Copy path
File metadata and controls
32 lines (26 loc) · 917 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
20
21
22
23
24
25
26
27
28
29
30
31
32
# this python file all of my function for utiliy propose
import
json
import
re
from
bs4
import
BeautifulSoup
import
requests
from
datetime
import
datetime
from
htmldate
import
find_date
from
os
.
path
import
exists
# Use Scale SERP to Get Google Search Results & save to file
def
Get_Google_Results
(
query
,
num
,
contry
,
language
,
domain
,
refresh
=
False
):
if
(
refresh
==
True
):
# set up the request parameters
params
=
{
'api_key'
:
'your api key here'
,
'q'
:
query
,
'num'
:
num
,
'gl'
:
contry
,
'hl'
:
language
,
'google_domain'
:
domain
}
# make the http GET request to Scale SERP
api_result
=
requests
.
get
(
'https://api.scaleserp.com/search'
,
params
)
# convert to the JSON response from Scale SERP
jsonformat
=
json
.
dumps
(
api_result
.
json
())
#print(jsonformat)
return
jsonformat
Back
|
FazBrowse Home
|
New Git URL