Skip to content

Instantly share code, notes, and snippets.

@Adem68
Last active November 9, 2020 11:35
Show Gist options
  • Save Adem68/24081020a51b4893c353534026c01f43 to your computer and use it in GitHub Desktop.
Save Adem68/24081020a51b4893c353534026c01f43 to your computer and use it in GitHub Desktop.
Amatör Telsizcilik Sınav Giriş Belgesi
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