File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import sys
1111import textwrap
1212import traceback
13+ import urllib .parse
1314import random
1415# Third-party
1516import requests
@@ -96,12 +97,12 @@ def write_data(args, tool_data):
9697
9798
9899def query_wikipedia (args , session ):
99- LOGGER .info ("Fetching Wikipedia rightsinfo + article count " )
100+ LOGGER .info ("Beginning to fetch results from Wikipedia API " )
100101 tool_data = []
101102
102103 try :
103104 if args .dev :
104- license_name = "Creative Commons (DEV) "
105+ license_name = "Creative Commons Attribution-ShareAlike 4.0 "
105106 article_count = random .randint (100000 , 5000000 )
106107 else :
107108 params = {
@@ -118,7 +119,6 @@ def query_wikipedia(args, session):
118119 rights = data ["query" ]["rightsinfo" ]
119120
120121 license_name = rights .get ("text" , "" )
121- license_url = rights .get ("url" , "" )
122122 article_count = stats .get ("articles" , 0 )
123123
124124 tool_data .append ({
You can’t perform that action at this time.
0 commit comments