Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attr{attrkey} is not working #6

Closed
lostinroom opened this issue Sep 15, 2014 · 7 comments
Closed

attr{attrkey} is not working #6

lostinroom opened this issue Sep 15, 2014 · 7 comments

Comments

@lostinroom
Copy link

I try your example.
curl http://www.pro-football-reference.com/years/2013/games.htm | pup table#games 'a[href_=boxscores]'
It gives me a result.
However, if I use curl http://www.pro-football-reference.com/years/2013/games.htm | pup table#games 'a[href_=boxscores]' attr{href}, it returns empty.

I use https://github.com/EricChiang/pup/releases/download/0.1.1/pup_linux_386 to execute it.

Thanks

@ericchiang
Copy link
Owner

What version of linux are you using? This works fine for me:

https://gist.github.com/EricChiang/490b2b5aa6d73529348b

@lostinroom
Copy link
Author

Thanks for quick response.

This is the result of uname -a
Linux machine1 3.7.10-bgrml64w-09 #1 SMP Mon Oct 21 08:00:02 CDT 2013 x86_64 GNU/Linux

This is the result of lsb_release -a
Distributor ID: Debian
Description: Debian GNU/Linux 7.5 (wheezy)
Release: 7.5
Codename: wheezy

@ericchiang
Copy link
Owner

Ran my Dockerfile with FROM debian:wheezy and everything worked :(

Don't know what other advice I can offer but I'd mess with pup a little more and see if you can get other examples to break. If you can give me something more to work with I'd be happy to take a look at it.

@jimmyfrasche
Copy link

Do you have a file in that directory called attrhref? Your shell could be
doing some rewriting.

@ericchiang
Copy link
Owner

Having a file doesn't effect the output:
https://gist.github.com/EricChiang/490b2b5aa6d73529348b#file-dockerfile2

Try using 'attr{href}' (with single quotes around it). It'll prevent your shell from interpreting it funny.

@lostinroom
Copy link
Author

Hi,
You are right. It works either I add single quote 'attr{href}' or add slash to curly bracket. attr{href}.

Thanks for your help.

@ericchiang
Copy link
Owner

👍 awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants