Revision 10436 trunk/src/jd/plugins/decrypter/Paste2Org.java
| Paste2Org.java (revision 10436) | ||
|---|---|---|
| 20 | 20 |
|
| 21 | 21 |
import jd.PluginWrapper; |
| 22 | 22 |
import jd.controlling.ProgressController; |
| 23 |
import jd.http.RandomUserAgent; |
|
| 23 | 24 |
import jd.parser.Regex; |
| 24 | 25 |
import jd.parser.html.HTMLParser; |
| 25 | 26 |
import jd.plugins.CryptedLink; |
| ... | ... | |
| 45 | 46 |
String id = new Regex(parameter, "followup/(\\d+)").getMatch(0); |
| 46 | 47 |
parameter = "http://paste2.org/p/" + id; |
| 47 | 48 |
} |
| 49 |
br.getHeaders().put("User-Agent", RandomUserAgent.generate());
|
|
| 48 | 50 |
br.getPage(parameter); |
| 49 | 51 |
/* Error handling */ |
| 50 | 52 |
if (br.containsHTML("Page Not Found")) throw new DecrypterException(JDL.L("plugins.decrypt.errormsg.unavailable", "Perhaps wrong URL or there are no links to add"));
|
Also available in: Unified diff