source/io/web_scraper.py
def generate_header(language=""):
    """Creates the HTTP header which is sent when requesting citations"""
    if_from_web_text = "from web"
    if not __metadata__.__IF_WEB__:
        if_from_web_text = "from desktop" #If it's locally launched, mention that
    
    header = {
        'User-Agent': 'wiki_verify/'+__metadata__.__VERSION__+"(https://verify.toolforge.org/) "+if_from_web_text,
        'Accept-Language': "en-US,en;q=0.5",
        'referer': "https://"+language+".wikipedia.org/",
        'UPGRADE-INSECURE-REQUESTS': "1",
        'Accept-Encoding': "deflate, gzip;q=1.0, *;q=0.5", #Automatically decompressed by requests
        'Save-Data': "on",
        }
    return header
Creates the HTTP header which is sent when requesting citations
Creates the HTTP header which is sent when requesting citations
Creates the HTTP header which is sent when requesting citations
def generate_header(language=""):
    if_from_web_text = "from web"
    if not __metadata__.__IF_WEB__:
        if_from_web_text = "from desktop" 
    header = {
        'User-Agent': 'wiki_verify/'+__metadata__.__VERSION__+"(https://verify.toolforge.org/) "+if_from_web_text,
        'Accept-Language': "en-US,en;q=0.5",
        'referer': "https://"+language+".wikipedia.org/",
        'UPGRADE-INSECURE-REQUESTS': "1",
        'Accept-Encoding': "deflate, gzip;q=1.0, *;q=0.5", 
        'Save-Data': "on",
        }
    return header
def generate_header ( language = "" ) : if_from_web_text = "from web" if not __metadata__ . __IF_WEB__ : if_from_web_text = "from desktop" header = { 'User-Agent' : 'wiki_verify/' + __metadata__ . __VERSION__ + "(https://verify.toolforge.org/) " + if_from_web_text , 'Accept-Language' : "en-US,en;q=0.5" , 'referer' : "https://" + language + ".wikipedia.org/" , 'UPGRADE-INSECURE-REQUESTS' : "1" , 'Accept-Encoding' : "deflate, gzip;q=1.0, *;q=0.5" , 'Save-Data' : "on" , } return header
Creates the HTTP header which is sent when requesting citations
Creates the HTTP header which is sent when requesting citations
"""Creates the HTTP header which is sent when requesting citations""" #If it's locally launched, mention that #Automatically decompressed by requests
language