File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,20 @@ def scrape_scene(url):
7373
7474
7575FRAGMENT = json .loads (sys .stdin .read ())
76- url = FRAGMENT .get ("url " )
76+ urls = FRAGMENT .get ("urls " )
7777
78- if url :
79- result = scrape_scene (url )
80- result = filter_nones (result )
81- log .debug (f"result { result } " )
82- print (json .dumps (result ))
78+ for url in urls :
79+ if not url .startswith ('http' ):
80+ continue # skip urls that don't start with http
81+ else :
82+ try :
83+ result = scrape_scene (url )
84+ result = filter_nones (result )
85+ log .debug (f"result { result } " )
86+ print (json .dumps (result ))
87+ if result :
88+ break
89+ except Exception :
90+ continue
8391else :
8492 print ("null" )
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ sceneByFragment:
66 script :
77 - python
88 - ScrapeWithURL.py
9- # Last Updated December 20, 2024
9+ # Last Updated October 19, 2025
You can’t perform that action at this time.
0 commit comments