GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — smallbasic.github.io/samples/node/1266.bas at master · smallbasic/smallbasic.github.io

Expand file tree

/

1266.bas

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
30 lines (28 loc) · 957 Bytes
/

1266.bas

Copy path

File metadata and controls

30 lines (28 loc) · 957 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
print "DuckDuckGo Search"
while 1
print '<=== when cycle around need to isolate input promt
input "(Just enter quits) Term? ", queryTerm
if trim(queryTerm)="" then ? "Cheers!":end '<=== need a way out
url = "http://api.duckduckgo.com/?q=" + trim(queryTerm) + "&format=json"
open url as #1
if (eof(1)) then
throw "Connection failed: " + url
fi
dim results
tload #1, results
json = array(results)
num_results = len(json.RelatedTopics)
for i = 0 to num_results - 1
if (isarray(json.RelatedTopics(i).topics)) then
num_topics = len(json.RelatedTopics(i).Topics)
for t = 0 to num_topics - 1
print cat(1); " "; json.RelatedTopics(i).Topics(t).FirstURL; cat(0)
print " "; json.RelatedTopics(i).Topics(t).text
next t
else
print cat(1); " "; json.RelatedTopics(i).FirstURL; cat(0)
print " "; json.RelatedTopics(i).Text
endif
next i
Close #1 '<===== oh this helps!
wend
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.