I note that you've had no responses, so, a few suggestions:
You report that
yum "Can't find a valid . . ." but neglect to mention any preceding messages (if any). Nor do you tell what you've tried. (For example, do you get a similar message if you do a
yum --disablerepo=extras?)
Then you say that "browsers aren't working," but neglect to tell us what messages (if any) you got from the browsers, nor do you mention which browsers you tried.
Finally, you mention that "ping works," but, again, you don't tell us what addresses you used for
ping. (For example, a
ping -c 2 127.0.0.1 would only tell you that your network services were running on your local host, while a
ping -c 2 www.w3c.org would tell you that your network was running, you were connected to the Internet, and that DNS was working. In other words,
the details matter, and, lacking the specific details, it's hard to respond.
All that being said, I
suspect that your DNS settings are not correct, or that your network DHCP lookup failed. But, even if this were true, you have not provided sufficient information for anyone to be able to suggest a remedy.