- A Coroutine-Enabled Interactive Command Line
20 Jul 2015 — normal. Now, we create a coroutine-enabled version of [http::geturl]:
======
% package require http
2.7.2
% proc fetch url {
> http::geturl $url -command [info coroutine]
> yield
> }
======
We can now use this
- a delicious api
16 Jan 2012 — variable user
variable pass
lappend headers Authorization "Basic [base64::encode $user:$pass]"
#puts "geturl $url"
set t [http::geturl $url -headers $headers]
if {[http::ncode $t] != "200"} {
#parray $t
return -code error
- A little Nasdaq retriever
13 Oct 2018 — wants lowercase
set url https://www.nasdaq.com/de/symbol/$sym/dividend-history
set token [http::geturl $url]
set map {Date "" CashAmount div}
set buf [list symbol $symbol]
foreach line [split [set
- A little rain forecaster
05 Mar 2013 — ims]
lappend ims {}
if {$throttle < 1} {
lappend cmds [list \
http::geturl $url -command [list loadFinished $l]]
} else {
incr throttle -1
http::geturl $url -command [list loadFinished $l]
}
}
proc loadFinished { l token } {
global
- A little RSS browser
09 Sep 2012 — needed for proxy support
#autoproxy::init
proc fetch {url} {
set res [http::data [set tok [http::geturl $url]]]
http::cleanup $tok
return $res
}
# add more if desired
set site {http://wiki.tcl
- A little RSS reaper
11 Jan 2012 — wiki.tcl.tk/11831
proc geturl_followRedirects {url args} {
array set URI [::uri::split $url] ;# Need host info from here
while {1} {
set token [eval [list http::geturl $url] $args]
if {![string
- A little spellchecker
26 Jan 2015 — format $mtime \
-format {%a, %d %b %Y %H:%M:%S GMT} -gmt 1]
set token [::http::geturl $url -validate 1 \
-headers [list If-Modified-Since $web_mtime]]
upvar #0 $token state
switch
- A little US election results mashup
24 Mar 2014 — proc refresh url { display [decode [fetch $url]] }
# Fetch the data
proc fetch url {
set t [http::geturl $url]
if {[http::ncode $t] == 200} {
set data [http::data $t]
} else {
set data {}
}
http
- a rest framework
26 Jun 2016 — body
} elseif {![dict exists $config method] || [dict get $config method] == "get"} {
set url $url?$query
}
#puts "geturl $url"
#return
set opts [list]
if {[dict exists $config content-type]} {
lappend opts -type [dict
- A Tcl repository
07 Feb 2018 — pattern *}} {
variable repository
# We pass the pattern, but the repository MAY ignore it
set token [http::geturl $repository?[http::formatQuery pat $pattern]]
if {![string match 2?? [http::ncode $token]]} {
set msg [join
- A TclOO Tkhtml 3.0 megawidget - example of how to render html+css
09 Mar 2018 — baseurl "[$b scheme]://[$b authority]"
set url [$b resolve $full_url]
$b destroy
set t [http::geturl $url]
set data [http::data $t]
$hwidget reset
$hwidget parse -final $data
http::cleanup $t
- A Very Simple Weather App
02 Mar 2015 — set url http://weather.noaa.gov/weather/current/$where.html
set n [catch {set token [::http::geturl $url]}]
.t config -bg [lindex [.t config -bg] 3]
if {$n || [http::ncode $token] != 200
- Akismet spam filtering
07 Jan 2018 — connect {type prefix args} {
variable blog
variable app
set ver [package require akismet]
set token [::http::geturl http://${prefix}rest.akismet.com/1.1/$type \
-headers [list User-Agent "$app | akismet.tcl
- Alexander Schöpe
04 Sep 2018 — tcl package for libzint barcode encoding library (no Tk needed)]
* [Simple HTTP Authentication Wrapper for http::geturl RFC 2617]
* [NaCl - Networking and Cryptography library (pronounced "salt")]
* [BAWT] supporting [Paul Obermeier] by adding
- An HTTP robot in Tcl
16 Oct 2013 — comes in handy in this respect.
The second step is straightforward. Use the [http] package, http::geturl
specifically, and save the html you receive back in a variable. Then the
third step
- AndroWish and its 337 packages
26 Jan 2014 — filetype
fileutil::magic::mimetype
fileutil::magic::rt
fileutil::multi
fileutil::multi::op
fileutil::traverse
ftp
ftp::geturl
ftpd
generator
getstring
gpx
grammar::aycock
grammar::aycock::debug
grammar::aycock::runtime
grammar::fa
grammar
- ao3
31 Aug 2018 — id?view_full_work=true&view_adult=true"
_LOG $this INFO "downloading $url"
set token [::http::geturl $url]
set ncode [::http::ncode $token]
set html [::http::data $token]
_LOG $this DEBUG "download
- Ask, and it shall be given # 1
13 Jul 2018 — I used the lines below:
======
set query [http::formatQuery UserName $user Password $passwd]
set http [::http::geturl $url -query $query]
======
However, I believe the site is relying on cookies as well. What
- Ask, and it shall be given # 3
26 Sep 2016 — the problem that you describe:
exec /sbin/service network start
package require http 2.5
http::geturl http://www.google.com/
fails with the error message "couldn't open socket: host is
- Ask, and it shall be given # 5
01 Sep 2015 — Please advise if i am missing something.
% package require http 2.5
2.5.3
% http::geturl http://www.google.com/
couldn't open socket: connection timed out
2006-12-30 [gg
- autoproxy
16 Sep 2016 — this:
======
package require autoproxy
autoproxy::init
autoproxy::configure -basic -user luser -pass sEkRet
set tok [http::geturl http://somewhere.onthe.net/tcl/autoproxy]
http::data $tok
http::cleanup $tok
======
**Example for https
- basic snack stream player
20 Sep 2018 — data
return
}
if { $argc == 2 } {
set url [lindex $argv 0]
set out [lindex $argv 1]
http::geturl $url -handler [list savestream $out]
} elseif { $argc != 1 } {
puts stdout "\n$::argv0 a basic mp3
- binary data access - tclbin (Demailly)
25 Oct 2013 — etc. Latest version can be built as a Tcl 7.6
dynamically loadable extension. A sample geturl script is included.
While this version compiles and passes all tests under Tcl 8, it
- Blackbox Collection of Network Statistics
18 Oct 2016 — exit
}
}
}
::http::register https 443 [list ::tls::socket -tls1 1]
netstats capture dump
set tok [::http::geturl http://wiki.tcl.tk/ -keepalive 0]
netstats release
vwait forever
}
package provide netstats 0.1
- careck
07 Sep 2013 — password} {
set auth "Basic [base64::encode $username:$password]"
set headerl [list Authorization $auth]
set tok [http::geturl http://del.icio.us/api/posts/all -headers $headerl]
set res [http::data $tok]
http
- CEDict Viewer
25 Jun 2011 — ts_utf-8_mdbg.txt.gz"
set fp [ open [file tail $url] w]
set token [http::geturl $url -progress progress -headers {Pragma no-cache} -channel $fp]
close $fp
eval exec "unzip -o
- chatlog reaper
07 Aug 2013 — format [clock sec] -format %Y-%m-%d]
#http::config -proxyhost proxy -proxyport 80
set token [http::geturl $::base/$date.tcl -headers {Pragma no-cache}]
puts "<html><head>Tclers' Chat of $date</head
- Chess4Tcl
16 Feb 2017 — file dirname [info script]] chess.js]
# code fom dbohdan
if {![file exists $chessfile]} {
set req [::http::geturl http://cdnjs.cloudflare.com/ajax/libs/chess.js/0.10.2/$chessfile]
set c [::http
- CkChat
20 Nov 2013 — date {date format} {
clock format [clock scan $date] -format $format
}
proc ::ckchat::geturl url {
if {[catch {
set token [::http::geturl $url -command "#"]
::http::wait $token
set html [::http::data $token]
::http::cleanup
- Consuming web services
21 Mar 2016 — already.
----
[ALX] 2016-03-17 10:18:00
<<br>><<br>>
[Simple HTTP Authentication Wrapper for http::geturl RFC 2617]
[HaO]: Alex, if you have put the link here, could you also add
- control roku over lan
01 Mar 2018 — 76:8060/keypress/$key"
if { $wt != 0 } {
wait $wt
}
}
return
}
proc quickroku {args} {
set token [::http::geturl $args -method POST ]
::http::reset $token
}
proc uniqkey { } {
set key [ expr { pow(2,31) + [ clock
- Cookies
07 Jul 2012 — package require http
set login [::http::formatQuery email spammer@hotmail.com password fooFoo!]
set tok [::http::geturl http://mysite.net/register/user-login.tcl -query $login]
upvar \#0 $tok state
set cookies
- coroutine-enabled event handling
20 Sep 2018 — NEM] Here's another example - asynchronous [HTTP] requests using a synchronous interface:
======
proc get url {
http::geturl $url -command [info coroutine]
yield
}
proc main {} {
set t [get http://wiki.tcl.tk/4
- CryptoAid
14 Oct 2009 — thisDay"
return 0
}
return 1
}
##+##########################################################################
#
# DownloadPage -- fetches a web page
#
proc DownloadPage {url} {
set token [::http::geturl $url]
::http::wait $token
if {[::http::ncode $token] != 200} {
error "cannot download $url: [::http::ncode
- Daily Dilbert
05 Dec 2017 — http::geturl [lindex [regexp -inline {http://dilbert.com/dyn/str_strip/(0+/){4}\d{5}/\d{4}/\d{3}/\d{5}/\d{5}.strip(.sunday)?.gif} [http::data [set tok [http::geturl
- Data structures: from the bit to the Web
18 Jan 2013 — proc fetch {v1 url op} {
if {[info exists ::web($url)]} {
# Do nothing
} else {
set t [http::geturl $url]
set ::web($url) [http::data $t]
http::cleanup $t
}
}
======
[RS]:-) A good example for
- davkit
07 Jun 2014 — webdav, and davvfs.
The '''webdav''' package does the real work, using an extended version of http (geturl) which supports DAV's PROPFIND methods, etc.
The '''davvfs''' package is a VFS driver on
- deadlinks.tcl - A Bookmark File Cleaner
30 Jul 2014 — good) $line
}
}
}
puts -nonewline "\n"
flush stdout
return
}
proc verifySite {} {
global opt data
if {[catch {http::geturl $data(site) -validate 1 \
-timeout $opt(timeout,ms)} tok]} {
#puts $tok
return 0
}
upvar #0
- Deferred evaluation
14 Dec 2017 — return
}
======
Usage:
lazyEvalOnce test {apply {args { puts "Fetching remote data"; package require http; set token [http::geturl http://google.com/]; set retval [http::ncode $token]; http::cleanup $token; return $retval }}}
----
As shown
- Dithering
17 Aug 2010 — x 0 } ; if {$y < 0} {set y 0}
wm geometry .http +$x+$y
set token [::http::geturl $fname -progress HttpProgress]
::http::wait $token
destroy .http
if {[::http::ncode $token] != 200} {
::http::cleanup
- Download Accelerator
06 Mar 2017 — validate] == 0 } {
set validate [http::geturl $url -validate 1]
}
return [set ${validate}(type)]
}
proc isAcceptRanges { url } {
global validate
if { [info exists validate] == 0 } {
set validate [http::geturl $url -validate 1]
}
array set
- Download file via HTTP
12 Jul 2011 — url } {
set token [::http::geturl $url]
set data [::http::data $token]
::http::cleanup $token
return $data
}
======
----
[KPV] If you need to download lots of files, check out [Parallel Geturl] which
lets you
- Downloading a File over HTTP
27 Jul 2008 — name:
======
package require Tcl 8.5
package require http 2
proc filegrab url {
set token [http::geturl $url -validate 1]
upvar #0 $token head
set cd [dict get $head(meta) Content-Disposition
- Downloading pictures from Flickr
01 Feb 2016 — 4#########5#########6#########7#####
proc GetPage { url } {
#: Fetch a webpage from the web
set token [::http::geturl $url]
set page [::http::data $token]
::http::cleanup $token
return $page
}
proc FetchImage { url fname
- Downloading Videos from Google Video
18 Sep 2012 — set url [lindex $argv 0]
puts -nonewline "Downloading $url ..."
flush stdout
if {[catch {set urlToken [http::geturl $url]} oops]} {
puts "$oops"
exit 1
}
if {[http::status $urlToken] ne "ok"} {
puts [http::error
- Downloading your utility usage from Pacific Gas and Electric using TCL
22 Nov 2011 — getAttribute name] [$input getAttribute value]
}
set t [http::geturl $action -query [http::formatQuery {*}$query]]
set cookies [cookies $t]
http::cleanup $t
set t [http::geturl "https://pge.opower.com/ei/app/myEnergyUse
- Dropbox
20 Sep 2018 — list Content-Length $contentLength Host api-content.dropbox.com Authorization "Bearer $access_token"]
set token [http::geturl $url -headers $headers -method PUT -type $contentType -query $content]
http::wait $token
If the upload
- Dynix2RSS
26 Nov 2004 — Get the authentication page which gives us the session variable
#
set url $dynix2
set token [::http::geturl $url]
set page [::http::data $token] ; ::http::cleanup $token
set n [regexp -nocase {[?&]session=(.*?)&} $page
- Editing the Tcl'ers Wiki using an editor of your choice
08 Dec 2012 — package require nstcl-http }]} {
namespace import nstcl::*
} else {
package require http
proc ns_geturl {url} {
set conn [http::geturl $url]
set html [http::data $conn]
http::cleanup $conn
return $html
}
proc ns
- Einfach Tcl
26 Jan 2016 — Beispiel: Internet-Dateiherunterlader'''
package require http
http::config -proxyhost proxy -proxyport 80
puts [http::data [http::geturl [lindex $argv 0]]]
Verwendet wird das mit Tcl mitgelieferte package ''http''. Mit ''http::config'' wird
- Empty interpreter
05 Apr 2018 — format [clock sec] -format %Y-%m-%d]
#http::config -proxyhost proxy -proxyport 80
set token [http::geturl $::base/$date.tcl -headers {Pragma no-cache}]
puts "<html><head>Tclers' Chat of $date</head
- Enhancing Satellite Weather Images
28 Oct 2012 — foreach {x y t} $trans { $image transparency set $x $y $t }
}
set imagedata [http::data [http::geturl http://www.ssec.wisc.edu/data/geo/east/latest_east_ir2_conus.gif]]
image create
- eTcl
07 Jan 2018 — go to another application, like Pocket IE to establish a connection, before I can use http::geturl to get a web page. Is there any way to get eTcl to use the
- Event Tracing for Windows
04 Apr 2014 — through a http::geturl call that shows the script execution comingled with the actual network events at the system level.
First we generate a trace file from a http::geturl call. To
- Excel VBA to OpenOffice Basic converter
16 Mar 2015 — Private) (?!Sub|Function)(.+,.+ As .+)$} {[CDim \1 {\2}]}
AddSubst {ActiveWorkbook.Name} {FileNameOutOfPath(ThisComponent.getURL)}
AddSubst {ActiveWorkbook.Path} {ConvertFromURL(DirectoryNameoutofPath(ThisComponent.getURL, "/"))}
AddSubst {\.Visible} {.isVisible}
#Databases:
AddSubst {conn\.Open (.+)$} "DataSource = createUnoService(\"com.sun.star
- EZShout
13 Jan 2014 — size_limit="off")
set stationLen 32
proc getShoutcastGenres {} {
global genreListURL
set genreList [list]
set tok [http::geturl $genreListURL]
if {[http::ncode $tok] == 200} {
set doc [dom parse [http::data $tok]]
set root
- fallingrain
02 Nov 2012 — c %c]
if {$i < 65 || $i > 127} {set c $i}
append url $c/
set token [http::geturl $url]
set page [http::data $token]
http::cleanup $token
foreach line [split $page \n] {
if
- FastaFile
07 Apr 2012 — Just start a tclkit-shell and begin working by fetching the latest biotcl.kit via http::geturl. I will release a first kit this week.
Regarding your methods for FastaFile: It should
- File HTTPS Upload
18 Oct 2014 — geturl https://${host}$cgi \
-type "multipart/form-data; boundary=$bound" -query $content \
-headers [list Authorization "Basic $up"]]
# Depending on your data and platform, you might also need -binary 1 in the geturl
- File Upload with tcl's http
09 May 2014 — actual http header, if you simply pass the returned block to the -query parameter of http::geturl .. which causes a wrong content-type and then everything goes down the drain.. also, but
- Finding distances by querying MapQuest
21 Aug 2006 — 1c 1s 2c 2s] {
append url &$field=[ns_urlencode [set $field]]
}
set html [ns_striphtml [ns_geturl $url]]
set RE {(?i)Total\s+Distance:\s+([0-9,.]+)\s+mile}
if {[regexp $RE
- firewall
21 Jun 2017 — share {} stdout $i; # Give away stdout so we can output data
$i eval {
set t [::http::geturl http://wiki.tcl.tk/]
if { [::http::data $t] ne "" } {
puts "Properly downloaded [string length [::http
- Following Redirects
18 May 2015 — So, here's an updated version of [Donal Fellows] routine
'''geturl_followRedirects''' that can handle this weird case.
----
======
package require uri
proc geturl_followRedirects {url args} {
array set URI [::uri::split $url
- FreeDB Access
11 Jun 2009 — other error"
return
}
set did [lindex $ret 0]
set cdtemp ""
foreach c $cats {
set token [::http::geturl "http://freedb.freedb.org/~cddb/cddb.cgi?cmd=cddb+read+$c+$did&hello=name+host
- Freshmeat Newsletter Filter
28 Nov 2011 — This is
# expected to be a redirect (http return code 302).
#
if {![catch {set urlToken [http::geturl $url -timeout 10000]} \
errorMsg]} {
if {[http::status $urlToken] != "ok"} {
#
# We get here if a timeout
- Fuzzy Google truth
02 Feb 2017 — google.yahoo.com/bin/query?p=[string map {" " +} $query]&hc=0&hs=0
set token [http::geturl $url]
set data [http::data $token]
http::cleanup $token
set nhits 0
regexp {\n[ 0
- geocoder
26 Jun 2012 — set geocoder "http://rpc.geocoder.us/service/rest/geocode?address=$encodedURL"
set data [http::data [http::geturl $geocoder]]
regexp "<geo:long>(.*)</geo:long>" $data X long
regexp "<geo:lat>(.*)</geo:lat>" $data
- Get External IP-address
24 Aug 2018 — your external IP-address. For this I created the following proc:
======
proc getExternalIP {} {
set token [http::geturl http://myexternalip.com/raw]
set externalIP [string trim [http::data $token]]
::http::cleanup $token
return
- Getting stock quotes over the internet
01 Sep 2012 — com"
append query "/d/quotes.csv?s=[join $symbols +]&f=sl1d1t1c1ohgv&e=.csv"
set token [http::geturl $query]
set actual {}
foreach res [split [string trim [http::data $token]] "\r\n"] {
if {$res
- getturl bug?
19 May 2016 — Dos http::geturl methods with channel option has bug in it?
Test this. The file downloaded has extra stuff in it at the top and the end:
package req Tk
package req
- Google AJAX search API
24 Jan 2008 — en sig $api_key q $query key internal v 1.0 nocache 7]
set t [http::geturl $url]
if { [http::ncode $t] == 200 } {
set d [http::data $t]
set idx 0
while
- Google Chart API Wrapper
06 Jul 2009 — hnd} {
upvar $chart_hnd chart_array
set url [build_plot_URL chart_array]
set toc [http::geturl $url]
set chart_graph [http::data $toc]
upvar $toc state
if {$state(type) ne {image
- Google Image Search Slideshow
01 Sep 2015 — URL
set url [ string map { "\"" "" " " "+" } $url ]
puts "URL: $url"
if { [catch { set readpage [http::data [::http::geturl $url -timeout 10000 ] ]} msg] } {
puts "http error - $msg"
return "error - $msg"
} else {
puts "http ok
- Google Translate ajax API
31 Mar 2010 — 0 ]
set url "http://ajax.googleapis.com/ajax/services/language/translate?langpair=%7Cen"
set t [http::geturl $url -query $q]
set translated ""
if { [http::ncode $t] == 200 } {
set d [http::data $t
- Google Translation via http Module
12 Feb 2015 — http::formatQuery \
hl en \
ie UTF8 \
text $text \
langpair $source|$destination \
];
if {[catch {
set post [http::geturl \
$postUrl \
-query $query \
-progress ::googleTranslation::progress \
];
} reason] == 1} {
error "couldn't translate a text via
- Googling with SOAP
16 Sep 2012 — name]]]} {
set f [open $fname r]
set wsdl [read $f]
close $f
} else {
set tok [http::geturl $wsdl_url]
if {[http::status $tok] eq "ok"} {
set wsdl [http::data $tok]
set f
- grabchat
19 Jan 2006 — 1} {
buildProxyHeaders [lindex $argv 1] [lindex $argv 2]
}
proc ::http::geturl_followRedirects {url args} {
while {1} {
set token [eval [list http::geturl $url] -headers [list $::headers] $args]
switch -glob -- [http::ncode $token
- Herring
08 Sep 2012 — MSG Herring
}
proc herring::wikisearch {what {max -1}} {
set z {}
set c 0
set h [http::geturl http://wiki.tcl.tk/_search?S=$what]
if {[http::status $h] eq {ok}} {
foreach {. p
- hkassem
26 Jun 2018 — proc download {url} {
set token [http::geturl $url -timeout 200]
eval set data $$token\(body\)
return $data
}
package require http
proc download2 {url} {
set token [http::geturl $url]
eval set data $$token
- how to find my own IP address
09 Jul 2016 — require http
proc whatIP {} {
regexp {Your IP Address:</B><BR>\n([0-9.]*)} [http::data [http::geturl whatismyipaddress.com]] {} ip
return $ip
}
======
[rdt] says that this will probably give you the address
- HTML to DOM via http/htmlparse/struct::tree packages
14 Jan 2015 — while {$ncode < 200 || $ncode >= 300} {
# test if the url is valid
#
if {[catch {set token [http::geturl $url -validate 1];} reason options] == 1} {
http::config -accept "*/*";
return -options $options $reason;
}
# error and
- http
03 Oct 2018 — protocol.
** Documentation **
[http://www.tcl.tk/man/tcl/TclCmd/http.htm%|%official reference]:
** Commands **
[http::geturl%|%http::geturl](https://wiki.tcl-lang.org/24061): Performs an HTTP transaction.
** History **
As of version
- http 1.1
03 Oct 2018 — option to enable HTTP requests other than GET, HEAD and POST. For instance
======
set tok [http::geturl http://www.google.com/ -method OPTIONS]
======
will get the options header from the server. For
- http authentication
17 Mar 2016 — for each [http::geturl], then this could (not tested) work:
======
rename ::http::geturl ::http::geturl_orig
set ::http::SASL::geturl ::http::geturl_orig
interp alias {} ::http::geturl {} ::http::SASL::geturl
======
Works for
- http in Jacl
26 Oct 2009 — strings, as this procedure does.)
----
======
package require java
# getUrl - returns a list of 4 elements
# {contentType contentLength contentEncoding contentData}
# NOTE: no error handling
proc getUrl {url} {
set url [java::new java.net
- http::geturl
03 Oct 2018 — allow files to be downloaded:
======
proc geturl {url {_meta {}}} {
if {$_meta ne ""} {
upvar 1 $_meta meta
}
http::config -useragent moop ;# thanks source forge!
set tok [::http::geturl $url] ;# -headers {User-Agent moop
- HTTPS
30 May 2018 — the http::geturl function because I already had to modify it. It may be better to add it to the http::config command.
The modified http::geturl command:
======
proc http::geturl { url
- imgsizer
29 Jul 2011 — size of an image after first downloading
# from the web
#
proc GetWebImageSize {url} {
set token [::http::geturl $url]
::http::wait $token
set idata [::http::data $token] ; list
::http::cleanup $token
if {$::OPT
- interp
21 Jun 2017 — use [winfo id .f]
proc http_source {interp base filename} {
regsub {.*:/*} $filename {} trimmed
set token [http::geturl $base$trimmed]
set script [http::data $token]
http::cleanup $token
$interp eval $script
}
$i alias
- Interpreting TOOT
03 Jan 2013 — passed around. For instance:
======
set url "http://www.foo.com/index.html" ;# Un-typed representation
http::geturl $url ;# Command interprets $url as an HTTP URL
set http_url [Url create $url] ;# Returns
- IP-geolocation
09 Oct 2010 — set ip $argv
puts "get geo data from $argv"
#get the desired data
set ht [::http::geturl http://ipinfodb.com/ip_query.php?output=json&timezone=false&ip=$ip]
set geo_ip
- JM
05 Oct 2018 — organism_name</organismName>
</orgPdbQuery>
"
set url "http://www.rcsb.org/pdb/rest/search"
set tok [::http::geturl $url -query $xml -type application/x-www-form-urlencoded]
set rep [::http::data $tok]
puts
- Keith Vetter
26 Sep 2018 — a rotating fan
* [Parsing XML] : yet another xml/html parser, this one in pure tcl
* [Parallel Geturl] : how to efficiently download lots of web pages
* [Azimuth Plotting] : help in locating benchmarks
* [Universal
- KEXP radio playlist a System Tray icon
16 Jul 2009 — updateNow {} { winico taskbar modify $::ico -text [scrapText] }
proc scrapText {} {
if { [catch {set html [http::data [http::geturl $::target_page]]} errohttp] } {
return "Erro! $errohttp"
} else {
set linha "[between "class=\"programtime\">" and "</tr>" in
- lambda
30 Nov 2014 — proc lambda {params body} {
list apply [list $params $body]
}
lsort -command [lambda {a b} { ... }] $xs
http::geturl $url -command [lambda tok { ... }]
after 1000 [lambda {} { puts Hello! }]
socket -server [lambda {sock addr port
- Last.FM
21 Jan 2011 — 2.1 c tst v 1.0 u $user t $timestamp a $authtoken]
set r [::http::geturl http://post.audioscrobbler.com/ -query $query]
set data [::http::data $r]
::http::cleanup $r
return
- Last.fm cover grabber
27 Aug 2013 — user]
return [___requestData $query]
}
#run query and return received data
proc ___requestData {query} {
set r [::http::geturl http://ws.audioscrobbler.com/2.0/ -query $query]
set data [::http::data $r]
::http::cleanup
- LemonTree branch
23 Sep 2015 — html location"
return
}
::struct::tree t
if {[string range $url 0 3] == "http"} {
set http [::http::geturl $url]
set html [::http::data $http]
} else {
set html [read [set fh [open $url]]]
close
- List of Tcl commands by bytecode status
22 Apr 2014 — history redo]
[http]
http::cleanup
http::code
http::config
http::data
http::error
http::formatQuery
[http::geturl]
http::meta
http::ncode
http::register
http::reset
http::size
http::status
http::unregister
http
- LocusLinkFile
10 Jul 2017 — ftp.ncbi.nih.gov/refseq/LocusLink/loc2go . In the future downloading may be done via http::geturl directly from the package. Candiate for future [biotcl] package.
======
# Author : Dr. Detlef Groth, MPIMG Berlin
- mailip.tcl
18 Sep 2009 — external IP
# or 0.0.0.0
#
set result 0.0.0.0
set request [::http::geturl http://checkip.dyndns.org]
set answer [::http::data $request]
set adom [::dom parse -html $answer
- Markov
08 Aug 2005 — fetch it from the web.
if { [ string compare -nocase -length 7 http:// $flnm ] } {
set page [::http::geturl $flnm]
set data [http::data $page]
regsub -all {<[^>]*>} $data "" data
regsub -all {&[^;]*} $data "" data
} else
- minimalist wget
30 Jul 2014 — package require http
set url [lindex $argv 0]
set filename [file tail $url]
set r [http::geturl $url -binary 1]
set fo [open $filename w]
fconfigure $fo -translation binary
puts -nonewline $fo
- Mormon Porn
10 Sep 2010 — save
tk_messageBox -message "Saved $fname"
}
##+##########################################################################
#
# GetURLorFile -- Puts up either the stock getOpenFile dialog or custom
# getUrl dialog, and returns either the filename or url
#
proc GetURLorFile {what} {
global S
if {$what
- MusicBrainz
29 Aug 2013 — get some basic info:
======
package require http
package require tdom
proc ___returnArtistID {artist} {
set r [::http::geturl http://www.musicbrainz.org/ws/2/artist/?query=$artist]
set data [::http::data $r]
::http
- My House
20 Aug 2013 — cursor watch
.c itemconfig quad -fill {} -stipple {}
set url "$::S(url)$::S(quad)"
set token [::http::geturl $url]
::http::wait $token
set data [::http::data $token]; list
::http::cleanup $token
::img::map
- New Pages
14 Aug 2018 — launcher]
* [doctools::changelog]
* [Fault trees]
* [Filesystem Hierarchy Standard]
* [fileutil::traverse]
* [fileutil]
* [foreach async]
* [formula calculators]
* [ftp::geturl]
* [ftpd]
* [ftp]
* [FullyTransparentDigitalClock2]
* [Generating Syntax Diagrams Using Tk]
* [getstring]
* [getWindowsAPIVendor]
* [gingerbread man]
* [globfind]
* [Google Code
- NOAA Weather Forecast
21 Dec 2017 — format)&startDate=$startdate"
append url "&numDays=$::S(days)&Submit=Submit"
set ::URL $url
set token [::http::geturl $url]
set ncode [::http::ncode $token]
set xml [::http::data $token] ; list
::http::cleanup $token
- NTLM
25 Apr 2013 — s a simple way to get around NTLM using basic authentication with [Jos Decoster]'s http::geturl modification at [HTTPS] (Note: check for repeated lines in the code!) and a python-based
- OpenID
07 Aug 2011 — regexp's dont work propperly.
======
package require http
proc geturl {url} {
if {![regexp {^http://.*} $url]} { set url "http://[set url]" }
set token [http::geturl $url]
set ncode [http::ncode $token]
if {($ncode
- Orphans
19 Jan 2014 — to} {incr i} {lappend res $i}
set res
}
proc getPage {id} {
memoize
return ::http::data [::http::geturl "$base/references/$id!"]
}
proc pageExists {id} {
if {$id == 2} { return 1 }
if [regexp "<title>References
- Parallel Geturl
20 Aug 2013 — not demo
set url [lindex $queue($id) 0]
::http::geturl $url -timeout $options(-timeout) \
-command [list ::PGU::_HTTPCommand $id]
}
}
##+##########################################################################
#
# ::PGU::_HTTPCommand -- our geturl callback command that handles
# queue maintenance, timeout retries and
- Playing HTTP
06 Apr 2013 — t tag config $i -foreground $i}
focus .e
raise .
proc go {w url} {
set token [http::geturl $url]
upvar #0 $token arr
$w insert end \n$arr(url) blue
if [info exists
- Polling web images with Tk
12 Jul 2011 — c:/ temp wc.jpg]
set f [open $name w]
fconfigure $f -translation binary
set imtok [http::geturl $url -binary true -channel $f]
flush $f
close $f
image create photo wc -file $name
- Poor Yorick
06 Sep 2018 — try it out .
https://developer.github.com/v3/issues/
======
proc github {api query} {
set http [http::geturl https://api.github.com/$::github_repo/$api?$query_string \
-headers [list Authorization "Basic $::github_auth
- pop3line
29 Jul 2011 — modem.webmail.t-online.de
# login and redirect
debug URL $BASE/index.cgp
set token [http::geturl $BASE/index.cgp]
debug STATUS [http::status $token]
set data [http::data $token]
debug DATA
- Posting to Google's Blogger
27 Jun 2008 — query option http::geturl sends a POST instead of a GET request, with a Content-type: application/x-www-form-urlencoded header
# sent the POST request
set token [::http::geturl $var(loginurl
- problem reports against previous wikit version
01 Sep 2015 — of the html. However, when using Tcl's http package to get these urls (with ''[http]::geturl''), the page is not seen as utf-8. This is because the header information being
- rest
24 Sep 2013 — 2 [split $where /]
}
return -level 2 $where
}
method LogWADL url {
return;# do nothing
set tok [http::geturl $url?_wadl]
set w [http::data $tok]
http::cleanup $tok
if {![info exist wadls($w
- Retrieving movie information from IMDB
28 Aug 2011 — query [http::formatQuery btnI "I'm Feeling Lucky" q "site:imdb.com $input"]
set http [http::geturl http://www.google.com/search?$query]
# get HTTP header info
upvar 0 $http arr
array
- RS's RSS
21 Jun 2014 — res
}
proc deblank string {regsub -all {\s+} $string " "}
#-- This redirecting geturl is courtesy of KPV's http://wiki.tcl.tk/11831
proc geturl_followRedirects {url args} {
array set URI [::uri::split $url
- RSS
29 Apr 2015 — the Recent Changes page.
package require http
package require rss
proc fetch {url} {
set tok [http::geturl $url]
set res [http::data $tok]
http::cleanup $tok
return $res
}
set rawrss [fetch http
- RSS Monitor
19 Jan 2014 — hash,$url)]} {
set hash $::options(hash,$url)
} else {
set hash {}
}
#Retrieve the URL.
set token [::http::geturl $url -timeout 2000]
if {[::http::status $token] != "ok"} {
puts "Could not retrieve data for $url
- RSS Reader
28 Sep 2018 — load xml to temporary file
set file "[ clock seconds].xml"
set out [ open $file w ]
http::geturl $url -channel $out
close $out
# load xml into dom from temporary file
set doc [ dom
- RssPoint
02 Feb 2012 — data [set tok [http::geturl $url \
-headers [list If-Modified-Since $rss(last,$url) If-None-Match $rss(etag,$url)]]]]
} else {
set res [http::data [set tok [http::geturl $url]]]
}
upvar #0
- Selenium
17 Aug 2017 — main difference of this test setup as compared to doing HTTP requests
with Tcl's http::geturl is that there is a browser in between, so it can test
browser compatibility for
- Signing a JWT header for Google OAuth2
12 Feb 2015 — oauth:grant-type:jwt-bearer" assertion $final]
::http::register https 443 ::tls::socket
set fp [::http::geturl "https://accounts.google.com/o/oauth2/token" -query $postdata]
set status [::http::status $fp]
set
- Simple Download Progress Widget
17 Dec 2011 — update to improve handling of large files. The code now uses the -channel option of http::geturl in order to download directly to disk. Before, it was downloading into memory, and then
- Simple ftp uploader
17 Jul 2013 — Code **
======
package require Tk
catch { console show }
# load necessary packages
package require ftp
package require ftp::geturl
#---------------
# set appropriate values...
#---------------
set host *******
set user *******
set pass *******
set directory /
#---------------
# transfer files to server
- Simple HTTP Authentication Wrapper for http::geturl RFC 2617
17 Mar 2016 — password {}
}
if {[info commands ::http::geturl_original] == {} && [lsearch -exact [interp aliases] {::http::auth::geturl}] == -1} {
rename ::http::geturl ::http::geturl_original
interp alias {} ::http::geturl {} ::http::auth::geturl
}
proc ::http::auth::config
- Simple Tcl Archive Network
28 Jun 2006 — 6
I get the same behaviour running under tclsh.
[PS] It is probably in the http::geturl that it goes wrong. I have limited error checking there, as yet. Are you behind
- Simple Tkhtml web page displayer
10 Jul 2016 — y;pack \
[html .html -bg white -yscrollcommand {.vsb set}] -fill both \
-expand 1;set t [http::geturl http://wiki.tcl.tk/976];.html \
parse [http::data $t];http::cleanup $t
======
(it was
- single command http fetcher
04 Nov 2010 — queued yet.
}
file -
dir {
if {$loading < $limit} {
incr loading 1
variable base
set cmd [list ::http::geturl $base/$path -command [namespace code [list got$op $path]]]
puts stderr "GETTING: $op $path $loading
- Sitemap Generator
10 Jul 2016 — url --> psite x]} {
# reject incomplete urls
return
}
puts "getting $url"
# get page 'url'
set p [::http::geturl $url]
if {[set status [::http::ncode $p]] != 200} {
# update visit counter and status
lappend inv
- Sitemap Validator
20 Apr 2006 — 1+"$@"}
package require http
proc validate {url} {
set query [::http::formatQuery uri $url]
set p [::http::geturl http://validator.w3.org/check?$query]
upvar 0 $p state
array set arr $state(meta
- Slashdot MetaModeration
01 Oct 2004 — unickname $username returnto http://slashdot.org \
op userlogin upasswd $password login_temp yes]
set tok [http::geturl http://slashdot.org/login.pl -query $q]
upvar \#0 $tok state
set cookies [list]
foreach
- Slippy Map Demo
07 Jul 2010 — 1}]"
set url $V(url,$S(scheme))
append url /$zoom/$col/${row}.png
set token [::http::geturl $url]
::http::wait $token
set ncode [::http::ncode $token]
if {$ncode != 200} {
::http::cleanup $token
- SMS
13 Jun 2009 — 4] == "+354"} {
switch -exact [GSM_which_Icelandic_provider?] {
"OgVodafone" {
# send the text message
set token [http::geturl "http://www.ogvodafone.is/" -query \
[http::formatQuery "_ctl1:_oContentSection:_ctl4:txtTelno" [string range $phonenumber 4
- snitbrowser
28 Sep 2012 — Alt-Home> [mymethod home]
}
method _FetchImage {src w h args} {
# Fetch the image
if {[catch {
http::geturl $src -timeout 10000
} token]} {
return smgray
}
set data [http::data $token]
http::cleanup $token
# Hack
- Speech Synthesis, or Talk to me Tcl
06 May 2012 — loginKey=LoginKey&loginPassword=$loginPassword&voice=$voice&outputFormat=FORMAT_WAV&sampleRate=16&text=$str"
set token [::http::geturl $url]
set resultCode [getXMLResponseAttr [::http::data $token] resultCode]
if {$resultCode != 0} {
puts Error:[getXMLResponseAttr [::http
- SPITE
20 May 2015 — install over the 'net using [http] or [wget]
======none
$ echo 'package require http; set r [http::geturl http://www.mysite.net/mydir/spite-0.3.spite.gz -binary 1]; fconfigure stdout -translation
- SQL JSP Tcl Responder
22 Jan 2010 — connection "jdbc:odbc:Northwind" username sa password "" querytype select maxrows 50]
puts $postData
set response [::http::geturl "http://Insert JSP URL" -query $postData]
upvar #0 $response state
puts $state(status)
puts $state
- Starting Tclhttpd in a slave interpreter
08 Jun 2012 — even access our own server via http
% package require http
2.4.2
% set tok [http::geturl http://localhost:9001/]
::http::1
======
It is even possible to start multiple servers if they
- stockwatch - Simple Stock Market Ticker
16 Jul 2010 — stock($s,$field) ""
}
return
}
proc geturl_followRedirects {url args} {
array set URI [::uri::split $url] ;# Need host info from here
while {1} {
set token [eval [list http::geturl $url] $args]
if {![string
- Synchronizing System Time
01 Sep 2013 — package require http
set url "http://www.time.gov/timezone.cgi?/d/-8"
set idx [::http::geturl $url]
set r [::http::data $idx]
::http::cleanup $idx
regsub -all {<script.*?/script>} $r {} r
- TaeglicherStrahlungsBericht
28 Jun 2011 — http
package require Img
catch { console show }
# http::config -proxyhost <host> -proxyport 8080
set hConn [::http::geturl http://odlinfo.bfs.de/pics/germany.gif]
catch {set data [::http::data $hConn]}
catch {set
- TAX RSS
11 Feb 2007 — a small example:
#! /usr/bin/env tclsh
package require rss
package require http
set token [http::geturl "http://www.digg.com/rss/index.xml"]
set rssdata [http::data $token]
http::cleanup $token
- Tcl Chatroom
19 Sep 2018 — to throttle the current polling cycle. All one has to do is insert an appropriate http::geturl in there. For accurate tracking, the next chatter.cgi access should give the returned timestamp
- Tcl chatroom snaphost history
09 Mar 2015 — and cleanup the data from the chat.
proc getChat {} {
set token {}
if {[catch {set token [::http::geturl $::URL -timeout 30000]}]\
|| ([::http::status $token] != "ok")\
|| ([::http::ncode $token] != "200")} {
::http::cleanup $token
return
- Tcl chatroom snaphost history (2)
09 Mar 2015 — cleans up the data from the chat.
#
proc getChat {} {
set token {}
if {[catch {set token [::http::geturl $::URL -timeout 30000]}]\
|| ([::http::status $token] != "ok")\
|| ([::http::ncode $token] != "200")} {
::http::cleanup $token
return
- Tcl Extension Archive
14 Aug 2018 — magic::filetype
* fileutil::magic::rt
* fileutil::multi
* fileutil::multi::op
* fileutil::traverse
* flightaware-tcltools
* [ftp]
* ftp::geturl
* [ftpd]
* [Garuda]
* [getstring]
* [globfind]
* [gnocl]
* [grammar::fa]
* grammar::fa::dacceptor
* grammar::fa::dexec
* grammar::fa
- Tcl nano proxy server
04 May 2012 — close $s; return}
switch $command {
GET {
set hh [http::geturl $url -command "proxyfeedpage $s" ]
fileevent $s readable "proxyservnextevent $s"
}
POST {
set hh [http::geturl $url -command "proxyfeedpage $s" -querychannel $s ]
# fileevent $s
- Tcl Style Guide
26 Jul 2018 — for example, all the http-3.n tests in http.test
are for the procedure http::geturl). The order of the tests within a group
should be the same as the order
- Tcl-URL! - 1999/07/06
21 Jul 1999 — discussion thread) (see [http://www.dejanews.com/getdoc.xp?AN=495124762])
* Good tip for getting http::geturl to work for you (see [http://www.dejanews.com/getdoc.xp?AN=496368679])
* Changing the
- Tcl/Tk 8.6 Roadmap
28 Mar 2013 — to read [trace]s | hobbs | semantics |&
&| [https://sourceforge.net/support/tracker.php?aid=2911139]| [Tcl]| [http::geturl] abuses [vwait] on async call | patthoyts | |&
%||||||%
&| [https://sourceforge.net/support/tracker.php?aid=3416492]| [Tk
- TcLeo
21 Oct 2008 — table
set url http://pda.leo.org
set query [http::formatQuery search $query]
set tok [::http::geturl $url -query $query]
foreach line [split [::http::data $tok] "\n"] {
if {[string match "*ENGLISCH*DEUTSCH
- TclHttpd RSS Processing
06 Jan 2013 — feed in the above sample template have been redirected. Replacing '''''http::geturl $uri''''' in line#4 of tmlrss::fetchXML routine, by '''''geturl_followRedirects $uri''''' will fix the problem.
BTW, when I ran
- tDOM
01 Aug 2018 — your HTML document
$doc delete
# finished
return $urlList
}
# Test it
set urlList [pullOutTheURLs [http::data [http::geturl [lindex $argv 0]]]]
foreach url $urlList {
puts $url
}
======
MHN 2012-11-08: I have not
- tdom encoding woes
19 May 2016 — times rss feed but to no avail.
I resorted to first getting the file with http::geturl, saving it as utf-8, and then parsing it with [dom parse] command. I used
- tinyurl
08 Feb 2013 — out: The tiny URL
#
proc TinyURL {url} {
set query [::http::formatQuery url $url]
set token [::http::geturl http://tinyurl.com/create.php -query $query]
if {[::http::ncode $token] != 200} {
return -code error
- title index
05 Jun 2016 — package require nstcl-http }]} {
namespace import nstcl::*
} else {
package require http
proc ns_geturl {url} {
set conn [http::geturl $url]
set html [http::data $conn]
http::cleanup $conn
return $html
}
proc ns
- tkGetComics - to get 'old' comics from comic archive web-sites
07 Jun 2014 — strip ---
## via a 'http:geturl' command and a 'http:data' command.
############################################################
set TEMPurlID [http::geturl "$picURL"]
## FOR TESTING:
if {0} {
puts ""
puts "PROC 'show_image_forPicURL' did 'http::geturl' on"
puts "picURL
- tkhtml3
31 Aug 2017 — file or url.
======
package require Img
package require http
proc get_url url {
set token [::http::geturl $url]
set data [::http::data $token]
::http::cleanup $token
return $data
}
proc get_image uri
- TkMapper
19 Aug 2013 — the script. Fixing this was non-trivial because I was using
the -command option to http::geturl. Also, Yahoo also changed the url
when clicking on the image. I was simulating a
- TkTopoMap
19 Aug 2013 — the image from terraserver into our tempfile
set f [open $state(tempfile) w]
set token [::http::geturl $state(xurl) -channel $f]
::http::wait $token
close $f
;# Display the image
image create photo
- tkWorld
24 Mar 2014 — firewalls; even the ''http'' package is better. So...
======
package require http
proc fetchTclers {} {
set tok [http::geturl http://www.suse.de/~max/TclersLocations]
set tclers {}
foreach line [split [http::data $tok] \n
- tls
10 Apr 2018 — at the begining I had a problem communicating with my web server. When I input
======
::http::geturl https://www.mydomain.de
======
I get the error:
error reading "sock560": operation not supported on
- treeselect
08 Jun 2017 — html $documentTree
return $documentTree
}
proc url-to-tree {url} {
set documentTree [::struct::tree]
set conn [::http::geturl $url]
set html [::http::data $conn]
::http::cleanup $conn
htmlparse::2tree $html $documentTree
return $documentTree
- True Random Numbers
03 Apr 2014 — minVal)}]
}
# internal helper procs -----------------------------------------------------
proc ::RandomOrg::_getData {url} {
variable baseURL
variable proxy
set cmd [list ::http::geturl $baseURL$url]
# if proxy is set - configure it
if {[string length $proxy(host)] > 0} {
::http
- Tutorial: Converting synchronous HTTP requests to event driven code
05 Jan 2018 — bin/tclsh
# tested 2017-8
package require http
proc fetchURL { url } {
set htoken {}
set htoken [http::geturl $url]
set ncode [::http::ncode $htoken]
set data [::http::data $htoken]
::http::cleanup $htoken
return
- TWiG
15 Aug 2012 — split $r(rawData) :] { addBlock $rc $l }
}
proc reapHttp {rc} {
upvar 1 $rc r
set tok [http::geturl $r(url)]
if {[http::ncode $tok] != 200} { errExit $r(cfg) "HTTP problem: ([http::code $tok
- Twigging
27 Nov 2008 — proc image {create photo name -file file} {
global _c _u
package require http
set tok [http::geturl $_u$file]
_i create photo $name -data [http::data $tok]
http::reset $tok
if {[incr
- Twigs
21 Nov 2008 — Octabug
11193 2 55F6103995FAEF1599178DBB039474BE {} {Once In A Lifetime}
10882 1 99981D9BBA81D49826B445287B623480 {} Panner
11060 1 4D42C3E044EDF960B5CF9AF4BCD9498D {} {Parallel Geturl}
14130 3 8332348860A96B7388FFA6F1D85A4900 {} {Parametric curves drawing}
3252 1 4B18AC81BC079B3C953EBF39CA22D66F {} {Particle System}
10924 1 DC31092AF119A9889F44A2FFEDD3D7C9 {} {Pascal
- Twitter
02 Jul 2018 — oauth/access_token
set authurl https://api.twitter.com/oauth/authorize
proc geturl {url secret args} {
set cmd [list http::geturl $url]
if {[llength $args] & 1} {
set method POST
set args [dict
- ucnetgrab
07 Aug 2009 — read stdin] -> url rel
regsub {^https} $url {http} url
# Fetch the whole thread
set token [http::geturl $url]
set html [http::data $token]
http::cleanup $token
# Parse the HTML and select the
- uniquename
23 Feb 2018 — 6277) (broken)
* [Daily Dilbert] (8899)
* [Wiki History Diff] (10335)
* [A Very Simple Weather App] (10507)
* [Parallel Geturl] (11060)
* [Following Redirects] (11831)
* [minimalist wget] (12871)
* [Dynix2RSS] (13070)
* [My House] (14330) (broken)
* [Simple ftp
- Uploading files to Flickr
25 Jan 2014 — Disposition: form-data;\
name=\"photo\"; filename=\"[file tail $file]\"\n\n$photo\n"
set token [http::geturl $posturl -type "multipart/form-data; boundary=$bound" \
-query $outputData]
set body [http::data $token]
http
- URL behaviour in a text widget
05 Jan 2012 — error "unknown operation \"$operation\"" }
}
uplevel 1 [linsert $args 0 $op $w]
}
# ---------------
# get the current URL
# ---------------
proc getURL {w type} \
{
variable {}
# get current index
set current [$w index current]
# get corresponding range
foreach
- Useful scripts for Sophos AV
27 Sep 2012 — user)
}
# authenticated geturl
proc geturl_auth {url username password} {
puts stdout "Getting URL: $url"
set auth "Basic [base64::encode $username:$password]"
set headerl [list Authorization $auth]
set tok [http::geturl $url -headers
- Using Tcl to write CGI applications
01 Feb 2015 — http://hplyot.obspm.fr/%7Edl/wwwtools.html
ftp://hplyot.obspm.fr/tcl/www/
Description: Source for geturl, geturl2, uncgi, test-cgi, guest book,
as well as other WWW related Tcl tools.
Note
- using tdom to check generated html
27 May 2011 — html select tag:}
======
package require tdom
package require http
# get the html page
set token [http::geturl http://aspn.activestate.com/ASPN/Cookbook/Tcl/]
set data [http::data $token]
# parse the html
- vfs::http
02 Jun 2016 — a path '$path' and file '$file')"
}
if {![string length $user]} {
set user anonymous
}
set token [::http::geturl $dirurl -validate 1]
if {![catch {vfs::filesystem info $dirurl}]} {
# unmount old mount
::vfs::log "ftp
- vfs::webdav
18 Dec 2011 — proc vfs::webdav::stat {dirurl extraHeadersList name} {
::vfs::log "stat $name"
# ::vfs::log "geturl $dirurl$name"
set token [::http::geturl $dirurl$name -method PROPFIND \
-headers [concat $extraHeadersList [list Depth 0]] -protocol 1
- Weather Animations
28 Sep 2012 — web
proc get_image { url } {
for {set i 1} {$i < 4} {incr i} {
set um [http::geturl $url -timeout [expr {1000 + $i * 3000}]]
http::wait $um
set ncode [http::ncode $um]
if
- Web Scraping with htmlparse
16 Nov 2017 — a><li>.
proc parse-list-of-links {url startNodePath} {
set documentTree [::struct::tree]
set conn [::http::geturl $url]
set html [::http::data $conn]
::http::cleanup $conn
htmlparse::2tree $html $documentTree
htmlparse::removeVisualFluff
- Web Site Status
12 Nov 2008 — get rid of it
regsub http:// $this_site "" this_site
set result [catch {set token [http::geturl http://$this_site]} msg]
# Delete any information in the text widget
.html.html_out configure
- web2desktop
30 Nov 2015 — 153.41 -proxyport 8080
#... now I can get the initial page
set html [http::data [http::geturl $target_page]]
#Image size parameters change, get the whole <IMG> first:
set url [between "<IMG
- webrobot - a package for web scraping
18 Mar 2008 — url
set max [$self cget -maxredirects]
for {set i 0} {$i <= $max} {incr i} {
lassign [$self geturl $current] code data meta
switch -glob $code {
200 { break }
30[1237] { set current [dict get
- websearch
03 Sep 2013 — search#]
upvar 0 [set search#] token
return [join [set ::websearch::$token(search_engine)::variables]]
}
proc ::websearch::GetUrl {search# url {headers ""}} {
variable [set search#]
upvar 0 [set search#] token
array set config_old
- WebServices
25 Oct 2017 — org documentation on WSDL: [http://www.w3.org/TR/wsdl]
* [Simple HTTP Authentication Wrapper for http::geturl RFC 2617]
----
[Web Service]
[Consuming web services]
----
Has anyone worked on [http://en.wikipedia.org
- WebSocket Client Library
13 Feb 2016 — to call the http library.
set cmd [list ::http::geturl $hturl]
# Control the geturl options that we can blindly pass to the
# http::geturl call. We basically remove -validate, which has no
- Why does Tcl leak memory?
20 May 2018 — is a failure to clean up such
Tcl [global%|%global variables] as the token `[http%|%http::getUrl]` return.
** Discussion **
[LV]: Is there a list of known memory leaks in either Tcl 8
- Wiki History Diff
27 Sep 2012 — set S(right) ""]
update
set url "http://wiki.tcl.tk/_history/$S(pnum)"
set token [::http::geturl $url]
set data [::http::data $token] ; list
::http::cleanup $token
set S(title) "No Wiki
- Wiki Revision History Feature via tclhist
16 Jul 2009 — operation on the server.
proc pageExists {PageNumber} {
global TclhistURL
set URL $TclhistURL/$PageNumber*
set Token [::http::geturl $URL]
set PageContents [::http::data $Token]
::http::cleanup $Token
# The page contents returned should start
- wiki-reaper
17 Nov 2017 — reaper
if {$useCurl} {
set data [exec curl -s -f -b $cookie $url]
} else {
set connection [::http::geturl $url -headers [list Cookie $cookie]]
set data [::http::data $connection]
::http::cleanup $connection
}
return $data
- wiki-runner
18 Jan 2013 — package require nstcl-http }]} {
namespace import nstcl::*
} else {
package require http
proc ns_geturl {url} {
set conn [http::geturl $url]
set html [http::data $conn]
http::cleanup $conn
return $html
}
proc ns
- WikiRun
25 Jul 2009 — length $line] > 0 && \
![string equal [string index $line 0] " "] } {
return 0
}
}
return 1
}
set tok [::http::geturl $wiki[lindex $argv 0]@]
switch [::http::status $tok] {
ok {
set data [::http::data $tok]
::http
- William Jeffrey Rankin
27 Aug 2012 — 1+"$@"}
package require http
set base_url http://antwrp.gsfc.nasa.gov/apod
set site [http::geturl $base_url/astropix.html]
set html [http::data $site]
regexp -nocase -linestop {(src="(.*)")} $html match
- Windows 95
30 Jul 2016 — single dir FAILED
==== filesystem-1.38 file normalisation with volume relative FAILED
==== http-3.13 http::geturl socket leak test FAILED
==== http-4.14 http::Event FAILED
==== winDde-3.5 DDE request
- wish-reaper
28 Oct 2017 — found." \
-type ok -parent .reaper
exit
} else {
catch {package require autoproxy}
}
proc ns_geturl {url} {
set conn [http::geturl $url]
set html [http::data $conn]
http::cleanup $conn
return $html
}
proc ns
- XML/tDOM encoding issues with the http package
27 May 2011 — DOM object of the RSS feed.
proc tmlrss::fetchXML {uri {recurse_limit 4}} {
set token [http::geturl $uri]
upvar #0 $token state
if {[http::status $token] != "ok" || [http::ncode $token] != 200} {
# was
- YouTube Playlist Downloader Frontend Interface For get-flash-videos
24 Feb 2015 — all_video_ids
set playlist_id [ lindex [ split $youtube_playlist_url "=" ] 1 ]
set http_token [ ::http::geturl "http://gdata.youtube.com/feeds/api/playlists/$playlist_id/?v=2&alt=rss" -method GET
- Zarutian's Thingy Package
06 Jan 2012 — uri
$name proc dispatch args {
variable uri
package require http 2.5.0
set token [http::geturl $uri -query "[urlEncode $args]"]
set data [http::data $token]
http::cleanup $token
if {[lindex $args