Skip to content

Commit

Permalink
=
Browse files Browse the repository at this point in the history
  • Loading branch information
panpap committed Dec 1, 2016
1 parent 3cfe3ab commit 75cdacc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"beacons": false,
"impressions": false,
"advertisements": false,
"userResults": true,
"userResults": false,
"prices": false,
"traceResults": true,
"csyncResults": false,
Expand Down
9 changes: 9 additions & 0 deletions core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,15 @@ def categorizeReq(row,url)
if isAd==true
type3rd="Advertising"
end



puts row['IPport'].to_s+"\t"+row['url'].to_s+"\t"+type3rd.to_s+"\t"+row['dataSz'].to_s+"\t"+row['ua'].to_s if row['IPport']=="14339" or row['IPport']=="12337"





return type3rd,params
end

Expand Down
15 changes: 8 additions & 7 deletions filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,17 @@ def getCategory(urlAll,host,user)
parts=host.split(".")
# FIND TLD AND DOMAIN
domain,tld=Utilities.tokenizeHost(host)
# FILTER USING DISCONNECT

#FIND CATEGORY
cat,domain,tld=externalList(host,@lastPub[user])
if cat!=nil
if @lists.manualCats[host]!=nil
return @lists.manualCats[host]
elsif (@lists.rtbCompanies.any? { |word| url.downcase.include?(word)})
return "Advertising"
elsif cat!=nil # FILTER USING DISCONNECT
return cat
else
# FILTER USING KEYWORDS
# FILTER USING KEYWORDS
if (tld=="ad") # TLD check REMOVE ".ad" TLDs
parts.delete_at(parts.size-1)
s="";t="/";
Expand All @@ -318,10 +323,6 @@ def getCategory(urlAll,host,user)
end
if (@lists.subStrings.any? { |word| url.include?(word)}) and not url.include? (".adc.") and not url.include? ("www.advantageguildford.com") and not url.include? ("curiosidades.batanga.com") and not url.include? ("apknesia.com")
return "Advertising"
elsif (@lists.rtbCompanies.any? { |word| url.downcase.include?(word)})
return "Advertising"
elsif @lists.manualCats[host]!=nil
return @lists.manualCats[host]
end
return nil
end
Expand Down
6 changes: 5 additions & 1 deletion keywordsLists.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ def initialize(external,defs)
"advombat.ru"=>"Analytics","abtasty.com"=>"Analytics","albopa.work" => "Advertising","alicdn.com"=>"Content",
"ani-view.com" => "Advertising", "answerscloud.com"=>"Analytics","apester.com" => "Content","arcpublishing.com" => "Content",
"arecio.work" => "Advertising", "publited.com" => "Advertising", "arkadiumhosted.com"=>"Content","aspnetcdn.com"=>"Content",
"audiencemedia.com"=>"Content","bannerflow.com" => "Advertising","beanstock.com" => "Advertising","bleacherreport.net" => "Content",
"audiencemedia.com"=>"Content","bannerflow.com" => "Advertising","beanstock.com" => "Advertising",
"bleacherreport.net" => "Content", "active-agent.com" => "Advertising", "affec.tv" => "Advertising",
"angsrvr.com" => "Advertising", "bidswitch.net" => "Advertising", "bidswitch.com" => "Advertising", "fidelity-media.com" => "Advertising",
"ibillboard.com" => "Advertising","kavanga.ru" => "Advertising", "hgads.com" => "Advertising", "smartstream.tv" => "Advertising",
"univide.com" => "Advertising","acxiom-online.com" => "Advertising", "dianzicheng.club" => "Advertising",
"beanstock.co" => "Advertising", "hstpnetwork.com" => "Advertising", "beatchucknorris.com" => "Advertising",
"bidr.io" => "Advertising", "bidtellect.com" => "Advertising", "bidtellectual.com" => "Advertising",
"blogsmithmedia.com" => "Content","blueconic.net"=>"Analytics","blueknow.com"=>"Analytics","bnc.lt"=>"Analytics",
Expand Down

0 comments on commit 75cdacc

Please sign in to comment.