Skip to content

Instantly share code, notes, and snippets.

@nyosegawa
Created June 3, 2024 03:29
Show Gist options
  • Save nyosegawa/b5f634ffe422a118c08f0b05bc3fa077 to your computer and use it in GitHub Desktop.
Save nyosegawa/b5f634ffe422a118c08f0b05bc3fa077 to your computer and use it in GitHub Desktop.
arXiv title search
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")
@nyosegawa
Copy link
Author

The gist was created with the purpose of modifying the implementation from the following blog:

https://blog.shikoan.com/arxiv_rag/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment