Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import urllib
- def citriq(params):
- errors = "\n".join([
- "Le paramètre {} est obligatoire".format(param)
- for param in ("uid", "isbn") if param not in params
- ])
- if not errors:
- return '<script type="text/javascript" src="http://citriq.net/w/crawl?{}"><script>'.format(urllib.urlencode(params))
- elif params.get("debug", 0) == 1 and errors:
- print "Erreur Citriq : {}".format(errors);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement