Questions tagged [goquery]

A little like that j-thing, only in Go.

A little like that j-thing, only in Go. https://github.com/PuerkitoBio/goquery

76 questions
0
votes
1 answer

How to do goquery selection based on multiple attributes

How do we scrape the text of a below div tag using goquery
text
I tried with the below selection logic, but it didn't work divtag := doc.Find("div[class='class_1' attr='attr_1']") I couldn't find example for…
vignesh
  • 498
  • 8
  • 18
0
votes
0 answers

Golang scan db rows to json of string and array

I am trying to get the output from DB using an inner join with 3 tables say Table A and B. Output Struct type C struct { A A `json:"A"` B B `json:"B"` SecID int64 `json:"section_id"` SecName …
aakash singh
  • 267
  • 5
  • 19
0
votes
1 answer

Golang use array values in db query to filter records

I have list of array int64 values ids = [{1} {2} {3}] I want to use the above array in db query to filter out the records where ID is not in above ids. SELECT * from table where id not in (1,2,3); I tried many ways to do but failing to make the…
aakash singh
  • 267
  • 5
  • 19
0
votes
1 answer

goquery returning value to stdout but not printing the same to file

I need to scrape a website where the tag i'm interested into is: currently I am doing the job (goquery) with this code snippet: …
0
votes
0 answers

Scrape web with "Load more" articles using goquery

I have built a web scraper using goquery. However it can only retrieve the metadata of the first 14 or 15 articles, since the remaining articles can only be seen after manually clicking on a "Load more" button. The new articles are not loaded…
Mydrive1997
  • 49
  • 1
  • 6
0
votes
1 answer

Parse td in golang using goquery grep only the require line

I get output from an ajax request as below:
These results were cached from March 10, 2021, 1:11 pm PST to conserve server resources.
If you are diagnosing a certificate…
KATHAN PATEL
  • 103
  • 6
0
votes
0 answers

Confused with GoQuery

I'm making a bot that will store posts on Reddit that have more than 1000 upvotes. I intend to store the links and the urls. I'm having trouble in finding a way to match the links/urls of the posts that have more than 1000 upvotes, I'm using the…
danibrum
  • 459
  • 8
  • 21
0
votes
1 answer

How to find an element with certain id with goquery

I need to find get elements of the table with goquery like I do it jquery way: $("#ctl00_cphBody_gvDebtors").find("td").each(function(index){ if(index != 0){ console.log($.trim($(this).text())) }}); I'm getting a response via…
Sergey Popov
  • 1
  • 1
  • 3
0
votes
1 answer

GoLang WebCrawling remove empty tags

I am trying to crawl web, and few cases my HTML looks like this and includes \n & \t.


\n

\n\t

How would I remove tags in some cases I have \n or \t I need to…
Sankalp
  • 1,300
  • 5
  • 28
  • 52
0
votes
1 answer

How to extract the text of a custom html tag with goquery?

I am trying to extract the text a custom html tag (): someHtml := `Login Successful!