| Line 110... |
Line 110... |
| 110 |
google_url_regex = re.compile("((https?):((//))+([\w\d:#@%/;$()~_?\+-=\\\.&])*" + FIND_DOMAIN + "+([\w\d:#@%/;$()~_?\+-=\\\.&])*)")
|
110 |
google_url_regex = re.compile("((https?):((//))+([\w\d:#@%/;$()~_?\+-=\\\.&])*" + FIND_DOMAIN + "+([\w\d:#@%/;$()~_?\+-=\\\.&])*)")
|
| 111 |
google_url_regex_result = google_url_regex.match(this_url)
|
111 |
google_url_regex_result = google_url_regex.match(this_url)
|
| 112 |
if google_url_regex_result:
|
112 |
if google_url_regex_result:
|
| 113 |
result = counter
|
113 |
result = counter
|
| 114 |
break
|
114 |
break
|
| - |
|
115 |
|
| - |
|
116 |
if result == 0:
|
| - |
|
117 |
f = open('/var/log/rankdumper/rankdumper-' + datetime.datetime.now().strftime("%Y-%m-%d") + '.log', 'a')
|
| - |
|
118 |
f.write(html + "\n")
|
| 115 |
|
119 |
|
| 116 |
return result, this_url
|
120 |
return result, this_url
|
| 117 |
|
121 |
|
| 118 |
def find_google_position(self, search_string):
|
122 |
def find_google_position(self, search_string):
|
| 119 |
ENGINE_URL = 'http://www.google' + LOCALE + '/search?q=' + search_string.replace(' ', '+') + '&num=' + str(NUM_PER_PAGE)
|
123 |
ENGINE_URL = 'http://www.google' + LOCALE + '/search?q=' + search_string.replace(' ', '+') + '&num=' + str(NUM_PER_PAGE)
|