What is the equivalent of jQuery's n-th child method?What's Go's equivalent of argv[0]?Equivalent of java finalize methodwhat should be the values of GOPATH and GOROOT?What are the use(s) for tags in Go?How to convert a zero-terminated byte array to string?What is an idiomatic way of representing enums in Go?What is the idiomatic Go equivalent of C's ternary operator?how to call child method in parent method?Is there a Go equivalent of PHP's __toString method?What is equivalent of `List` of C#
Is there an in-universe explanation given to the senior Imperial Navy Officers as to why Darth Vader serves Emperor Palpatine?
Why nature prefers simultaneous events?
In Endgame, wouldn't Stark have remembered Hulk busting out of the stairwell?
Is it unusual for a math department not to have a mail/web server?
Is there a word or phrase that means "use other people's wifi or Internet service without consent"?
Coupling two 15 Amp circuit breaker for 20 Amp
What is Soda Fountain Etiquette?
Fantasy Macro Economics: What would Merfolk trade for?
Pen test results for web application include a file from a forbidden directory that is not even used or referenced
How do I portray irrational anger in first person?
What is the sound/audio equivalent of "unsightly"?
Is the internet in Madagascar faster than in UK?
Can I get a PhD for developing educational software?
How to handle inventory and story of a player leaving
Notice period 60 days but I need to join in 45 days
Why does this London Underground poster from 1924 have a Star of David atop a Christmas tree?
RAID0 instead of RAID1 or 5, is this crazy?
What should be done with the carbon when using magic to get oxygen from carbon dioxide?
Get contents before a colon
Why did Lucius make a deal out of Buckbeak hurting Draco but not about Draco being turned into a ferret?
If the UK Gov. has authority to cancel article 50 notification, why do they have to agree an extension with the EU
What ways are there to "PEEK" memory sections in (different) BASIC(s)
Did ancient peoples ever hide their treasure behind puzzles?
Does Mirrorwing Dragon's ability trigger when redirects are involved?
What is the equivalent of jQuery's n-th child method?
What's Go's equivalent of argv[0]?Equivalent of java finalize methodwhat should be the values of GOPATH and GOROOT?What are the use(s) for tags in Go?How to convert a zero-terminated byte array to string?What is an idiomatic way of representing enums in Go?What is the idiomatic Go equivalent of C's ternary operator?how to call child method in parent method?Is there a Go equivalent of PHP's __toString method?What is equivalent of `List` of C#
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I try to program a first google go program. I got this working part:
package main
import (
"fmt"
"os"
"regexp"
"github.com/PuerkitoBio/goquery"
"github.com/gocolly/colly"
)
func TrimSpaceNewlineInString(s string) string
re := regexp.MustCompile(` +n+ +t+`)
return re.ReplaceAllString(s, "")
func main()
args := os.Args[1:]
c := colly.NewCollector()
c.OnHTML("tr",
func(e *colly.HTMLElement)
ch := e.DOM.Children()
spalte1 := ch.Eq(0)
spalte2 := ch.Eq(1)
spalte1.Each(
func(_ int, s *goquery.Selection)
fmt.Print(TrimSpaceNewlineInString(s.Text()), ":", TrimSpaceNewlineInString(spalte2.Text()))
)
)
c.Visit("https://deweysearchde.pansoft.de/webdeweysearch/executeSearch.html" +
"?lastScheduleRecord=669.1-669.7&lastTableRecord=&query=" + args[0] + "&_showShortNotations=off&catalogs=DNB&_catalogs=off&catalogs=GBV&_catalogs=off&catalogs=HeBIS&_catalogs=off&catalogs=SUB&_catalogs=off&catalogs=SWB&_catalogs=off&catalogs=FUB&_catalogs=off")
But I only what to get the 2nd column, if this is in the range form [0-9.-] and if so than I would need the following 3rd column with the DDC Classification of this DOM HTMLElement talbe.
I would like to retrieve following
600;Technik
660;Chemische Verfahrenstechnik
669;Metallurgie
669.1-669.7;Metallurgie einzelner Metalle und deren Legierungen
669.1;Eisenmetalle
Can anyone here help me and tell me how it could be done with colly Colly doc for go, which is similar to jQuery?
PS: I have tried this way - with children. But the output looks like this. I do not know why.
Notation:Thema :
Haupttafeln
600:
Technik
660:
Chemische Verfahrenstechnik
661:
Industriechemikalien
661.2-661.6:
Säuren, Basen, Salze
661.5:
Ammoniumsalze
Notation:Thema :HilfstafelnT1--0:Hilfstafel 1. StandardschlüsselT2--0:Hilfstafel 2. Geo ...
go
add a comment |
I try to program a first google go program. I got this working part:
package main
import (
"fmt"
"os"
"regexp"
"github.com/PuerkitoBio/goquery"
"github.com/gocolly/colly"
)
func TrimSpaceNewlineInString(s string) string
re := regexp.MustCompile(` +n+ +t+`)
return re.ReplaceAllString(s, "")
func main()
args := os.Args[1:]
c := colly.NewCollector()
c.OnHTML("tr",
func(e *colly.HTMLElement)
ch := e.DOM.Children()
spalte1 := ch.Eq(0)
spalte2 := ch.Eq(1)
spalte1.Each(
func(_ int, s *goquery.Selection)
fmt.Print(TrimSpaceNewlineInString(s.Text()), ":", TrimSpaceNewlineInString(spalte2.Text()))
)
)
c.Visit("https://deweysearchde.pansoft.de/webdeweysearch/executeSearch.html" +
"?lastScheduleRecord=669.1-669.7&lastTableRecord=&query=" + args[0] + "&_showShortNotations=off&catalogs=DNB&_catalogs=off&catalogs=GBV&_catalogs=off&catalogs=HeBIS&_catalogs=off&catalogs=SUB&_catalogs=off&catalogs=SWB&_catalogs=off&catalogs=FUB&_catalogs=off")
But I only what to get the 2nd column, if this is in the range form [0-9.-] and if so than I would need the following 3rd column with the DDC Classification of this DOM HTMLElement talbe.
I would like to retrieve following
600;Technik
660;Chemische Verfahrenstechnik
669;Metallurgie
669.1-669.7;Metallurgie einzelner Metalle und deren Legierungen
669.1;Eisenmetalle
Can anyone here help me and tell me how it could be done with colly Colly doc for go, which is similar to jQuery?
PS: I have tried this way - with children. But the output looks like this. I do not know why.
Notation:Thema :
Haupttafeln
600:
Technik
660:
Chemische Verfahrenstechnik
661:
Industriechemikalien
661.2-661.6:
Säuren, Basen, Salze
661.5:
Ammoniumsalze
Notation:Thema :HilfstafelnT1--0:Hilfstafel 1. StandardschlüsselT2--0:Hilfstafel 2. Geo ...
go
1
a different thing came to my mind while reading your question: The Datasource you are using is under CC License with a no-derivative restriction as visible on the footer of the page. You should ask the content holder of the data if you can use the data if your derivate is publicly available.
– Lars
Mar 27 at 14:20
@Lars thanks, but I need it only for inhouse - my derivate should not be used public
– Walter Schrabmair
Mar 27 at 14:54
add a comment |
I try to program a first google go program. I got this working part:
package main
import (
"fmt"
"os"
"regexp"
"github.com/PuerkitoBio/goquery"
"github.com/gocolly/colly"
)
func TrimSpaceNewlineInString(s string) string
re := regexp.MustCompile(` +n+ +t+`)
return re.ReplaceAllString(s, "")
func main()
args := os.Args[1:]
c := colly.NewCollector()
c.OnHTML("tr",
func(e *colly.HTMLElement)
ch := e.DOM.Children()
spalte1 := ch.Eq(0)
spalte2 := ch.Eq(1)
spalte1.Each(
func(_ int, s *goquery.Selection)
fmt.Print(TrimSpaceNewlineInString(s.Text()), ":", TrimSpaceNewlineInString(spalte2.Text()))
)
)
c.Visit("https://deweysearchde.pansoft.de/webdeweysearch/executeSearch.html" +
"?lastScheduleRecord=669.1-669.7&lastTableRecord=&query=" + args[0] + "&_showShortNotations=off&catalogs=DNB&_catalogs=off&catalogs=GBV&_catalogs=off&catalogs=HeBIS&_catalogs=off&catalogs=SUB&_catalogs=off&catalogs=SWB&_catalogs=off&catalogs=FUB&_catalogs=off")
But I only what to get the 2nd column, if this is in the range form [0-9.-] and if so than I would need the following 3rd column with the DDC Classification of this DOM HTMLElement talbe.
I would like to retrieve following
600;Technik
660;Chemische Verfahrenstechnik
669;Metallurgie
669.1-669.7;Metallurgie einzelner Metalle und deren Legierungen
669.1;Eisenmetalle
Can anyone here help me and tell me how it could be done with colly Colly doc for go, which is similar to jQuery?
PS: I have tried this way - with children. But the output looks like this. I do not know why.
Notation:Thema :
Haupttafeln
600:
Technik
660:
Chemische Verfahrenstechnik
661:
Industriechemikalien
661.2-661.6:
Säuren, Basen, Salze
661.5:
Ammoniumsalze
Notation:Thema :HilfstafelnT1--0:Hilfstafel 1. StandardschlüsselT2--0:Hilfstafel 2. Geo ...
go
I try to program a first google go program. I got this working part:
package main
import (
"fmt"
"os"
"regexp"
"github.com/PuerkitoBio/goquery"
"github.com/gocolly/colly"
)
func TrimSpaceNewlineInString(s string) string
re := regexp.MustCompile(` +n+ +t+`)
return re.ReplaceAllString(s, "")
func main()
args := os.Args[1:]
c := colly.NewCollector()
c.OnHTML("tr",
func(e *colly.HTMLElement)
ch := e.DOM.Children()
spalte1 := ch.Eq(0)
spalte2 := ch.Eq(1)
spalte1.Each(
func(_ int, s *goquery.Selection)
fmt.Print(TrimSpaceNewlineInString(s.Text()), ":", TrimSpaceNewlineInString(spalte2.Text()))
)
)
c.Visit("https://deweysearchde.pansoft.de/webdeweysearch/executeSearch.html" +
"?lastScheduleRecord=669.1-669.7&lastTableRecord=&query=" + args[0] + "&_showShortNotations=off&catalogs=DNB&_catalogs=off&catalogs=GBV&_catalogs=off&catalogs=HeBIS&_catalogs=off&catalogs=SUB&_catalogs=off&catalogs=SWB&_catalogs=off&catalogs=FUB&_catalogs=off")
But I only what to get the 2nd column, if this is in the range form [0-9.-] and if so than I would need the following 3rd column with the DDC Classification of this DOM HTMLElement talbe.
I would like to retrieve following
600;Technik
660;Chemische Verfahrenstechnik
669;Metallurgie
669.1-669.7;Metallurgie einzelner Metalle und deren Legierungen
669.1;Eisenmetalle
Can anyone here help me and tell me how it could be done with colly Colly doc for go, which is similar to jQuery?
PS: I have tried this way - with children. But the output looks like this. I do not know why.
Notation:Thema :
Haupttafeln
600:
Technik
660:
Chemische Verfahrenstechnik
661:
Industriechemikalien
661.2-661.6:
Säuren, Basen, Salze
661.5:
Ammoniumsalze
Notation:Thema :HilfstafelnT1--0:Hilfstafel 1. StandardschlüsselT2--0:Hilfstafel 2. Geo ...
go
go
edited Mar 27 at 21:20
devdotlog
7986 silver badges16 bronze badges
7986 silver badges16 bronze badges
asked Mar 27 at 12:46
Walter SchrabmairWalter Schrabmair
4571 gold badge6 silver badges18 bronze badges
4571 gold badge6 silver badges18 bronze badges
1
a different thing came to my mind while reading your question: The Datasource you are using is under CC License with a no-derivative restriction as visible on the footer of the page. You should ask the content holder of the data if you can use the data if your derivate is publicly available.
– Lars
Mar 27 at 14:20
@Lars thanks, but I need it only for inhouse - my derivate should not be used public
– Walter Schrabmair
Mar 27 at 14:54
add a comment |
1
a different thing came to my mind while reading your question: The Datasource you are using is under CC License with a no-derivative restriction as visible on the footer of the page. You should ask the content holder of the data if you can use the data if your derivate is publicly available.
– Lars
Mar 27 at 14:20
@Lars thanks, but I need it only for inhouse - my derivate should not be used public
– Walter Schrabmair
Mar 27 at 14:54
1
1
a different thing came to my mind while reading your question: The Datasource you are using is under CC License with a no-derivative restriction as visible on the footer of the page. You should ask the content holder of the data if you can use the data if your derivate is publicly available.
– Lars
Mar 27 at 14:20
a different thing came to my mind while reading your question: The Datasource you are using is under CC License with a no-derivative restriction as visible on the footer of the page. You should ask the content holder of the data if you can use the data if your derivate is publicly available.
– Lars
Mar 27 at 14:20
@Lars thanks, but I need it only for inhouse - my derivate should not be used public
– Walter Schrabmair
Mar 27 at 14:54
@Lars thanks, but I need it only for inhouse - my derivate should not be used public
– Walter Schrabmair
Mar 27 at 14:54
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377567%2fwhat-is-the-equivalent-of-jquerys-n-th-child-method%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377567%2fwhat-is-the-equivalent-of-jquerys-n-th-child-method%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
a different thing came to my mind while reading your question: The Datasource you are using is under CC License with a no-derivative restriction as visible on the footer of the page. You should ask the content holder of the data if you can use the data if your derivate is publicly available.
– Lars
Mar 27 at 14:20
@Lars thanks, but I need it only for inhouse - my derivate should not be used public
– Walter Schrabmair
Mar 27 at 14:54