API代理式集成
– If you already use proxies, you'll find this easier
– 100% success rate plus accurate data
– Data sources: direct (full URL provided by client)
– Requires an open connection in order to send the acquired results.
– Single query – no batches
– Supports any SERP keyword
– Parsing: raw HTML, and in some cases – structured JSON.
HTTP请求地址:scrape.smartproxy.com:60000
集成示例:
curl -k -x scrape.smartproxy.com:60000 -U username:password -H "X-Smartproxy-Device-Type: desktop_firefox" -H "X-Smartproxy-Geo: California,United States" "https://www.google.com/search?q=world"
<?php
$ch = curl_init();
$username = 'username';
$password = 'password';
$options = [
CURLOPT_URL => 'https://www.google.com/search?q=world',
CURLOPT_PROXY => 'scrape.smartproxy.com:60000',
CURLOPT_PROXYUSERPWD => sprintf('%s:%s', $username, $password),
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
];
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo sprintf('Error %s', curl_error($ch));
} else {
echo $result;
}
curl_close ($ch);
?>
import requests
username = 'username'
password = 'password'
proxy = 'http://{}:{}@scrape.smartproxy.com:60000'.format(
username, password)
headers = {'X-Smartproxy-Device-Type': 'desktop_chrome',
'X-Smartproxy-Geo': 'New York,New York,United States',
'X-Smartproxy-Parse': '1',
}
response = requests.request(
'GET',
'https://www.google.com/search?q=world',
proxies={'http': proxy, 'https': proxy},
headers=headers,
verify=False
)
print(response.text)
Updated over 1 year ago