Ivan000 commited on
Commit
e219f4f
·
verified ·
1 Parent(s): c7c27df

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -1
main.py CHANGED
@@ -99,7 +99,11 @@ def opds_root() -> Response:
99
  return Response(content=xml_data, media_type="application/atom+xml")
100
 
101
  @app.get("/opds/search")
102
- def opds_search(q: str = Query(..., description="Search query")) -> Response:
 
 
 
 
103
  results = duckduckgo_search(q)
104
  xml_data = generate_search_feed(q, results)
105
  return Response(content=xml_data, media_type="application/atom+xml")
 
99
  return Response(content=xml_data, media_type="application/atom+xml")
100
 
101
  @app.get("/opds/search")
102
+ def opds_search(
103
+ q: str = Query(..., description="Search query"),
104
+ searchType: str = Query(None, alias="searchType")
105
+ ) -> Response:
106
+ # Ignoring searchType parameter if provided
107
  results = duckduckgo_search(q)
108
  xml_data = generate_search_feed(q, results)
109
  return Response(content=xml_data, media_type="application/atom+xml")