(self, pyfile)
| 22 | NAME_PATTERN = r'<title>(?P<N>.+?) -' |
| 23 | |
| 24 | def decrypt(self, pyfile): |
| 25 | #: If we use curl as a user agent, we will get a straight redirect (no waiting!) |
| 26 | self.req.http.c.setopt(pycurl.USERAGENT, "curl/7.42.1") |
| 27 | #: Fetch the target URL |
| 28 | header = self.load(self.pyfile.url, just_header=True, decode=False) |
| 29 | target_url = header.get('location') |
| 30 | self.links.append(target_url) |