Skip to content
Snippets Groups Projects
build.py 474 B
Newer Older
#!/usr/bin/python
import os
import sys
import requests

os.system('hugo --enableGitInfo --cleanDestinationDir')

exit = 0
url = 'https://validator.w3.org/feed/check.cgi'
payload = {'url': 'https://briarproject.org/index.xml'}

r = requests.get(url, params=payload)

if "This is a valid Atom 1.0 feed" not in r.content:
  print "ATOM feed is not valid."
  exit = 1
else:
  print "-- This is a valid Atom 1.0 feed -- %s" % payload.get('url')

#print r.content

sys.exit(exit)