Questions tagged [pup]

pup is a command-line tool for processing HTML.

pup is a command-line tool for processing HTML. It reads from stdin, prints to stdout, and allows the user to filter parts of the page using CSS selectors. See https://github.com/ericchiang/pup

13 questions
2
votes
1 answer

How to select value from the next row via pup?

Given the following table:
Foo Bar Buzz
1 2 3
4 5 6
Assuming I don't…
kenorb
  • 155,785
  • 88
  • 678
  • 743
2
votes
1 answer

Is it possible to define a HTML selector that concatenates multiple selectors and separates them by semicolon?

I'm trying to parse a simple HTML page with pup. This is a command-line HTML parser and it accepts general HTML selectors. I want to select: 'div.aclass text{}' #(would be SampleA) and I also want to select: 'div.bclass text{}' #(would be…
Daniel
  • 2,318
  • 2
  • 22
  • 53
2
votes
1 answer

How to limit the number of results at the tag level using pup?

In brief: Is there a way using pup to limit the number of results not overall, but at the tag level? Backstory/use-case: Ever since I learned about pup I've been obsessed. I'm constantly thinking of new use cases. This morning I wanted to use it to…
1
vote
2 answers

Bash + Pup printing only attribute

I'm wgeting a webpage src code then using pup to grab the tag that I need. Now I want to print only the value of the content field. In this case, the output I want is: https://example.com/my/folder/first.jpg?foo=bar # wget page to…
John Smith
  • 31
  • 1
  • 5
1
vote
2 answers

I can't use get package on flutter

I clone this app from github and when i try to get packages to it it gave me that error Because my_flutter_ui_challenges depends on fluttery_seekbar any which doesn't exist (could not find package fluttery_seekbar at https://pub.dartlang.org),…
1
vote
1 answer

Find all HTML files in a set of folders, extract specific HTML content and save content to new files

I have a folder structure containing thousands of HTML files that I'd like to cleanup and convert to markdown using pandoc, but keep in the exisiting structure (or mirror the structure). I've currently managed to locate all HTML files using find,…
1
vote
0 answers

PUP.HighConfidence While Building APK with Unity3D

I am using latest version of Unity in Mac. And the android apk built from it gave PUP.HighConfidence, virus flaged on virustotal.com. I do not know the actual reason about this problem. I have faced similar problem on Windows 7 and Windows 10. Can…
Pankti Shah
  • 337
  • 6
  • 20
1
vote
1 answer

VB,NET program marked as PUP by McAfee

I've been delivering new versions of our VB.NET program to our clients via FTP for many years. Now one of the programs get stopped by the clients McAfee antivirus witch claims it to be a PUP (Potentially Unwanted Program) The only change from the…
POE
  • 31
  • 2
0
votes
0 answers

Pupetter Evaluate page.evaluate

I'm having trouble with the pupetter evaluate function. Im declaring a variable outside the function and pass it through. Inside the function it does not work and just makes it undefinied. Any help is apreciated! let fname =…
Bmoney
  • 11
  • 1
0
votes
1 answer

Flutter : The getter 'Pestawait' isn't defined for the class 'RetryOptions'

I try to implement an app. And I run it several times with no errors. But without any reason, and after a day I try to run my app, I got the below error, and I try to find a solution for id but I did not find anything. So can someone provide me how…
Ahmad Mohy
  • 391
  • 2
  • 6
  • 18
0
votes
2 answers

How to extract video urls and titles from OK.ru/video using the CLI

EDIT 1: I'd like to extract video urls and titles from "https://ok.ru/video/c1404844" results using the CLI. Here's want I've done so far : The ERE pattern for each video relative URL is : /video/\d+ and the video absolute URL looks like this :…
SebMa
  • 4,037
  • 29
  • 39
0
votes
1 answer

How to get all the results from a web page just as the browser shows when finished scrolling down

I'm trying to get all the video results from a web page : $ curl -qs https://ok.ru/video/c335170 | pup '.video-card_lk attr{href}' | wc -l 24 Another method returns the same result : $ wget --config="/dev/null" -qO- https://ok.ru/video/c335170 |…
SebMa
  • 4,037
  • 29
  • 39
-1
votes
2 answers

Converting an array of objects into an array

I am trying to convert the "count" key from each object within the test array into a new array so I end up with something like newCount =[0,0,0,0] const test = [ { id: 0, count: 0, image: "", text: 'Some text…