Created
June 3, 2024 03:29
-
-
Save nyosegawa/b5f634ffe422a118c08f0b05bc3fa077 to your computer and use it in GitHub Desktop.
arXiv title search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arxiv | |
# ref: https://note.nkmk.me/python-arxiv-api-download-rss/ | |
def query_arxiv(search_word): | |
arxiv_client = arxiv.Client() | |
keyword_list = search_word.split() | |
search_query = ' AND '.join([f'ti:"{keyword}"' for keyword in keyword_list]) | |
response = arxiv_client.results( | |
search=arxiv.Search( | |
query=search_query, | |
max_results=100, | |
) | |
) | |
cnt = 0 | |
for item in response: | |
print(item.title) | |
cnt += 1 | |
print(f"Found {cnt} papars") | |
if __name__ == "__main__": | |
query_arxiv("LoRA image generation") |
The gist was created with the purpose of modifying the implementation from the following blog:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result: