Sponsored Content
Full Discussion: Curl getting html tags
Top Forums Shell Programming and Scripting Curl getting html tags Post 302339253 by aliahsan81 on Thursday 30th of July 2009 06:19:38 AM
Old 07-30-2009
Its not working see.
Code:
curl -i -L www.google.com
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=74fd4a23865c9ff4:TM=1248948511:LM=1248948511:S=bEeUX29ZRqM_haw6; expires=Sat, 30-Jul-2011 10:08:31 GMT; path=/; domain=.google.com
Date: Thu, 30 Jul 2009 10:08:31 GMT
Server: gws
Content-Length: 222

HTTP/1.1 200 OK
Date: Thu, 30 Jul 2009 10:08:32 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=de293263683c9781:TM=1248948512:LM=1248948512:S=Z5H05j-jE0eh6N3s; expires=Sat, 30-Jul-2011 10:08:32 GMT; path=/; domain=.google.com.pk
Server: gws
Transfer-Encoding: chunked

<!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Google</title><script>window.google={kEI:"IHFxSuKME4KMwgOFjt2sDA",kEXPI:"17259,20760,21311,21341",kCSIE:"17259,20760,21311,21341",kCSI:{e:"17259,20760,21311,21341",ei:"IHFxSuKME4KMwgOFjt2sDA"},kHL:"en"};

window.google.sn="webhp";window.google.timers={load:{t:{start:(new Date).getTime()}}};try{window.google.pt=window.gtbExternal&&window.gtbExternal.pageT()||window.external&&window.external.pageT}catch(b){}
window.google.jsrt_kill=1;
var _gjwl=location;function _gjuc(){var e=_gjwl.href.inde

 

10 More Discussions You Might Find Interesting

1. Solaris

Automated replacement of HTML Tags

Hi All, I use a utility to generate a xml file....which looks something as follows <xml> <name>some name</name> <value>some value</value> <machine>rocker</machine> </xml> I would like to run a KSH script which will replace this machine tag value 'rocker' to say 'docker'. I would like... (1 Reply)
Discussion started by: nem_kirk
1 Replies

2. Shell Programming and Scripting

html tags

hi new to the forum so hi every one hope you all well, Iam attempting to write a bash script at the moment its a scraper/grabber using wget to download webpages related to the users query. that part is no probs when i have the page i need to stipr all the useless (to me) data out of the html... (3 Replies)
Discussion started by: dunryc
3 Replies

3. Shell Programming and Scripting

Remove html tags with bash

Hello, is there a way to go through a file and remove certain html tags with bash? If it needs sed or awk, that'll do too. The reason why I want this is, because I have a monitor script which generates a logfile in HTML and every time it generates a logfile, the tags are reproduced. The tags... (4 Replies)
Discussion started by: dejavu88
4 Replies

4. Shell Programming and Scripting

script to output curl result as html

hi, new to scripting and would like to know how can I have a script which will curl a few URLs and have the results such as the URLs being curled, dns lookup time, connection time, total time, etc save in a html format in a form of table with column and rows. thank you. (4 Replies)
Discussion started by: squidusr
4 Replies

5. Shell Programming and Scripting

Grabbin a html code from a page (Var = Curl)

Hi there. Im not very good on shell yet. This line, will print me YES or NO in console. Its the HTML code returned from the website, simply YES or NO curl -L "http://www.thewebsite.net/auth/log.jsp?user=$user&sessionId=$sid&serverId=$hash" How could i save this into a variable, so i... (1 Reply)
Discussion started by: Ziden
1 Replies

6. UNIX for Advanced & Expert Users

Removing HTML tags

Hello Unix Gurus I am having a problem with one of the files that i am generating using a Unix Script. This Unix Scripts connects to the MY SQL Server and loads the data into a Text file. While generating the Text file for one of the tables the value in one of the column is as follows. <p>... (3 Replies)
Discussion started by: chetan.mudike
3 Replies

7. Shell Programming and Scripting

Parsing HTML, get text between 2 HTML tags

Hi there, I'm quite new to the forum and shell scripting. I want to filter out the "166.0 points". The results, that i found in google / the forum search didn't helped me :( <a href="/user/test" class="headitem menu" style="color:rgb(83,186,224);">test</a><a href="/points" class="headitem... (1 Reply)
Discussion started by: Mysthik
1 Replies

8. Shell Programming and Scripting

Remove html tags with particular string inside the tags

Could someone, please provide a solution to the following: I would like to remove some tags from the "head" of multiple html documents across the web site. They look like <link rel="alternate" type="application/rss+xml" title="Business and Investment in the Philippines"... (2 Replies)
Discussion started by: georgi58
2 Replies

9. Shell Programming and Scripting

Removing html tags

I store different variance of the below in an xml file. and apparently, xml has an issue loading up data like this because it contains html tags. i would like to preserve this data as it is, but unfortunately, xml says i cant. so i have to strip out all the html tags. the examples i found... (9 Replies)
Discussion started by: SkySmart
9 Replies

10. Shell Programming and Scripting

Removing all except couple of html tags from html file

I tried to find elegant (or at least simple) way to remove all but couple of html tags from html file, but all examples I found dealt with removing all the tags. The logic of the script would be: - if there is <li> or <ul> on the line, do nothing (=write same line to output) - if there is:... (0 Replies)
Discussion started by: juubuntu
0 Replies
CURLINFO_PROTOCOL(3)					     curl_easy_getinfo options					      CURLINFO_PROTOCOL(3)

NAME
CURLINFO_PROTOCOL - get the protocol used in the connection SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROTOCOL, long *p); DESCRIPTION
Pass a pointer to a long to receive the version used in the last http connection. The returned value will be one of the CURLPROTO_* val- ues. PROTOCOLS
All EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); if(res == CURLE_OK) { long protocol; curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); } curl_easy_cleanup(curl); } AVAILABILITY
Added in 7.52.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLINFO_RESPONSE_CODE(3), curl_easy_getinfo(3), curl_easy_setopt(3), libcurl 7.54.0 November 23, 2016 CURLINFO_PROTOCOL(3)
All times are GMT -4. The time now is 02:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy