diff options
author | sstvinc2 <sstvinc2@gmail.com> | 2017-02-12 21:53:58 -0600 |
---|---|---|
committer | sstvinc2 <sstvinc2@gmail.com> | 2017-02-12 21:53:58 -0600 |
commit | 0fb8417031cb025d6c609b1aefd5964553767b90 (patch) | |
tree | 8d9b1779aa97db936250477b6fceb166b59af970 /unbiasedFunctions.py | |
parent | 9e4ab3d644929d467e1f3de6f456508d03d4db15 (diff) |
Obfuscated h2 URLs
See prior commit for description
Diffstat (limited to 'unbiasedFunctions.py')
-rw-r--r-- | unbiasedFunctions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unbiasedFunctions.py b/unbiasedFunctions.py index acce6a5..a67f800 100644 --- a/unbiasedFunctions.py +++ b/unbiasedFunctions.py @@ -165,7 +165,10 @@ def buildOutput(newsSourceArr): source=newsSourceArr[h2RandomSources[i]]
randomArticle=random.sample(range(len(source.h2Arr)), 1)[0]
article=source.h2Arr[randomArticle]
- template=template.replace('xxURL2-'+str(i+1)+'xx', article.url)
+ #template=template.replace('xxURL2-'+str(i+1)+'xx', article.url)
+ r=open('/var/www/html/redirects/h2-'+str(i+1)+'.html', 'w')
+ r.write('<html><head><script type="text/javascript">window.location="'+article.url+'"</script></head></html>')
+ r.close()
template=template.replace('xxTitle2-'+str(i+1)+'xx', article.title)
template=template.replace('xxImg2-'+str(i+1)+'xx', article.img)
|