You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def search(author_str): resp = requests.get(DBLP_AUTHOR_SEARCH_URL, params={'xauthor':author_str}) #TODO error handling root = etree.fromstring(resp.content) arr_of_authors = [] for urlpt in root.xpath('/authors/author/@urlpt'): resp1 = requests.get(DBLP_PERSON_URL.format(urlpt=urlpt)) xml = resp1.content root1 = etree.fromstring(xml) if root1.xpath('/dblpperson/homonym/text()'): for hom_urlpt in root1.xpath('/dblpperson/homonym/text()'): arr_of_authors.append(Author(hom_urlpt)) else: arr_of_authors.append(Author(urlpt)) return arr_of_authors
I tried to write the code indented here in this comment, but I don't know why it won't happen.
I hope you will be able to understand.
Though this method kills the purpose of loading data lazily, but it still solves the issue.
Some authors share the same name and thus a number is appended to their DBLP profile, e.g., "Thomas Olsson 0001" for https://dblp.uni-trier.de/pers/hd/o/Olsson_0001:Thomas
As far as I understand, the wrapper does not work for such names.
I'd love to see a solution to this issue!
The text was updated successfully, but these errors were encountered: