summaryrefslogtreecommitdiff
path: root/scripts/single_run_test.py
diff options
context:
space:
mode:
authorblackhao <13851610112@163.com>2025-03-30 04:15:12 -0500
committerblackhao <13851610112@163.com>2025-03-30 04:15:12 -0500
commitd5b56b1a018c13f3f55e5808f671210e40d8d5e0 (patch)
tree8cb0b6d6557ce44819a21d6dad3b051d6d4a5bdf /scripts/single_run_test.py
parent2e73e07df97231838e94addac37ac8484fb4d08e (diff)
fuck arxiv api
Diffstat (limited to 'scripts/single_run_test.py')
-rw-r--r--scripts/single_run_test.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/scripts/single_run_test.py b/scripts/single_run_test.py
new file mode 100644
index 0000000..fe52bb4
--- /dev/null
+++ b/scripts/single_run_test.py
@@ -0,0 +1,36 @@
+import requests
+import feedparser
+
+def test_arxiv():
+ base_url = "http://export.arxiv.org/api/query"
+ # 时间段设为 2025-03-27 00:00 到 2025-03-29 00:00
+ # 注意: 论文在 3月27日 07:54Z 提交,应该在这个区间之内
+ search_query = (
+ "(all:bias+OR+all:fairness)"
+ "+AND+cat:cs.IR"
+ "+AND+submittedDate:[202503270000+TO+202503290000]"
+ )
+
+ params = {
+ "search_query": search_query,
+ "sortBy": "submittedDate",
+ "sortOrder": "descending",
+ "max_results": 100
+ }
+ print("[DEBUG] search_query =", search_query)
+
+ r = requests.get(base_url, params=params)
+ print("[DEBUG] Full URL =", r.url)
+ if r.status_code != 200:
+ print("[ERROR] HTTP Status:", r.status_code)
+ return
+
+ feed = feedparser.parse(r.content)
+ print("[DEBUG] Returned entries:", len(feed.entries))
+
+ # 打印出标题和发布时间供检查
+ for i, entry in enumerate(feed.entries, start=1):
+ print(f"{i}. Title: {entry.title} | updated: {entry.updated} | published: {entry.published}")
+
+if __name__ == "__main__":
+ test_arxiv()