If the site has an API, use that instead. Scraping text from a website is pretty nearly guaranteed to fail eventually, because active sites tend to change their HTML around a whole lot.

If the ID is truly unique for the page, that would be ideal. It really should be, but it doesn't necessarily have to be. If it IS unique, then you can look for the element with that ID. You might give that a try first by looking to see how many matches you get on "thepaste", or 'id="thepaste"'. If you have only one match, that's great.