diff options
author | ssstvinc2 <sstvinc2@gmail.com> | 2017-02-11 19:14:43 -0500 |
---|---|---|
committer | ssstvinc2 <sstvinc2@gmail.com> | 2017-02-11 19:14:43 -0500 |
commit | c233a25ea868496557d1ea211addbf87d388b4ce (patch) | |
tree | 84e561a396c13b434ef216efa0e6e42d795db25b /unbiasedFunctions.py | |
parent | 195ff07f697ffd486619f55320e5f3e8813a8eba (diff) |
Added BBC as source; added stubURL functionality
Diffstat (limited to 'unbiasedFunctions.py')
-rw-r--r-- | unbiasedFunctions.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/unbiasedFunctions.py b/unbiasedFunctions.py index b770b60..2cdae81 100644 --- a/unbiasedFunctions.py +++ b/unbiasedFunctions.py @@ -88,7 +88,10 @@ def extractURLs(content, source): h1=h1.split(delim)[1]
h1=h1.split(source.h1DelEnd)[0]
if '.com' not in h1:
- h1=source.url+h1
+ if source.stubURL!=None:
+ h1=source.stubURL+h1
+ else:
+ h1=source.url+h1
h1s.append(h1)
h2=content
@@ -105,7 +108,10 @@ def extractURLs(content, source): x=x.split(source.h2DelEnd)[0]
h2=h2.split(source.h2DelEnd, 1)[1]
if '.com' not in x:
- x=source.url+x
+ if source.stubURL!=None:
+ x=source.stubURL+x
+ else:
+ x=source.url+x
h2s.append(x)
|