File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change
1
+ gcsRes.json
2
+ __pycache__ /config_cse.cpython-38.pyc
3
+ __pycache__ /google_custom_search.cpython-38.pyc
Original file line number Diff line number Diff line change
1
+ def varconf ():
2
+ GCS_KEY = '123456789012345678901234567890123456789' # Google Custom Search API key
3
+ GCS_CX = '123456789012345678901234567890123' # search engine
4
+ return GCS_KEY , GCS_CX
Original file line number Diff line number Diff line change 1
1
import os
2
2
import urllib .request
3
3
import json
4
+ import config_cse
5
+ GCS_KEY , GCS_CX = config_cse .varconf ()
4
6
5
7
path = os .path .dirname (__file__ )+ '/'
6
- #req = 'my%20little%20pony' # Search request
7
- GCS_KEY = 'xxx' # Google Custom Search API key
8
- GCS_CX = 'zzz' # search engine
9
- gcsMaxResults = 30 # should be < 100 and (%10 == 0)
8
+ gcsMaxResults = 30 # should be < 100 and (%10 == 0)
10
9
filename = 'gcsRes.json'
11
10
12
11
def create_url (gcs_req , start = 1 ):
Original file line number Diff line number Diff line change 2
2
import sys
3
3
import json
4
4
sys .path .append (os .path .dirname (__file__ )+ '/..' )
5
- from ws_snd import google_custom_search as gcs
5
+ import google_custom_search as gcs
6
6
7
7
links = []
8
8
path = os .path .dirname (__file__ )+ '/'
You can’t perform that action at this time.
0 commit comments