Last active
November 9, 2020 11:35
-
-
Save Adem68/24081020a51b4893c353534026c01f43 to your computer and use it in GitHub Desktop.
Amatör Telsizcilik Sınav Giriş Belgesi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from base64 import b64decode | |
import requests | |
def main(): | |
doc_number = int(input('Lütfen başvuru numaranızı giriniz: ')) | |
identity_number = int(input('Lütfen tc kimlik numaranızı giriniz: ')) | |
url = 'http://kiyiemniyeti.gov.tr/Ajax/GetRecourseAmateurDet?Id={}&IdentityNumber={}&ReferanceStatus=2'.format( | |
doc_number, identity_number) | |
res = requests.post(url).json() | |
bytes = b64decode(res, validate=True) | |
if bytes[0:4] != b'%PDF': | |
raise ValueError('Missing the PDF file signature') | |
f = open('Amator-Telsizcilik-Sinav-Giris-Belgesi.pdf', 'wb') | |
f.write(bytes) | |
f.close() | |
print('Amatör Telsizcilik e-Sınav Giriş Belgeniz başarıyla indirildi.') | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment