That's not how science works. The data is given and you test your idea against that. You are not allowed to 'search for data' to prove the hypothesis because that leads to bias errors.
If you start with data, and then look for patterns you can almost always find them. Whether they are predictive is what you're trying to understand.
I would also note that he didn't say 'discard data that disagrees with the hypothesis', which I think is what you're commenting on. This is as you correctly point out dangerous, and not how you science.
Karl Popper may have prescriptively described science as working in one particular fashion, but in the real world it doesn't work that way at all, when you look at what scientists actually do.
Also the hardcore Popperians will reply that many people who the mainstream considers scientists don't actually do science ;)