python


Python: To find the website of a list of companies


I tried using the below python code to find the websites of the companies. But after trying few times, I face a Service Unavailable error.
I have finished the first level of finding the possible domains of the companies. For example :
CompanyExample [u'http://www.examples.com/', u'https://www.example.com/quote/CGL:SP', u'http://example2.sgx.com/FileOpen/China%20Great%20Land.ashx?App=Prospectus&FileID=3813', u'https://www.example3.com/php/company-profile/SG/en_2036109.html']
from google import search
for link in links:
parsed_uri = urlparse(link)
domain = '{uri.scheme}://{uri.netloc}/'.format(uri=parsed_uri)
for url in search(domain,stop = 4):
print url
Kindly help me on:
Why do I find urllib2.HTTPError: HTTP Error 503: Service Unavailable error suddenly.
Is there any other method(Python requests) to find websites of the list of companies ?
Google APIs usually are rate limited for non-paying users. Going over your limit is probably what causes the 503 responses. According to the API documentation you get 100 free searches per day, after that it's $5 per $1000 queries up to 10000 queries:
Custom Search Engine (free)
For CSE users, the API provides 100 search queries per day for free.
If you need more, you may sign up for billing in the API Console.
Additional requests cost $5 per 1000 queries, up to 10k queries per
day.

Related Links

python code to get values from json data
Math domain error when trying to graph equation of circle with polar coordinates in python
Converting base 6 to decimal and vice versa in Python? [closed]
Labelling Segments in Turtle
How to test that functools.partial produces the expected function object
Django CreateView Auto Login
Dictionary comprehension to build list of lists: referencing the current value for a key during comprehension
Python:Errno 22 Invalid argument
Class initialisation issue python
Python def replace
How get back a proper json that was stored with fileInfo without the escape sequences?
django-admin.py not working properly in powershell
Best way to dynamically show all keys for arrays in Python
Qt5 and QtQuick 2 bindings for Python 2.7
Raw sockets in python3
List of rc keys in matplotlib. Tick label rotations

Categories

HOME
crystal-reports
windows-7
fparsec
agile
docker-swarm
angular2-directives
ruby-on-rails-3
chaiscript
checksum
ll
rebol
quill
goutte
structuremap
shipping
diagram
criteria
dlib
squarespace
datagrip
event-log
uicollectionview
aptana
prestodb
deb
yosys
compare-and-swap
emv
widevine
image-quality
thinking-sphinx
pygooglechart
superscript
protobuf-net
entity-system
swiftcharts
nsurlconnection
service-locator
google-guava-cache
deepstream.io
jquery-multidatespicker
nashorn
datalog
g1gc
tableau-server
sapui
openh264
android-bitmap
emgu
createobject
settimeout
cfeclipse
alter
firepath
multiple-file-upload
asteriskami
spring-repositories
squirrel
asynccallback
aerogear
galaxy
datainputstream
jenkins-scriptler
enyo
eyeql
application-loader
js-cookie
twython
xjc
callstack
google-hadoop
alphablending
livechat
google-admin-audit-api
collabnet
proxies
resource-files
json-patch
mimosa
pyjade
nsmatrix
stagefright
mailcore
transitive-closure-table
crocodoc
returnurl
datarepeater
pstree
icefaces-3
shim
shared-objects
qtembedded
opengl-es-lighting
windows-live-id
search-path
email-spec
requestfactory
hibernate3-maven-plugin
idictionary
graph-layout
swfloader
openwysiwyg
ajaxpro

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App