I want to find the last generated link in python. I can't seem to find a solution, any ideas?
Asked
Active
Viewed 91 times
2 Answers
0
Seems that the target URL is encoded in base64.
>>> from base64 import urlsafe_b64decode
>>> urlsafe_b64decode('CBMiiQFodHRwczovL3d3dy5jb3JyaWVyZS5pdC9zcG9ydC8xOV9vdHRvYnJlXzMwL3JhcGluYXRvcmktdmlsbGEtY2xhdWRpby1tYXJjaGlzaW8taW5nZW50ZS1ib3R0aW5vLTQ1YmE0YjFlLWZhZTctMTFlOS1iMWM2LWEzODFhYmJhNWQ5Zi5zaHRtbNIBjAFodHRwczovL3d3dy5jb3JyaWVyZS5pdC9zcG9ydC8xOV9vdHRvYnJlXzMwL3JhcGluYXRvcmktdmlsbGEtY2xhdWRpby1tYXJjaGlzaW8taW5nZW50ZS1ib3R0aW5vLTQ1YmE0YjFlLWZhZTctMTFlOS1iMWM2LWEzODFhYmJhNWQ5Zl9hbXAuaHRtbA==')
b'\x08\x13"\x89\x01https://www.corriere.it/sport/19_ottobre_30/rapinatori-villa-claudio-marchisio-ingente-bottino-45ba4b1e-fae7-11e9-b1c6-a381abba5d9f.shtml\xd2\x01\x8c\x01https://www.corriere.it/sport/19_ottobre_30/rapinatori-villa-claudio-marchisio-ingente-bottino-45ba4b1e-fae7-11e9-b1c6-a381abba5d9f_amp.html'

pbacterio
- 1,094
- 6
- 12
-1
Have a look at this thread: How to scrape Google News articles content from Google News RSS?
At the bottom the print the url and I think thats the value you are looking for. Hope it helps!

Fabian Bron
- 106
- 5
-
Can't really get that to work. Seems like that is helpful for a feed, while I am looking to obtain a final link, from a link. – user9927059 Oct 30 '19 at 11:12