<jupyter_start><jupyter_text>Play with the apiShow that it is possible to retrieve data from Arxiv<jupyter_code># https://arxiv.org/help/api/index
# https://arxiv.org/help/api/user-manual

import xml.etree.ElementTree as ET
from urllib.request import urlopen

# http://export.arxiv.org/api/query?search_query=all:electron&start=0&max_results=1

base_url = 'http://export.arxiv.org/api/query?search_query='
categroy = "stat.ML"
subject = "electron"
start = 1
max_results = 0

url = base_url + 'all:' + subject + '&start=' + str(start) + '&max_results=' + str(max_results)
data = urlopen(url).read()
parsed = ET.fromstring(data)

#print(parsed)

#for child in parsed:
#    print(child.tag)
#    print(child.attrib)

#print(parsed.findall('{http://www.w3.org/2005/Atom}entry'))


for e in parsed.findall('{http://www.w3.org/2005/Atom}entry'):
    for i in e.findall('{http://www.w3.org/2005/Atom}author'):
        print(i[0].text)


#print(parsed[0:])

#for e in parsed:
#    print(e)

for e in parsed[7:]:
    for s in e:
        if s.text == None:
            print(s)
        else:
            print(s.text)
            
#print(e[5][0].text)
#print(e[5][0].text)

#print(parsed.getroot())
#print(parsed.getElementsByTagName('authors'))
#print(itemlist[0].attributes['name'].value)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17557251908396945, 'fraction_numerical': 0.020610687022900764, 'mean_word_length': 3.9847908745247147, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 3, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '276435', 'license': 'MIT', 'n_tokens_mistral': 523, 'n_tokens_neox': 501, 'n_words': 88, 'path': 'notebooks/WEM - arXiv API testings and project lore.ipynb', 'repo_name': 'Penguinazor/mse.wem.project', 'size': '1310'}