{"componentChunkName":"component---src-gatsby-theme-try-ghost-templates-post-js","path":"/what-are-prime-numbers/","result":{"data":{"customPost":{"id":"Ghost__Post__62dc5a284e918d05f3537766","title":"What are Prime Numbers?","slug":"what-are-prime-numbers","featured":false,"feature_image":"https://backend.shahednasser.com/content/images/2022/07/What-are-Prime-Numbers.jpg","excerpt":"Prime numbers, by definition, are integers that could not be decomposed into two new numbers.","custom_excerpt":"Prime numbers, by definition, are integers that could not be decomposed into two new numbers.","visibility":"public","created_at_pretty":"23 Jul 2022","published_at_pretty":"23 Jul 2022","updated_at_pretty":"23 Jul 2022","created_at":"2022-07-23T20:29:28.000+00:00","published_at":"2022-07-23T20:32:09.000+00:00","updated_at":"2022-07-23T20:32:09.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"mohammad.jpg","publicURL":"/static/235d4863c99d493a85a384089d2bd383/mohammad.jpg","imageMeta":{"width":851,"height":956},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAWABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAUDAQb/xAAVAQEBAAAAAAAAAAAAAAAAAAABAP/aAAwDAQACEAMQAAABty9ZY+iTVYTxOBP/xAAcEAACAgIDAAAAAAAAAAAAAAABAgADBBIRExT/2gAIAQEAAQUCscVp7G2hezjtAbdzMhiZewJE/8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAEDAQE/ASN//8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAECAQE/AWd//8QAHxAAAgECBwAAAAAAAAAAAAAAAAERECECAyIxQVFh/9oACAEBAAY/AnifBfJcUuhNJSbj8ZpUd0//xAAdEAEAAwABBQAAAAAAAAAAAAABABExIVFhcZHB/9oACAEBAAE/IbA66JQQDa3mX2mVJtVDxJ2k3HrCUNfGDeYlqcif/9oADAMBAAIAAwAAABBHzz3/xAAXEQEBAQEAAAAAAAAAAAAAAAARAQAQ/9oACAEDAQE/EJA3LPP/xAAYEQACAwAAAAAAAAAAAAAAAAAAARARYf/aAAgBAgEBPxDBUUf/xAAeEAEAAgMAAgMAAAAAAAAAAAABABEhMUFRYXGBkf/aAAgBAQABPxAaFVg2qtAfbEAIJzFtaqOUWxtoU1mHsBUyb21b8TSKPpUSm+XTj9gUpVAFsGscgRd/LP/Z","aspectRatio":0.9032258064516129,"src":"/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg","srcSet":"/static/235d4863c99d493a85a384089d2bd383/f340b/mohammad.jpg 28w,\n/static/235d4863c99d493a85a384089d2bd383/22d64/mohammad.jpg 55w,\n/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg 110w,\n/static/235d4863c99d493a85a384089d2bd383/aa249/mohammad.jpg 165w,\n/static/235d4863c99d493a85a384089d2bd383/0dc33/mohammad.jpg 220w,\n/static/235d4863c99d493a85a384089d2bd383/3abfd/mohammad.jpg 851w","srcWebp":"/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp","srcSetWebp":"/static/235d4863c99d493a85a384089d2bd383/59cda/mohammad.webp 28w,\n/static/235d4863c99d493a85a384089d2bd383/7da75/mohammad.webp 55w,\n/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp 110w,\n/static/235d4863c99d493a85a384089d2bd383/f282e/mohammad.webp 165w,\n/static/235d4863c99d493a85a384089d2bd383/a7b21/mohammad.webp 220w,\n/static/235d4863c99d493a85a384089d2bd383/c1cbf/mohammad.webp 851w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"Prime numbers, by definition, are integers that could not be decomposed into two new numbers. In Number theory, a prime number P is an integer that has just two divisors: 1 and P. There is no known sequence in mathematics that could describe the chain of prime numbers.\n\nA long period ago, Mathematicians had a lot of challenges to prove that a number is prime. Moreover, a mathematician now could do new research that could be published in great journals just if he found a new prime number! The largest known prime number till now (May 2022) is the number 2^{82,589,933 }− 1, which has 24,862,048 digits!\n\nSo, what is the magic in prime numbers?! And why are mathematicians interested in it?! The answer is in the following theorem in Number theory, which says that \"Any integer n could write as a product of the power of prime numbers\".\n\nFor example 4=2x2, 6=2x3, 8=2^3, and 9=3^2, with 2 and 3 being primes. What does that mean? This means that if you want to prove any theorem in the whole set of integers, it is enough to prove it on the set of prime numbers since all numbers could return to the power of prime numbers.\n\nAlthough there are some theorems that could provide a way to approximate the number of prime numbers less than or equal to a given number n (The prime number theorem for example), we still have a lot of research to do in this part of the field of Number theory.\n\nMathematicians will never stop trying to find a way to test a number if it is prime or not, could it possible?","html":"<p>Prime numbers, by definition, are integers that could not be decomposed into two new numbers. In Number theory, a prime number P is an integer that has just two divisors: 1 and P. There is no known sequence in mathematics that could describe the chain of prime numbers.</p><p>A long period ago, Mathematicians had a lot of challenges to prove that a number is prime. Moreover, a mathematician now could do new research that could be published in great journals just if he found a new prime number! The largest known prime number till now (May 2022) is the number 2^{82,589,933 }− 1, which has 24,862,048 digits!</p><p>So, what is the magic in prime numbers?! And why are mathematicians interested in it?! The answer is in the following theorem in Number theory, which says that \"Any integer n could write as a product of the power of prime numbers\". </p><p>For example 4=2x2, 6=2x3, 8=2^3, and 9=3^2, with 2 and 3 being primes. What does that mean? This means that if you want to prove any theorem in the whole set of integers, it is enough to prove it on the set of prime numbers since all numbers could return to the power of prime numbers.</p><p>Although there are some theorems that could provide a way to approximate the number of prime numbers less than or equal to a given number n (The prime number theorem for example), we still have a lot of research to do in this part of the field of Number theory.</p><p>Mathematicians will never stop trying to find a way to test a number if it is prime or not, could it possible?</p>","url":"https://backend.shahednasser.com/what-are-prime-numbers/","canonical_url":null,"uuid":"d0795554-8c35-4ea8-b53a-a66362da6e22","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"62dc5a284e918d05f3537766","reading_time":1,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>Prime numbers, by definition, are integers that could not be decomposed into two new numbers. In Number theory, a prime number P is an integer that has just two divisors: 1 and P. There is no known sequence in mathematics that could describe the chain of prime numbers.</p><p>A long period ago, Mathematicians had a lot of challenges to prove that a number is prime. Moreover, a mathematician now could do new research that could be published in great journals just if he found a new prime number! The largest known prime number till now (May 2022) is the number 2^{82,589,933 }− 1, which has 24,862,048 digits!</p><p>So, what is the magic in prime numbers?! And why are mathematicians interested in it?! The answer is in the following theorem in Number theory, which says that \"Any integer n could write as a product of the power of prime numbers\". </p><p>For example 4=2x2, 6=2x3, 8=2^3, and 9=3^2, with 2 and 3 being primes. What does that mean? This means that if you want to prove any theorem in the whole set of integers, it is enough to prove it on the set of prime numbers since all numbers could return to the power of prime numbers.</p><p>Although there are some theorems that could provide a way to approximate the number of prime numbers less than or equal to a given number n (The prime number theorem for example), we still have a lot of research to do in this part of the field of Number theory.</p><p>Mathematicians will never stop trying to find a way to test a number if it is prime or not, could it possible?</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Prime numbers, by definition, are integers that could not be decomposed into two new numbers. In Number theory, a prime number P is an integer that has just two divisors: 1 and P. There is no known sequence in mathematics that could describe the chain of prime numbers."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A long period ago, Mathematicians had a lot of challenges to prove that a number is prime. Moreover, a mathematician now could do new research that could be published in great journals just if he found a new prime number! The largest known prime number till now (May 2022) is the number 2^{82,589,933 }− 1, which has 24,862,048 digits!"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So, what is the magic in prime numbers?! And why are mathematicians interested in it?! The answer is in the following theorem in Number theory, which says that \"Any integer n could write as a product of the power of prime numbers\". "}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For example 4=2x2, 6=2x3, 8=2^3, and 9=3^2, with 2 and 3 being primes. What does that mean? This means that if you want to prove any theorem in the whole set of integers, it is enough to prove it on the set of prime numbers since all numbers could return to the power of prime numbers."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Although there are some theorems that could provide a way to approximate the number of prime numbers less than or equal to a given number n (The prime number theorem for example), we still have a lot of research to do in this part of the field of Number theory."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Mathematicians will never stop trying to find a way to test a number if it is prime or not, could it possible?"}]}],"data":{"quirksMode":false}},"tableOfContents":[]},"featureImageSharp":{"base":"What-are-Prime-Numbers.jpg","publicURL":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/What-are-Prime-Numbers.jpg","imageMeta":{"width":1560,"height":876},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAIF/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB3VAD/8QAFhABAQEAAAAAAAAAAAAAAAAAEQAg/9oACAEBAAEFAmc//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFxAAAwEAAAAAAAAAAAAAAAAAAAExIP/aAAgBAQAGPwKMjz//xAAVEAEBAAAAAAAAAAAAAAAAAAAgMf/aAAgBAQABPyGkD//aAAwDAQACAAMAAAAQIw//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAbEAEBAAEFAAAAAAAAAAAAAAABEaEAICFB0f/aAAgBAQABPxBYi07hznQ6GI92/wD/2Q==","aspectRatio":1.7808219178082192,"src":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/d5c54/What-are-Prime-Numbers.jpg","srcSet":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/65d8c/What-are-Prime-Numbers.jpg 260w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/c5f21/What-are-Prime-Numbers.jpg 520w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/d5c54/What-are-Prime-Numbers.jpg 1040w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/81a53/What-are-Prime-Numbers.jpg 1560w","srcWebp":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/e4875/What-are-Prime-Numbers.webp","srcSetWebp":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/dc8f3/What-are-Prime-Numbers.webp 260w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/2db4b/What-are-Prime-Numbers.webp 520w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/e4875/What-are-Prime-Numbers.webp 1040w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/f5845/What-are-Prime-Numbers.webp 1560w","sizes":"(max-width: 1040px) 100vw, 1040px"}}}},"ghostPost":{"id":"Ghost__Post__62dc5a284e918d05f3537766","title":"What are Prime Numbers?","slug":"what-are-prime-numbers","featured":false,"feature_image":"https://backend.shahednasser.com/content/images/2022/07/What-are-Prime-Numbers.jpg","excerpt":"Prime numbers, by definition, are integers that could not be decomposed into two new numbers.","custom_excerpt":"Prime numbers, by definition, are integers that could not be decomposed into two new numbers.","visibility":"public","created_at_pretty":"23 Jul 2022","published_at_pretty":"23 Jul 2022","updated_at_pretty":"23 Jul 2022","created_at":"2022-07-23T20:29:28.000+00:00","published_at":"2022-07-23T20:32:09.000+00:00","updated_at":"2022-07-23T20:32:09.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"mohammad.jpg","publicURL":"/static/235d4863c99d493a85a384089d2bd383/mohammad.jpg","imageMeta":{"width":851,"height":956},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAWABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAUDAQb/xAAVAQEBAAAAAAAAAAAAAAAAAAABAP/aAAwDAQACEAMQAAABty9ZY+iTVYTxOBP/xAAcEAACAgIDAAAAAAAAAAAAAAABAgADBBIRExT/2gAIAQEAAQUCscVp7G2hezjtAbdzMhiZewJE/8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAEDAQE/ASN//8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAECAQE/AWd//8QAHxAAAgECBwAAAAAAAAAAAAAAAAERECECAyIxQVFh/9oACAEBAAY/AnifBfJcUuhNJSbj8ZpUd0//xAAdEAEAAwABBQAAAAAAAAAAAAABABExIVFhcZHB/9oACAEBAAE/IbA66JQQDa3mX2mVJtVDxJ2k3HrCUNfGDeYlqcif/9oADAMBAAIAAwAAABBHzz3/xAAXEQEBAQEAAAAAAAAAAAAAAAARAQAQ/9oACAEDAQE/EJA3LPP/xAAYEQACAwAAAAAAAAAAAAAAAAAAARARYf/aAAgBAgEBPxDBUUf/xAAeEAEAAgMAAgMAAAAAAAAAAAABABEhMUFRYXGBkf/aAAgBAQABPxAaFVg2qtAfbEAIJzFtaqOUWxtoU1mHsBUyb21b8TSKPpUSm+XTj9gUpVAFsGscgRd/LP/Z","aspectRatio":0.9032258064516129,"src":"/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg","srcSet":"/static/235d4863c99d493a85a384089d2bd383/f340b/mohammad.jpg 28w,\n/static/235d4863c99d493a85a384089d2bd383/22d64/mohammad.jpg 55w,\n/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg 110w,\n/static/235d4863c99d493a85a384089d2bd383/aa249/mohammad.jpg 165w,\n/static/235d4863c99d493a85a384089d2bd383/0dc33/mohammad.jpg 220w,\n/static/235d4863c99d493a85a384089d2bd383/3abfd/mohammad.jpg 851w","srcWebp":"/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp","srcSetWebp":"/static/235d4863c99d493a85a384089d2bd383/59cda/mohammad.webp 28w,\n/static/235d4863c99d493a85a384089d2bd383/7da75/mohammad.webp 55w,\n/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp 110w,\n/static/235d4863c99d493a85a384089d2bd383/f282e/mohammad.webp 165w,\n/static/235d4863c99d493a85a384089d2bd383/a7b21/mohammad.webp 220w,\n/static/235d4863c99d493a85a384089d2bd383/c1cbf/mohammad.webp 851w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"Prime numbers, by definition, are integers that could not be decomposed into two new numbers. In Number theory, a prime number P is an integer that has just two divisors: 1 and P. There is no known sequence in mathematics that could describe the chain of prime numbers.\n\nA long period ago, Mathematicians had a lot of challenges to prove that a number is prime. Moreover, a mathematician now could do new research that could be published in great journals just if he found a new prime number! The largest known prime number till now (May 2022) is the number 2^{82,589,933 }− 1, which has 24,862,048 digits!\n\nSo, what is the magic in prime numbers?! And why are mathematicians interested in it?! The answer is in the following theorem in Number theory, which says that \"Any integer n could write as a product of the power of prime numbers\".\n\nFor example 4=2x2, 6=2x3, 8=2^3, and 9=3^2, with 2 and 3 being primes. What does that mean? This means that if you want to prove any theorem in the whole set of integers, it is enough to prove it on the set of prime numbers since all numbers could return to the power of prime numbers.\n\nAlthough there are some theorems that could provide a way to approximate the number of prime numbers less than or equal to a given number n (The prime number theorem for example), we still have a lot of research to do in this part of the field of Number theory.\n\nMathematicians will never stop trying to find a way to test a number if it is prime or not, could it possible?","html":"<p>Prime numbers, by definition, are integers that could not be decomposed into two new numbers. In Number theory, a prime number P is an integer that has just two divisors: 1 and P. There is no known sequence in mathematics that could describe the chain of prime numbers.</p><p>A long period ago, Mathematicians had a lot of challenges to prove that a number is prime. Moreover, a mathematician now could do new research that could be published in great journals just if he found a new prime number! The largest known prime number till now (May 2022) is the number 2^{82,589,933 }− 1, which has 24,862,048 digits!</p><p>So, what is the magic in prime numbers?! And why are mathematicians interested in it?! The answer is in the following theorem in Number theory, which says that \"Any integer n could write as a product of the power of prime numbers\". </p><p>For example 4=2x2, 6=2x3, 8=2^3, and 9=3^2, with 2 and 3 being primes. What does that mean? This means that if you want to prove any theorem in the whole set of integers, it is enough to prove it on the set of prime numbers since all numbers could return to the power of prime numbers.</p><p>Although there are some theorems that could provide a way to approximate the number of prime numbers less than or equal to a given number n (The prime number theorem for example), we still have a lot of research to do in this part of the field of Number theory.</p><p>Mathematicians will never stop trying to find a way to test a number if it is prime or not, could it possible?</p>","url":"https://backend.shahednasser.com/what-are-prime-numbers/","canonical_url":null,"uuid":"d0795554-8c35-4ea8-b53a-a66362da6e22","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"62dc5a284e918d05f3537766","reading_time":1,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>Prime numbers, by definition, are integers that could not be decomposed into two new numbers. In Number theory, a prime number P is an integer that has just two divisors: 1 and P. There is no known sequence in mathematics that could describe the chain of prime numbers.</p><p>A long period ago, Mathematicians had a lot of challenges to prove that a number is prime. Moreover, a mathematician now could do new research that could be published in great journals just if he found a new prime number! The largest known prime number till now (May 2022) is the number 2^{82,589,933 }− 1, which has 24,862,048 digits!</p><p>So, what is the magic in prime numbers?! And why are mathematicians interested in it?! The answer is in the following theorem in Number theory, which says that \"Any integer n could write as a product of the power of prime numbers\". </p><p>For example 4=2x2, 6=2x3, 8=2^3, and 9=3^2, with 2 and 3 being primes. What does that mean? This means that if you want to prove any theorem in the whole set of integers, it is enough to prove it on the set of prime numbers since all numbers could return to the power of prime numbers.</p><p>Although there are some theorems that could provide a way to approximate the number of prime numbers less than or equal to a given number n (The prime number theorem for example), we still have a lot of research to do in this part of the field of Number theory.</p><p>Mathematicians will never stop trying to find a way to test a number if it is prime or not, could it possible?</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Prime numbers, by definition, are integers that could not be decomposed into two new numbers. In Number theory, a prime number P is an integer that has just two divisors: 1 and P. There is no known sequence in mathematics that could describe the chain of prime numbers."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A long period ago, Mathematicians had a lot of challenges to prove that a number is prime. Moreover, a mathematician now could do new research that could be published in great journals just if he found a new prime number! The largest known prime number till now (May 2022) is the number 2^{82,589,933 }− 1, which has 24,862,048 digits!"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So, what is the magic in prime numbers?! And why are mathematicians interested in it?! The answer is in the following theorem in Number theory, which says that \"Any integer n could write as a product of the power of prime numbers\". "}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For example 4=2x2, 6=2x3, 8=2^3, and 9=3^2, with 2 and 3 being primes. What does that mean? This means that if you want to prove any theorem in the whole set of integers, it is enough to prove it on the set of prime numbers since all numbers could return to the power of prime numbers."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Although there are some theorems that could provide a way to approximate the number of prime numbers less than or equal to a given number n (The prime number theorem for example), we still have a lot of research to do in this part of the field of Number theory."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Mathematicians will never stop trying to find a way to test a number if it is prime or not, could it possible?"}]}],"data":{"quirksMode":false}},"tableOfContents":[]},"featureImageSharp":{"base":"What-are-Prime-Numbers.jpg","publicURL":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/What-are-Prime-Numbers.jpg","imageMeta":{"width":1560,"height":876},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAIF/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB3VAD/8QAFhABAQEAAAAAAAAAAAAAAAAAEQAg/9oACAEBAAEFAmc//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFxAAAwEAAAAAAAAAAAAAAAAAAAExIP/aAAgBAQAGPwKMjz//xAAVEAEBAAAAAAAAAAAAAAAAAAAgMf/aAAgBAQABPyGkD//aAAwDAQACAAMAAAAQIw//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAbEAEBAAEFAAAAAAAAAAAAAAABEaEAICFB0f/aAAgBAQABPxBYi07hznQ6GI92/wD/2Q==","aspectRatio":1.7808219178082192,"src":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/d5c54/What-are-Prime-Numbers.jpg","srcSet":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/65d8c/What-are-Prime-Numbers.jpg 260w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/c5f21/What-are-Prime-Numbers.jpg 520w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/d5c54/What-are-Prime-Numbers.jpg 1040w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/81a53/What-are-Prime-Numbers.jpg 1560w","srcWebp":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/e4875/What-are-Prime-Numbers.webp","srcSetWebp":"/static/bbbf65b4913cef0a582d0ec991ad0b7d/dc8f3/What-are-Prime-Numbers.webp 260w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/2db4b/What-are-Prime-Numbers.webp 520w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/e4875/What-are-Prime-Numbers.webp 1040w,\n/static/bbbf65b4913cef0a582d0ec991ad0b7d/f5845/What-are-Prime-Numbers.webp 1560w","sizes":"(max-width: 1040px) 100vw, 1040px"}}}},"prev":{"id":"Ghost__Post__63404f3c4e918d05f3537ce0","title":"How to Track the Rank of Keywords in Google SERPs using Python","slug":"track-keywords-in-google-using-python","featured":false,"feature_image":"https://backend.shahednasser.com/content/images/2022/10/serp-python.png","excerpt":"In this post, we will learn how to track the rank of pages in google for any keyword using Python. We will create a tool like SEMrush & Ahrefs with coding.","custom_excerpt":"In this post, we will learn how to track the rank of pages in google for any keyword using Python. We will create a tool like SEMrush & Ahrefs with coding.","visibility":"public","created_at_pretty":"7 Oct 2022","published_at_pretty":"7 Oct 2022","updated_at_pretty":"7 Oct 2022","created_at":"2022-10-07T16:09:32.000+00:00","published_at":"2022-10-07T16:24:53.000+00:00","updated_at":"2022-10-07T16:24:53.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"manthan","url":"https://backend.shahednasser.com/author/manthan/","name":"Manthan Koolwal","bio":"Manthan loves to create web scrapers. He has been working on them for last 10 years now. He has been creating data pipelines for multiple MNCs in past Currently, he is working on Scrapingdog.","cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/10/IMG-20221004-WA0006.jpg","location":null,"website":"https://www.scrapingdog.com","twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"manthan","url":"https://backend.shahednasser.com/author/manthan/","name":"Manthan Koolwal","bio":"Manthan loves to create web scrapers. He has been working on them for last 10 years now. He has been creating data pipelines for multiple MNCs in past Currently, he is working on Scrapingdog.","cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/10/IMG-20221004-WA0006.jpg","location":null,"website":"https://www.scrapingdog.com","twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"IMG-20221004-WA0006.jpg","publicURL":"/static/537dfb50d98b69053b42bda661dd8004/IMG-20221004-WA0006.jpg","imageMeta":{"width":1104,"height":1472},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAaABQDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAQFAgED/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAABn5e0KjgcZq+RJLof/8QAHBAAAgMAAwEAAAAAAAAAAAAAAgMAAQQQERIx/9oACAEBAAEFAupXDs9eVoWLGDVMXnaMoCYLszCZB+T/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAcEAABBQADAAAAAAAAAAAAAAABAAIRITEQIFH/2gAIAQEABj8C1UZ4EOOpptODTCBc6xgUWCLEoujfOn//xAAbEAEAAgMBAQAAAAAAAAAAAAABABEhMUFRcf/aAAgBAQABPyFVW0jHTAlTOw8exxCLpvTcHER0zJMNnz2ZRVs9QODpjhNv1hP/2gAMAwEAAgADAAAAEMAOAP/EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8QH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8QH//EABwQAQEAAwEBAQEAAAAAAAAAAAERACExQXGh0f/aAAgBAQABPxADEDqmjBtpeccdtVOwWYWnpo2I1D3J/wAwLoM/ZkTJVuMv8w1h7YFen5+4WRwKIh1Z5MbZSUasD35hiJDPjP/Z","aspectRatio":0.7567567567567568,"src":"/static/537dfb50d98b69053b42bda661dd8004/31709/IMG-20221004-WA0006.jpg","srcSet":"/static/537dfb50d98b69053b42bda661dd8004/f340b/IMG-20221004-WA0006.jpg 28w,\n/static/537dfb50d98b69053b42bda661dd8004/22d64/IMG-20221004-WA0006.jpg 55w,\n/static/537dfb50d98b69053b42bda661dd8004/31709/IMG-20221004-WA0006.jpg 110w,\n/static/537dfb50d98b69053b42bda661dd8004/aa249/IMG-20221004-WA0006.jpg 165w,\n/static/537dfb50d98b69053b42bda661dd8004/0dc33/IMG-20221004-WA0006.jpg 220w,\n/static/537dfb50d98b69053b42bda661dd8004/ff717/IMG-20221004-WA0006.jpg 1104w","srcWebp":"/static/537dfb50d98b69053b42bda661dd8004/8678c/IMG-20221004-WA0006.webp","srcSetWebp":"/static/537dfb50d98b69053b42bda661dd8004/59cda/IMG-20221004-WA0006.webp 28w,\n/static/537dfb50d98b69053b42bda661dd8004/7da75/IMG-20221004-WA0006.webp 55w,\n/static/537dfb50d98b69053b42bda661dd8004/8678c/IMG-20221004-WA0006.webp 110w,\n/static/537dfb50d98b69053b42bda661dd8004/f282e/IMG-20221004-WA0006.webp 165w,\n/static/537dfb50d98b69053b42bda661dd8004/a7b21/IMG-20221004-WA0006.webp 220w,\n/static/537dfb50d98b69053b42bda661dd8004/23b79/IMG-20221004-WA0006.webp 1104w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":null,"tags":[],"plaintext":"Keyword rank tracking is very common in the world of marketing. Many marketing teams use expensive tools to track their website ranks for multiple keywords on a regular basis. Since they have to do it on a daily basis this comes quite costly for new businesses, individuals, or startups.\n\nSo in this post, we will create a crawler that will keep you updated with your latest rank on any keyword you want to track.\n\nWe will create a web scraper to scrape google search results using python. I am assuming that you have already installed python on your computer. We will begin with coding the web scraper.\n\n\nLet’s code\n\nFirst, we need to install all the necessary libraries.\n\n·        Requests\n\n·        BeautifulSoup\n\nCreate a folder and then install these libraries:\n\nmkdir googlescraper\npip install requests\npip install beautifulsoup4\n\nThen we will import these libraries into our file. You can name the file googlescraper.py:\n\nimport requests\nfrom bs4 import BeautifulSoup\n\nOur target URL will change according to the keyword we want to scrape but the basic structure of the google URL will remain the same.\n\nGoogle URL structure — https://www.google.com/search?q={any keyword or phrase}\n\nFor this blog post, our target keyword will be “scrape prices” and we have to find the rank of the domain christian-schou.dk at this keyword.\n\nSo, our target URL will be this.\n\nLet us first check whether this domain is present in the first 10 results or not.As you can see page URLs are located inside class jGGQ5e and then into yuRUbf. After this, we have to find a tag inside class yuRUbf and then get the value of href tag.\n\nheaders={‘User-Agent’:’Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',’referer’:’https://www.google.com'}\ntarget_url=’https://www.google.com/search?q=scrape+prices'\nresp = requests.get(target_url, headers=headers)\nprint(resp.status_code)\n\nHere we have declared some headers like User-Agent and a Referer to act like a standard browser and not as a crawler.\n\nThen we declared our target URL and finally made the GET request using the requests library. Once we run this code you should see 200 on your terminal.\n\nNow, our target is to find our domain. Let’s find it using BS4.\n\nsoup=BeautifulSoup(resp.text,’html.parser’)\nresults = soup.find_all(“div”,{“class”:”jGGQ5e”})\n\nWe have used html.parser inside the BS4 library to create a tree of our HTML code. results array, you will get the HTML code of all the top 10 results.\n\nIn this list, we have to search our links one by one. For that, we are going to use for loop.\n\nfrom urllib.parse import urlparse\nfor x in range(0,len(results)):\n   domain=urlparse(results[x].find(\"div\",{\"class\":\"yuRUbf\"}).find(\"a\").get(\"href\")).netloc\n  \n   if(domain == 'blog.christian-schou.dk'):\n       found=True\n       position=x+1\n       break;\n   else:\n       found=False\nif(found==True):\n   print(\"Found at position\", position)\nelse:\n   print(\"not found in top\", len(results))\n\n\nWe have used urlparse library to parse out the domain from the link. Then we are trying to match our domain with the domain we extracted.\n\nIf it matches we will get the position and if it does not match then it will print not found.\n\nLet us run this code and let’s see what we get.\n\nWell, the request was successful as I can see a 200 but we could find this domain in the top 10 results.\n\nLet’s search for it in the top 20 results, but for that, we need to change the target URL and add param &num=20 to our google URL.\n\nGoogle URL will become https://www.google.com/search?q=scrape+prices&num=20\n\nRun the program again and check whether you see this domain or not.\n\nThis time I found the domain in the 18th position on Google search results.\n\nSo, the rank of this domain for “scrape prices” is 18th in my country. This position will change according to the country as google display different results in different country.\n\nThis is how you can track the rank of any domain for any keyword. If you want to track it for different countries then you can use google search result scraper.\n\nGoing forward you can also create an SEO tool just like Ahref and Semrush or you can create a lead generation tool like Snov.\n\n\nComplete Code\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom urllib.parse import urlparse\nheaders={‘User-Agent’:’Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',’referer’:’https://www.google.com'}\ntarget_url=’https://www.google.com/search?q=scrape+prices&num=20'\nresp = requests.get(target_url, headers=headers)\nprint(resp.status_code)\nsoup=BeautifulSoup(resp.text,’html.parser’)\nresults = soup.find_all(“div”,{“class”:”jGGQ5e”})\n# print(results)\nfor x in range(0,len(results)):\ndomain=urlparse(results[x].find(“div”,{“class”:”yuRUbf”}).find(“a”).get(“href”)).netloc\n \nif(domain == ‘blog.christian-schou.dk’):\n  found=True\n  position=x+1\n  break;\nelse:\n  found=False\nif(found==True):\nprint(“Found at position”, position)\nelse:\nprint(“not found in top”, len(results))\n\n\n\nRunning the code every 24 hours\n\nLet’s say you want to track your position every 24 hours because you are putting lots of effort into marketing and you want to see results on daily basis.\n\nFor that you can mail yourself the current position every morning, this will keep you updated.We will use schedule library to implement this task.\n\n\nComplete Code\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom urllib.parse import urlparse\nimport schedule\nimport time\ndef tracker():\nheaders={‘User-Agent’:’Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',’referer’:’https://www.google.com'}\ntarget_url=’https://www.google.com/search?q=scrape+prices&num=20'\nresp = requests.get(target_url, headers=headers)\nprint(resp.status_code)\nsoup=BeautifulSoup(resp.text,’html.parser’)\nresults = soup.find_all(“div”,{“class”:”jGGQ5e”})\n# print(results)\nfor x in range(0,len(results)):\n domain=urlparse(results[x].find(“div”,{“class”:”yuRUbf”}).find(“a”).get(“href”)).netloc\nif(domain == ‘blog.christian-schou.dk’):\n found=True\n position=x+1\n break;\nelse:\n found=False\n position=x+1\nif(found==True):\nprint(“Found at position”, position)\nelse:\nprint(“not found in top “+ str(position)+ “ results”)\nif __name__ == “__main__”:\nschedule.every(5).seconds.do(tracker)\nwhile True:\n schedule.run_pending()\n\n\nHere we are running the schedule every 5 seconds just to test whether it will work for us or not. Once you run it you will get the results like this.\n\nNow, to run it every day or after every 24 hours you can use:\n\nschedule.every().day.at(\"12:00\").do(job)\n\nNow, let us mail ourselves these results to keep us updated with the latest position on google. For this task, we will use smtplib library.\n\n\nMail\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom urllib.parse import urlparse\nimport schedule\nimport time\nimport smtplib, ssl\ndef mail(position):\nattackMsg = position\nserver = smtplib.SMTP(‘smtp.gmail.com’, 587)\nserver.ehlo()\nserver.starttls()\nserver.login(“from@gmail.com”, “xxxx”)\nSUBJECT = “Position Alert”\nmessage = ‘From: from@gmail.com \\nSubject: {}\\n\\n{}’.format(SUBJECT, attackMsg)\nserver.sendmail(“from@gmail.com”, ‘send_to@gmail.com’, message)\n \nserver.quit()\nreturn True\ndef tracker():\nheaders={‘User-Agent’:’Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',’referer’:’https://www.google.com'}\ntarget_url=’https://www.google.com/search?q=scrape+prices&num=20'\nresp = requests.get(target_url, headers=headers)\nprint(resp.status_code)\nsoup=BeautifulSoup(resp.text,’html.parser’)\nresults = soup.find_all(“div”,{“class”:”jGGQ5e”})\n# print(results)\nfor x in range(0,len(results)):\n domain=urlparse(results[x].find(“div”,{“class”:”yuRUbf”}).find(“a”).get(“href”)).netloc\nif(domain == ‘blog.christian-schou.dk’):\n found=True\n position=x+1\n break;\nelse:\n found=False\n position=x+1\nif(found==True):\nmessage=”Found at position “+ str(position)\nmail(message)\nelse:\nmessage=”not found in top “+ str(position)+ “ results”\nmail(message)\nif __name__ == “__main__”:\nschedule.every().day.at(\"12:00\").do(job)\nwhile True:\n schedule.run_pending()\n\nIn the mail function, we are making a login attempt to our Gmail account with the password.\n\nThen we have declared the subject and the message that will be sent to us. And finally we used .senemail function to send the email alert. This will send an email alert every 24 hours directly to your inbox.\n\nNow, you might wonder if we stop the script our scheduler will stop working. Yes, you are right and to tackle it we are going to use nohup.\n\nNohup will ignore the hangup signal and will keep running your script even if you stop it.\n\nI leave this task to you as homework in a hope that you will learn something new and unique.\n\n\nConclusion\n\nIn this post, we learned how we can create a task that can run at any given interval of time. We used four libraries i.e. requests, BS4, schedule, and smtplib to complete this task.\n\nNow it does not stop here, you can create any type of scheduler like news updates, stock updates, etc. I am sure python will make your job fast and simple.","html":"<p>Keyword rank tracking is very common in the world of marketing. Many marketing teams use expensive tools to track their website ranks for multiple keywords on a regular basis. Since they have to do it on a daily basis this comes quite costly for new businesses, individuals, or startups.</p><p>So in this post, we will create a crawler that will keep you updated with your latest rank on <strong>any keyword you want to track</strong>.</p><p>We will create a web scraper to <a href=\"https://www.scrapingdog.com/blog/scrape-google-search-results/\">scrape google search results</a> using python. I am assuming that you have already installed python on your computer. We will begin with coding the web scraper.</p><h2 id=\"let%E2%80%99s-code\">Let’s code</h2><p>First, we need to install all the necessary libraries.</p><p>·        Requests</p><p>·        BeautifulSoup</p><p>Create a folder and then install these libraries:</p><pre><code class=\"language-bash\">mkdir googlescraper\npip install requests\npip install beautifulsoup4</code></pre><p>Then we will import these libraries into our file. You can name the file <code>googlescraper.py</code>:</p><pre><code class=\"language-python\">import requests\nfrom bs4 import BeautifulSoup</code></pre><p>Our target URL will change according to the keyword we want to scrape but the basic structure of the google URL will remain the same.</p><p>Google URL structure — <code>https://www.google.com/search?q={any keyword or phrase}</code></p><p>For this blog post, our target keyword will be “scrape prices” and we have to find the rank of the domain <code>christian-schou.dk</code> at this keyword.</p><p>So, our target URL will be<a href=\"https://www.google.com/search?q=scrape+prices\"> this</a>.</p><p>Let us first check whether this domain is present in the first 10 results or not.As you can see page URLs are located inside class <em><code>jGGQ5e</code></em> and then into<em> <code>yuRUbf</code>. </em>After this, we have to find a tag inside class <em><code>yuRUbf</code></em> and then get the value of <em><code>href</code></em> tag.</p><pre><code class=\"language-python\">headers={‘User-Agent’:’Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',’referer’:’https://www.google.com'}\ntarget_url=’https://www.google.com/search?q=scrape+prices'\nresp = requests.get(target_url, headers=headers)\nprint(resp.status_code)</code></pre><p>Here we have declared some headers like User-Agent and a Referer to act like a standard browser and not as a crawler.</p><p>Then we declared our target URL and finally made the GET request using the requests library. Once we run this code you should see <strong>200</strong> on your terminal.</p><p>Now, our target is to find our domain. Let’s find it using BS4.</p><pre><code class=\"language-python\">soup=BeautifulSoup(resp.text,’html.parser’)\nresults = soup.find_all(“div”,{“class”:”jGGQ5e”})</code></pre><p>We have used <code>html.parser</code> inside the BS4 library to create a tree of our HTML code. <strong><code>results</code></strong> array, you will get the HTML code of all the top 10 results.</p><p>In this list, we have to search our links one by one. For that, we are going to use for loop.</p><pre><code class=\"language-python\">from urllib.parse import urlparse\nfor x in range(0,len(results)):\n   domain=urlparse(results[x].find(\"div\",{\"class\":\"yuRUbf\"}).find(\"a\").get(\"href\")).netloc\n  \n   if(domain == 'blog.christian-schou.dk'):\n       found=True\n       position=x+1\n       break;\n   else:\n       found=False\nif(found==True):\n   print(\"Found at position\", position)\nelse:\n   print(\"not found in top\", len(results))\n</code></pre><p>We have used<a href=\"https://docs.python.org/3/library/urllib.parse.html\"> urlparse</a> library to parse out the domain from the link. Then we are trying to match our domain with the domain we extracted.</p><p>If it matches we will get the position and if it does not match then it will print not found.</p><p>Let us run this code and let’s see what we get.</p><p>Well, the request was successful as I can see a 200 but we could find this domain in the top 10 results.</p><p>Let’s search for it in the top 20 results, but for that, we need to change the target URL and add param &amp;num=20 to our google URL.</p><p>Google URL will become <code>https://www.google.com/search?q=scrape+prices&amp;num=20</code></p><p>Run the program again and check whether you see this domain or not.</p><p>This time I found the domain in the 18th position on Google search results.</p><p>So, the rank of this domain for “scrape prices” is 18th in my country. This position will change according to the country as google display different results in different country.</p><p>This is how you can track the rank of any domain for any keyword. If you want to track it for different countries then you can use google search result scraper.</p><p>Going forward you can also create an SEO tool just like<a href=\"https://ahrefs.com/\"> Ahref</a> and<a href=\"https://www.semrush.com/\"> Semrush</a> or you can create a lead generation tool like<a href=\"https://snov.io/\"> Snov</a>.</p><h3 id=\"complete-code\">Complete Code</h3><pre><code class=\"language-python\">import requests\nfrom bs4 import BeautifulSoup\nfrom urllib.parse import urlparse\nheaders={‘User-Agent’:’Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',’referer’:’https://www.google.com'}\ntarget_url=’https://www.google.com/search?q=scrape+prices&amp;num=20'\nresp = requests.get(target_url, headers=headers)\nprint(resp.status_code)\nsoup=BeautifulSoup(resp.text,’html.parser’)\nresults = soup.find_all(“div”,{“class”:”jGGQ5e”})\n# print(results)\nfor x in range(0,len(results)):\ndomain=urlparse(results[x].find(“div”,{“class”:”yuRUbf”}).find(“a”).get(“href”)).netloc\n \nif(domain == ‘blog.christian-schou.dk’):\n  found=True\n  position=x+1\n  break;\nelse:\n  found=False\nif(found==True):\nprint(“Found at position”, position)\nelse:\nprint(“not found in top”, len(results))\n</code></pre><h2 id=\"running-the-code-every-24-hours\">Running the code every 24 hours</h2><p>Let’s say you want to track your position every 24 hours because you are putting lots of effort into marketing and you want to see results on daily basis.</p><p>For that you can mail yourself the current position every morning, this will keep you updated.We will use<a href=\"https://schedule.readthedocs.io/en/stable/\"> schedule</a> library to implement this task.</p><h3 id=\"complete-code-1\">Complete Code</h3><pre><code class=\"language-python\">import requests\nfrom bs4 import BeautifulSoup\nfrom urllib.parse import urlparse\nimport schedule\nimport time\ndef tracker():\nheaders={‘User-Agent’:’Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',’referer’:’https://www.google.com'}\ntarget_url=’https://www.google.com/search?q=scrape+prices&amp;num=20'\nresp = requests.get(target_url, headers=headers)\nprint(resp.status_code)\nsoup=BeautifulSoup(resp.text,’html.parser’)\nresults = soup.find_all(“div”,{“class”:”jGGQ5e”})\n# print(results)\nfor x in range(0,len(results)):\n domain=urlparse(results[x].find(“div”,{“class”:”yuRUbf”}).find(“a”).get(“href”)).netloc\nif(domain == ‘blog.christian-schou.dk’):\n found=True\n position=x+1\n break;\nelse:\n found=False\n position=x+1\nif(found==True):\nprint(“Found at position”, position)\nelse:\nprint(“not found in top “+ str(position)+ “ results”)\nif __name__ == “__main__”:\nschedule.every(5).seconds.do(tracker)\nwhile True:\n schedule.run_pending()\n</code></pre><p>Here we are running the schedule every 5 seconds just to test whether it will work for us or not. Once you run it you will get the results like this.</p><p>Now, to run it every day or after every 24 hours you can use:</p><pre><code class=\"language-python\">schedule.every().day.at(\"12:00\").do(job)</code></pre><p>Now, let us mail ourselves these results to keep us updated with the latest position on google. For this task, we will use<a href=\"https://docs.python.org/3/library/smtplib.html\"> smtplib</a> library.</p><h3 id=\"mail\">Mail</h3><pre><code class=\"language-python\">import requests\nfrom bs4 import BeautifulSoup\nfrom urllib.parse import urlparse\nimport schedule\nimport time\nimport smtplib, ssl\ndef mail(position):\nattackMsg = position\nserver = smtplib.SMTP(‘smtp.gmail.com’, 587)\nserver.ehlo()\nserver.starttls()\nserver.login(“from@gmail.com”, “xxxx”)\nSUBJECT = “Position Alert”\nmessage = ‘From: from@gmail.com \\nSubject: {}\\n\\n{}’.format(SUBJECT, attackMsg)\nserver.sendmail(“from@gmail.com”, ‘send_to@gmail.com’, message)\n \nserver.quit()\nreturn True\ndef tracker():\nheaders={‘User-Agent’:’Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',’referer’:’https://www.google.com'}\ntarget_url=’https://www.google.com/search?q=scrape+prices&amp;num=20'\nresp = requests.get(target_url, headers=headers)\nprint(resp.status_code)\nsoup=BeautifulSoup(resp.text,’html.parser’)\nresults = soup.find_all(“div”,{“class”:”jGGQ5e”})\n# print(results)\nfor x in range(0,len(results)):\n domain=urlparse(results[x].find(“div”,{“class”:”yuRUbf”}).find(“a”).get(“href”)).netloc\nif(domain == ‘blog.christian-schou.dk’):\n found=True\n position=x+1\n break;\nelse:\n found=False\n position=x+1\nif(found==True):\nmessage=”Found at position “+ str(position)\nmail(message)\nelse:\nmessage=”not found in top “+ str(position)+ “ results”\nmail(message)\nif __name__ == “__main__”:\nschedule.every().day.at(\"12:00\").do(job)\nwhile True:\n schedule.run_pending()</code></pre><p>In the mail function, we are making a login attempt to our Gmail account with the password.</p><p>Then we have declared the subject and the message that will be sent to us. And finally we used .senemail function to send the email alert. This will send an email alert every 24 hours directly to your inbox.</p><p>Now, you might wonder if we stop the script our scheduler will stop working. Yes, you are right and to tackle it we are going to use<a href=\"https://janakiev.com/blog/python-background/\"> nohup</a>.</p><p>Nohup will ignore the hangup signal and will keep running your script even if you stop it.</p><p>I leave this task to you as homework in a hope that you will learn something new and unique.</p><h2 id=\"conclusion\">Conclusion</h2><p>In this post, we learned how we can create a task that can run at any given interval of time. We used four libraries i.e. requests, BS4, schedule, and smtplib to complete this task.</p><p>Now it does not stop here, you can create any type of scheduler like news updates, stock updates, etc. I am sure python will make your job fast and simple.</p>","url":"https://backend.shahednasser.com/track-keywords-in-google-using-python/","canonical_url":null,"uuid":"944afaff-6d24-4c0f-9a4c-bfb65c7fa7fd","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"63404f3c4e918d05f3537ce0","reading_time":6,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>Keyword rank tracking is very common in the world of marketing. Many marketing teams use expensive tools to track their website ranks for multiple keywords on a regular basis. Since they have to do it on a daily basis this comes quite costly for new businesses, individuals, or startups.</p><p>So in this post, we will create a crawler that will keep you updated with your latest rank on <strong>any keyword you want to track</strong>.</p><p>We will create a web scraper to <a href=\"https://www.scrapingdog.com/blog/scrape-google-search-results/\">scrape google search results</a> using python. I am assuming that you have already installed python on your computer. We will begin with coding the web scraper.</p><h2 id=\"let%E2%80%99s-code\">Let’s code</h2><p>First, we need to install all the necessary libraries.</p><p>·        Requests</p><p>·        BeautifulSoup</p><p>Create a folder and then install these libraries:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">mkdir</span> googlescraper\npip <span class=\"token function\">install</span> requests\npip <span class=\"token function\">install</span> beautifulsoup4</code></pre></div><p>Then we will import these libraries into our file. You can name the file <code class=\"language-text\">googlescraper.py</code>:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token keyword\">import</span> requests\n<span class=\"token keyword\">from</span> bs4 <span class=\"token keyword\">import</span> BeautifulSoup</code></pre></div><p>Our target URL will change according to the keyword we want to scrape but the basic structure of the google URL will remain the same.</p><p>Google URL structure — <code class=\"language-text\">https://www.google.com/search?q={any keyword or phrase}</code></p><p>For this blog post, our target keyword will be “scrape prices” and we have to find the rank of the domain <code class=\"language-text\">christian-schou.dk</code> at this keyword.</p><p>So, our target URL will be<a href=\"https://www.google.com/search?q=scrape+prices\"> this</a>.</p><p>Let us first check whether this domain is present in the first 10 results or not.As you can see page URLs are located inside class <em><code class=\"language-text\">jGGQ5e</code></em> and then into<em> <code class=\"language-text\">yuRUbf</code>. </em>After this, we have to find a tag inside class <em><code class=\"language-text\">yuRUbf</code></em> and then get the value of <em><code class=\"language-text\">href</code></em> tag.</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\">headers<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span>‘User<span class=\"token operator\">-</span>Agent’<span class=\"token punctuation\">:</span>’Mozilla<span class=\"token operator\">/</span><span class=\"token number\">5.0</span> <span class=\"token punctuation\">(</span>Windows NT <span class=\"token number\">10.0</span><span class=\"token punctuation\">;</span> Win64<span class=\"token punctuation\">;</span> x64<span class=\"token punctuation\">)</span> AppleWebKit<span class=\"token operator\">/</span><span class=\"token number\">537.36</span> <span class=\"token punctuation\">(</span>KHTML<span class=\"token punctuation\">,</span> like Gecko<span class=\"token punctuation\">)</span> Chrome<span class=\"token operator\">/</span><span class=\"token number\">104.0</span><span class=\"token number\">.0</span><span class=\"token number\">.0</span> Safari<span class=\"token operator\">/</span><span class=\"token number\">537.36</span><span class=\"token string\">',’referer’:’https://www.google.com'</span><span class=\"token punctuation\">}</span>\ntarget_url<span class=\"token operator\">=</span>’https<span class=\"token punctuation\">:</span><span class=\"token operator\">//</span>www<span class=\"token punctuation\">.</span>google<span class=\"token punctuation\">.</span>com<span class=\"token operator\">/</span>search?q<span class=\"token operator\">=</span>scrape<span class=\"token operator\">+</span>prices'\nresp <span class=\"token operator\">=</span> requests<span class=\"token punctuation\">.</span>get<span class=\"token punctuation\">(</span>target_url<span class=\"token punctuation\">,</span> headers<span class=\"token operator\">=</span>headers<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>resp<span class=\"token punctuation\">.</span>status_code<span class=\"token punctuation\">)</span></code></pre></div><p>Here we have declared some headers like User-Agent and a Referer to act like a standard browser and not as a crawler.</p><p>Then we declared our target URL and finally made the GET request using the requests library. Once we run this code you should see <strong>200</strong> on your terminal.</p><p>Now, our target is to find our domain. Let’s find it using BS4.</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\">soup<span class=\"token operator\">=</span>BeautifulSoup<span class=\"token punctuation\">(</span>resp<span class=\"token punctuation\">.</span>text<span class=\"token punctuation\">,</span>’html<span class=\"token punctuation\">.</span>parser’<span class=\"token punctuation\">)</span>\nresults <span class=\"token operator\">=</span> soup<span class=\"token punctuation\">.</span>find_all<span class=\"token punctuation\">(</span>“div”<span class=\"token punctuation\">,</span><span class=\"token punctuation\">{</span>“<span class=\"token keyword\">class</span>”<span class=\"token punctuation\">:</span>”jGGQ5e”<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span></code></pre></div><p>We have used <code class=\"language-text\">html.parser</code> inside the BS4 library to create a tree of our HTML code. <strong><code class=\"language-text\">results</code></strong> array, you will get the HTML code of all the top 10 results.</p><p>In this list, we have to search our links one by one. For that, we are going to use for loop.</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token keyword\">from</span> urllib<span class=\"token punctuation\">.</span>parse <span class=\"token keyword\">import</span> urlparse\n<span class=\"token keyword\">for</span> x <span class=\"token keyword\">in</span> <span class=\"token builtin\">range</span><span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">,</span><span class=\"token builtin\">len</span><span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n   domain<span class=\"token operator\">=</span>urlparse<span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">[</span>x<span class=\"token punctuation\">]</span><span class=\"token punctuation\">.</span>find<span class=\"token punctuation\">(</span><span class=\"token string\">\"div\"</span><span class=\"token punctuation\">,</span><span class=\"token punctuation\">{</span><span class=\"token string\">\"class\"</span><span class=\"token punctuation\">:</span><span class=\"token string\">\"yuRUbf\"</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>find<span class=\"token punctuation\">(</span><span class=\"token string\">\"a\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>get<span class=\"token punctuation\">(</span><span class=\"token string\">\"href\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>netloc\n  \n   <span class=\"token keyword\">if</span><span class=\"token punctuation\">(</span>domain <span class=\"token operator\">==</span> <span class=\"token string\">'blog.christian-schou.dk'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n       found<span class=\"token operator\">=</span><span class=\"token boolean\">True</span>\n       position<span class=\"token operator\">=</span>x<span class=\"token operator\">+</span><span class=\"token number\">1</span>\n       <span class=\"token keyword\">break</span><span class=\"token punctuation\">;</span>\n   <span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n       found<span class=\"token operator\">=</span><span class=\"token boolean\">False</span>\n<span class=\"token keyword\">if</span><span class=\"token punctuation\">(</span>found<span class=\"token operator\">==</span><span class=\"token boolean\">True</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n   <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"Found at position\"</span><span class=\"token punctuation\">,</span> position<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n   <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"not found in top\"</span><span class=\"token punctuation\">,</span> <span class=\"token builtin\">len</span><span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span>\n</code></pre></div><p>We have used<a href=\"https://docs.python.org/3/library/urllib.parse.html\"> urlparse</a> library to parse out the domain from the link. Then we are trying to match our domain with the domain we extracted.</p><p>If it matches we will get the position and if it does not match then it will print not found.</p><p>Let us run this code and let’s see what we get.</p><p>Well, the request was successful as I can see a 200 but we could find this domain in the top 10 results.</p><p>Let’s search for it in the top 20 results, but for that, we need to change the target URL and add param &#x26;num=20 to our google URL.</p><p>Google URL will become <code class=\"language-text\">https://www.google.com/search?q=scrape+prices&#x26;num=20</code></p><p>Run the program again and check whether you see this domain or not.</p><p>This time I found the domain in the 18th position on Google search results.</p><p>So, the rank of this domain for “scrape prices” is 18th in my country. This position will change according to the country as google display different results in different country.</p><p>This is how you can track the rank of any domain for any keyword. If you want to track it for different countries then you can use google search result scraper.</p><p>Going forward you can also create an SEO tool just like<a href=\"https://ahrefs.com/\"> Ahref</a> and<a href=\"https://www.semrush.com/\"> Semrush</a> or you can create a lead generation tool like<a href=\"https://snov.io/\"> Snov</a>.</p><h3 id=\"complete-code\">Complete Code</h3><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token keyword\">import</span> requests\n<span class=\"token keyword\">from</span> bs4 <span class=\"token keyword\">import</span> BeautifulSoup\n<span class=\"token keyword\">from</span> urllib<span class=\"token punctuation\">.</span>parse <span class=\"token keyword\">import</span> urlparse\nheaders<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span>‘User<span class=\"token operator\">-</span>Agent’<span class=\"token punctuation\">:</span>’Mozilla<span class=\"token operator\">/</span><span class=\"token number\">5.0</span> <span class=\"token punctuation\">(</span>Windows NT <span class=\"token number\">10.0</span><span class=\"token punctuation\">;</span> Win64<span class=\"token punctuation\">;</span> x64<span class=\"token punctuation\">)</span> AppleWebKit<span class=\"token operator\">/</span><span class=\"token number\">537.36</span> <span class=\"token punctuation\">(</span>KHTML<span class=\"token punctuation\">,</span> like Gecko<span class=\"token punctuation\">)</span> Chrome<span class=\"token operator\">/</span><span class=\"token number\">104.0</span><span class=\"token number\">.0</span><span class=\"token number\">.0</span> Safari<span class=\"token operator\">/</span><span class=\"token number\">537.36</span><span class=\"token string\">',’referer’:’https://www.google.com'</span><span class=\"token punctuation\">}</span>\ntarget_url<span class=\"token operator\">=</span>’https<span class=\"token punctuation\">:</span><span class=\"token operator\">//</span>www<span class=\"token punctuation\">.</span>google<span class=\"token punctuation\">.</span>com<span class=\"token operator\">/</span>search?q<span class=\"token operator\">=</span>scrape<span class=\"token operator\">+</span>prices<span class=\"token operator\">&#x26;</span>num<span class=\"token operator\">=</span><span class=\"token number\">20</span>'\nresp <span class=\"token operator\">=</span> requests<span class=\"token punctuation\">.</span>get<span class=\"token punctuation\">(</span>target_url<span class=\"token punctuation\">,</span> headers<span class=\"token operator\">=</span>headers<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>resp<span class=\"token punctuation\">.</span>status_code<span class=\"token punctuation\">)</span>\nsoup<span class=\"token operator\">=</span>BeautifulSoup<span class=\"token punctuation\">(</span>resp<span class=\"token punctuation\">.</span>text<span class=\"token punctuation\">,</span>’html<span class=\"token punctuation\">.</span>parser’<span class=\"token punctuation\">)</span>\nresults <span class=\"token operator\">=</span> soup<span class=\"token punctuation\">.</span>find_all<span class=\"token punctuation\">(</span>“div”<span class=\"token punctuation\">,</span><span class=\"token punctuation\">{</span>“<span class=\"token keyword\">class</span>”<span class=\"token punctuation\">:</span>”jGGQ5e”<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span>\n<span class=\"token comment\"># print(results)</span>\n<span class=\"token keyword\">for</span> x <span class=\"token keyword\">in</span> <span class=\"token builtin\">range</span><span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">,</span><span class=\"token builtin\">len</span><span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\ndomain<span class=\"token operator\">=</span>urlparse<span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">[</span>x<span class=\"token punctuation\">]</span><span class=\"token punctuation\">.</span>find<span class=\"token punctuation\">(</span>“div”<span class=\"token punctuation\">,</span><span class=\"token punctuation\">{</span>“<span class=\"token keyword\">class</span>”<span class=\"token punctuation\">:</span>”yuRUbf”<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>find<span class=\"token punctuation\">(</span>“a”<span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>get<span class=\"token punctuation\">(</span>“href”<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>netloc\n \n<span class=\"token keyword\">if</span><span class=\"token punctuation\">(</span>domain <span class=\"token operator\">==</span> ‘blog<span class=\"token punctuation\">.</span>christian<span class=\"token operator\">-</span>schou<span class=\"token punctuation\">.</span>dk’<span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n  found<span class=\"token operator\">=</span><span class=\"token boolean\">True</span>\n  position<span class=\"token operator\">=</span>x<span class=\"token operator\">+</span><span class=\"token number\">1</span>\n  <span class=\"token keyword\">break</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n  found<span class=\"token operator\">=</span><span class=\"token boolean\">False</span>\n<span class=\"token keyword\">if</span><span class=\"token punctuation\">(</span>found<span class=\"token operator\">==</span><span class=\"token boolean\">True</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n<span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>“Found at position”<span class=\"token punctuation\">,</span> position<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n<span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>“<span class=\"token keyword\">not</span> found <span class=\"token keyword\">in</span> top”<span class=\"token punctuation\">,</span> <span class=\"token builtin\">len</span><span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span>\n</code></pre></div><h2 id=\"running-the-code-every-24-hours\">Running the code every 24 hours</h2><p>Let’s say you want to track your position every 24 hours because you are putting lots of effort into marketing and you want to see results on daily basis.</p><p>For that you can mail yourself the current position every morning, this will keep you updated.We will use<a href=\"https://schedule.readthedocs.io/en/stable/\"> schedule</a> library to implement this task.</p><h3 id=\"complete-code-1\">Complete Code</h3><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token keyword\">import</span> requests\n<span class=\"token keyword\">from</span> bs4 <span class=\"token keyword\">import</span> BeautifulSoup\n<span class=\"token keyword\">from</span> urllib<span class=\"token punctuation\">.</span>parse <span class=\"token keyword\">import</span> urlparse\n<span class=\"token keyword\">import</span> schedule\n<span class=\"token keyword\">import</span> time\n<span class=\"token keyword\">def</span> <span class=\"token function\">tracker</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\nheaders<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span>‘User<span class=\"token operator\">-</span>Agent’<span class=\"token punctuation\">:</span>’Mozilla<span class=\"token operator\">/</span><span class=\"token number\">5.0</span> <span class=\"token punctuation\">(</span>Windows NT <span class=\"token number\">10.0</span><span class=\"token punctuation\">;</span> Win64<span class=\"token punctuation\">;</span> x64<span class=\"token punctuation\">)</span> AppleWebKit<span class=\"token operator\">/</span><span class=\"token number\">537.36</span> <span class=\"token punctuation\">(</span>KHTML<span class=\"token punctuation\">,</span> like Gecko<span class=\"token punctuation\">)</span> Chrome<span class=\"token operator\">/</span><span class=\"token number\">104.0</span><span class=\"token number\">.0</span><span class=\"token number\">.0</span> Safari<span class=\"token operator\">/</span><span class=\"token number\">537.36</span><span class=\"token string\">',’referer’:’https://www.google.com'</span><span class=\"token punctuation\">}</span>\ntarget_url<span class=\"token operator\">=</span>’https<span class=\"token punctuation\">:</span><span class=\"token operator\">//</span>www<span class=\"token punctuation\">.</span>google<span class=\"token punctuation\">.</span>com<span class=\"token operator\">/</span>search?q<span class=\"token operator\">=</span>scrape<span class=\"token operator\">+</span>prices<span class=\"token operator\">&#x26;</span>num<span class=\"token operator\">=</span><span class=\"token number\">20</span>'\nresp <span class=\"token operator\">=</span> requests<span class=\"token punctuation\">.</span>get<span class=\"token punctuation\">(</span>target_url<span class=\"token punctuation\">,</span> headers<span class=\"token operator\">=</span>headers<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>resp<span class=\"token punctuation\">.</span>status_code<span class=\"token punctuation\">)</span>\nsoup<span class=\"token operator\">=</span>BeautifulSoup<span class=\"token punctuation\">(</span>resp<span class=\"token punctuation\">.</span>text<span class=\"token punctuation\">,</span>’html<span class=\"token punctuation\">.</span>parser’<span class=\"token punctuation\">)</span>\nresults <span class=\"token operator\">=</span> soup<span class=\"token punctuation\">.</span>find_all<span class=\"token punctuation\">(</span>“div”<span class=\"token punctuation\">,</span><span class=\"token punctuation\">{</span>“<span class=\"token keyword\">class</span>”<span class=\"token punctuation\">:</span>”jGGQ5e”<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span>\n<span class=\"token comment\"># print(results)</span>\n<span class=\"token keyword\">for</span> x <span class=\"token keyword\">in</span> <span class=\"token builtin\">range</span><span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">,</span><span class=\"token builtin\">len</span><span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n domain<span class=\"token operator\">=</span>urlparse<span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">[</span>x<span class=\"token punctuation\">]</span><span class=\"token punctuation\">.</span>find<span class=\"token punctuation\">(</span>“div”<span class=\"token punctuation\">,</span><span class=\"token punctuation\">{</span>“<span class=\"token keyword\">class</span>”<span class=\"token punctuation\">:</span>”yuRUbf”<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>find<span class=\"token punctuation\">(</span>“a”<span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>get<span class=\"token punctuation\">(</span>“href”<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>netloc\n<span class=\"token keyword\">if</span><span class=\"token punctuation\">(</span>domain <span class=\"token operator\">==</span> ‘blog<span class=\"token punctuation\">.</span>christian<span class=\"token operator\">-</span>schou<span class=\"token punctuation\">.</span>dk’<span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n found<span class=\"token operator\">=</span><span class=\"token boolean\">True</span>\n position<span class=\"token operator\">=</span>x<span class=\"token operator\">+</span><span class=\"token number\">1</span>\n <span class=\"token keyword\">break</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n found<span class=\"token operator\">=</span><span class=\"token boolean\">False</span>\n position<span class=\"token operator\">=</span>x<span class=\"token operator\">+</span><span class=\"token number\">1</span>\n<span class=\"token keyword\">if</span><span class=\"token punctuation\">(</span>found<span class=\"token operator\">==</span><span class=\"token boolean\">True</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n<span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>“Found at position”<span class=\"token punctuation\">,</span> position<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n<span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>“<span class=\"token keyword\">not</span> found <span class=\"token keyword\">in</span> top “<span class=\"token operator\">+</span> <span class=\"token builtin\">str</span><span class=\"token punctuation\">(</span>position<span class=\"token punctuation\">)</span><span class=\"token operator\">+</span> “ results”<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">if</span> __name__ <span class=\"token operator\">==</span> “__main__”<span class=\"token punctuation\">:</span>\nschedule<span class=\"token punctuation\">.</span>every<span class=\"token punctuation\">(</span><span class=\"token number\">5</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>seconds<span class=\"token punctuation\">.</span>do<span class=\"token punctuation\">(</span>tracker<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">while</span> <span class=\"token boolean\">True</span><span class=\"token punctuation\">:</span>\n schedule<span class=\"token punctuation\">.</span>run_pending<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n</code></pre></div><p>Here we are running the schedule every 5 seconds just to test whether it will work for us or not. Once you run it you will get the results like this.</p><p>Now, to run it every day or after every 24 hours you can use:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\">schedule<span class=\"token punctuation\">.</span>every<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>day<span class=\"token punctuation\">.</span>at<span class=\"token punctuation\">(</span><span class=\"token string\">\"12:00\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>do<span class=\"token punctuation\">(</span>job<span class=\"token punctuation\">)</span></code></pre></div><p>Now, let us mail ourselves these results to keep us updated with the latest position on google. For this task, we will use<a href=\"https://docs.python.org/3/library/smtplib.html\"> smtplib</a> library.</p><h3 id=\"mail\">Mail</h3><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token keyword\">import</span> requests\n<span class=\"token keyword\">from</span> bs4 <span class=\"token keyword\">import</span> BeautifulSoup\n<span class=\"token keyword\">from</span> urllib<span class=\"token punctuation\">.</span>parse <span class=\"token keyword\">import</span> urlparse\n<span class=\"token keyword\">import</span> schedule\n<span class=\"token keyword\">import</span> time\n<span class=\"token keyword\">import</span> smtplib<span class=\"token punctuation\">,</span> ssl\n<span class=\"token keyword\">def</span> <span class=\"token function\">mail</span><span class=\"token punctuation\">(</span>position<span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\nattackMsg <span class=\"token operator\">=</span> position\nserver <span class=\"token operator\">=</span> smtplib<span class=\"token punctuation\">.</span>SMTP<span class=\"token punctuation\">(</span>‘smtp<span class=\"token punctuation\">.</span>gmail<span class=\"token punctuation\">.</span>com’<span class=\"token punctuation\">,</span> <span class=\"token number\">587</span><span class=\"token punctuation\">)</span>\nserver<span class=\"token punctuation\">.</span>ehlo<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\nserver<span class=\"token punctuation\">.</span>starttls<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\nserver<span class=\"token punctuation\">.</span>login<span class=\"token punctuation\">(</span>“<span class=\"token keyword\">from</span>@gmail<span class=\"token punctuation\">.</span>com”<span class=\"token punctuation\">,</span> “xxxx”<span class=\"token punctuation\">)</span>\nSUBJECT <span class=\"token operator\">=</span> “Position Alert”\nmessage <span class=\"token operator\">=</span> ‘From<span class=\"token punctuation\">:</span> <span class=\"token keyword\">from</span>@gmail<span class=\"token punctuation\">.</span>com \\nSubject<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span><span class=\"token punctuation\">}</span>\\n\\n<span class=\"token punctuation\">{</span><span class=\"token punctuation\">}</span>’<span class=\"token punctuation\">.</span><span class=\"token builtin\">format</span><span class=\"token punctuation\">(</span>SUBJECT<span class=\"token punctuation\">,</span> attackMsg<span class=\"token punctuation\">)</span>\nserver<span class=\"token punctuation\">.</span>sendmail<span class=\"token punctuation\">(</span>“<span class=\"token keyword\">from</span>@gmail<span class=\"token punctuation\">.</span>com”<span class=\"token punctuation\">,</span> ‘send_to@gmail<span class=\"token punctuation\">.</span>com’<span class=\"token punctuation\">,</span> message<span class=\"token punctuation\">)</span>\n \nserver<span class=\"token punctuation\">.</span>quit<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">return</span> <span class=\"token boolean\">True</span>\n<span class=\"token keyword\">def</span> <span class=\"token function\">tracker</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\nheaders<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span>‘User<span class=\"token operator\">-</span>Agent’<span class=\"token punctuation\">:</span>’Mozilla<span class=\"token operator\">/</span><span class=\"token number\">5.0</span> <span class=\"token punctuation\">(</span>Windows NT <span class=\"token number\">10.0</span><span class=\"token punctuation\">;</span> Win64<span class=\"token punctuation\">;</span> x64<span class=\"token punctuation\">)</span> AppleWebKit<span class=\"token operator\">/</span><span class=\"token number\">537.36</span> <span class=\"token punctuation\">(</span>KHTML<span class=\"token punctuation\">,</span> like Gecko<span class=\"token punctuation\">)</span> Chrome<span class=\"token operator\">/</span><span class=\"token number\">104.0</span><span class=\"token number\">.0</span><span class=\"token number\">.0</span> Safari<span class=\"token operator\">/</span><span class=\"token number\">537.36</span><span class=\"token string\">',’referer’:’https://www.google.com'</span><span class=\"token punctuation\">}</span>\ntarget_url<span class=\"token operator\">=</span>’https<span class=\"token punctuation\">:</span><span class=\"token operator\">//</span>www<span class=\"token punctuation\">.</span>google<span class=\"token punctuation\">.</span>com<span class=\"token operator\">/</span>search?q<span class=\"token operator\">=</span>scrape<span class=\"token operator\">+</span>prices<span class=\"token operator\">&#x26;</span>num<span class=\"token operator\">=</span><span class=\"token number\">20</span>'\nresp <span class=\"token operator\">=</span> requests<span class=\"token punctuation\">.</span>get<span class=\"token punctuation\">(</span>target_url<span class=\"token punctuation\">,</span> headers<span class=\"token operator\">=</span>headers<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>resp<span class=\"token punctuation\">.</span>status_code<span class=\"token punctuation\">)</span>\nsoup<span class=\"token operator\">=</span>BeautifulSoup<span class=\"token punctuation\">(</span>resp<span class=\"token punctuation\">.</span>text<span class=\"token punctuation\">,</span>’html<span class=\"token punctuation\">.</span>parser’<span class=\"token punctuation\">)</span>\nresults <span class=\"token operator\">=</span> soup<span class=\"token punctuation\">.</span>find_all<span class=\"token punctuation\">(</span>“div”<span class=\"token punctuation\">,</span><span class=\"token punctuation\">{</span>“<span class=\"token keyword\">class</span>”<span class=\"token punctuation\">:</span>”jGGQ5e”<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span>\n<span class=\"token comment\"># print(results)</span>\n<span class=\"token keyword\">for</span> x <span class=\"token keyword\">in</span> <span class=\"token builtin\">range</span><span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">,</span><span class=\"token builtin\">len</span><span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n domain<span class=\"token operator\">=</span>urlparse<span class=\"token punctuation\">(</span>results<span class=\"token punctuation\">[</span>x<span class=\"token punctuation\">]</span><span class=\"token punctuation\">.</span>find<span class=\"token punctuation\">(</span>“div”<span class=\"token punctuation\">,</span><span class=\"token punctuation\">{</span>“<span class=\"token keyword\">class</span>”<span class=\"token punctuation\">:</span>”yuRUbf”<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>find<span class=\"token punctuation\">(</span>“a”<span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>get<span class=\"token punctuation\">(</span>“href”<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>netloc\n<span class=\"token keyword\">if</span><span class=\"token punctuation\">(</span>domain <span class=\"token operator\">==</span> ‘blog<span class=\"token punctuation\">.</span>christian<span class=\"token operator\">-</span>schou<span class=\"token punctuation\">.</span>dk’<span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n found<span class=\"token operator\">=</span><span class=\"token boolean\">True</span>\n position<span class=\"token operator\">=</span>x<span class=\"token operator\">+</span><span class=\"token number\">1</span>\n <span class=\"token keyword\">break</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n found<span class=\"token operator\">=</span><span class=\"token boolean\">False</span>\n position<span class=\"token operator\">=</span>x<span class=\"token operator\">+</span><span class=\"token number\">1</span>\n<span class=\"token keyword\">if</span><span class=\"token punctuation\">(</span>found<span class=\"token operator\">==</span><span class=\"token boolean\">True</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\nmessage<span class=\"token operator\">=</span>”Found at position “<span class=\"token operator\">+</span> <span class=\"token builtin\">str</span><span class=\"token punctuation\">(</span>position<span class=\"token punctuation\">)</span>\nmail<span class=\"token punctuation\">(</span>message<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\nmessage<span class=\"token operator\">=</span>”<span class=\"token keyword\">not</span> found <span class=\"token keyword\">in</span> top “<span class=\"token operator\">+</span> <span class=\"token builtin\">str</span><span class=\"token punctuation\">(</span>position<span class=\"token punctuation\">)</span><span class=\"token operator\">+</span> “ results”\nmail<span class=\"token punctuation\">(</span>message<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">if</span> __name__ <span class=\"token operator\">==</span> “__main__”<span class=\"token punctuation\">:</span>\nschedule<span class=\"token punctuation\">.</span>every<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>day<span class=\"token punctuation\">.</span>at<span class=\"token punctuation\">(</span><span class=\"token string\">\"12:00\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>do<span class=\"token punctuation\">(</span>job<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">while</span> <span class=\"token boolean\">True</span><span class=\"token punctuation\">:</span>\n schedule<span class=\"token punctuation\">.</span>run_pending<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span></code></pre></div><p>In the mail function, we are making a login attempt to our Gmail account with the password.</p><p>Then we have declared the subject and the message that will be sent to us. And finally we used .senemail function to send the email alert. This will send an email alert every 24 hours directly to your inbox.</p><p>Now, you might wonder if we stop the script our scheduler will stop working. Yes, you are right and to tackle it we are going to use<a href=\"https://janakiev.com/blog/python-background/\"> nohup</a>.</p><p>Nohup will ignore the hangup signal and will keep running your script even if you stop it.</p><p>I leave this task to you as homework in a hope that you will learn something new and unique.</p><h2 id=\"conclusion\">Conclusion</h2><p>In this post, we learned how we can create a task that can run at any given interval of time. We used four libraries i.e. requests, BS4, schedule, and smtplib to complete this task.</p><p>Now it does not stop here, you can create any type of scheduler like news updates, stock updates, etc. I am sure python will make your job fast and simple.</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Keyword rank tracking is very common in the world of marketing. Many marketing teams use expensive tools to track their website ranks for multiple keywords on a regular basis. Since they have to do it on a daily basis this comes quite costly for new businesses, individuals, or startups."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So in this post, we will create a crawler that will keep you updated with your latest rank on "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"any keyword you want to track"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"We will create a web scraper to "},{"type":"element","tagName":"a","properties":{"href":"https://www.scrapingdog.com/blog/scrape-google-search-results/"},"children":[{"type":"text","value":"scrape google search results"}]},{"type":"text","value":" using python. I am assuming that you have already installed python on your computer. We will begin with coding the web scraper."}]},{"type":"element","tagName":"h2","properties":{"id":"let%E2%80%99s-code"},"children":[{"type":"text","value":"Let’s code"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"First, we need to install all the necessary libraries."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"·        Requests"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"·        BeautifulSoup"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Create a folder and then install these libraries:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"mkdir"}]},{"type":"text","value":" googlescraper\npip "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"install"}]},{"type":"text","value":" requests\npip "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"install"}]},{"type":"text","value":" beautifulsoup4"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Then we will import these libraries into our file. You can name the file "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"googlescraper.py"}]},{"type":"text","value":":"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" requests\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" bs4 "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" BeautifulSoup"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Our target URL will change according to the keyword we want to scrape but the basic structure of the google URL will remain the same."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Google URL structure — "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"https://www.google.com/search?q={any keyword or phrase}"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For this blog post, our target keyword will be “scrape prices” and we have to find the rank of the domain "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"christian-schou.dk"}]},{"type":"text","value":" at this keyword."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So, our target URL will be"},{"type":"element","tagName":"a","properties":{"href":"https://www.google.com/search?q=scrape+prices"},"children":[{"type":"text","value":" this"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Let us first check whether this domain is present in the first 10 results or not.As you can see page URLs are located inside class "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"jGGQ5e"}]}]},{"type":"text","value":" and then into"},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":" "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"yuRUbf"}]},{"type":"text","value":". "}]},{"type":"text","value":"After this, we have to find a tag inside class "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"yuRUbf"}]}]},{"type":"text","value":" and then get the value of "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"href"}]}]},{"type":"text","value":" tag."}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"text","value":"headers"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"‘User"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"Agent’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"’Mozilla"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"5.0"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"Windows NT "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"10.0"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":" Win64"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":" x64"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" AppleWebKit"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"537.36"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"KHTML"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" like Gecko"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" Chrome"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"104.0"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":".0"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":".0"}]},{"type":"text","value":" Safari"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"537.36"}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"',’referer’:’https://www.google.com'"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":"\ntarget_url"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"’https"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"//"}]},{"type":"text","value":"www"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"google"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"com"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"text","value":"search?q"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"scrape"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":"prices'\nresp "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" requests"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"get"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"target_url"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" headers"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"headers"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"resp"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"status_code"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Here we have declared some headers like User-Agent and a Referer to act like a standard browser and not as a crawler."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Then we declared our target URL and finally made the GET request using the requests library. Once we run this code you should see "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"200"}]},{"type":"text","value":" on your terminal."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Now, our target is to find our domain. Let’s find it using BS4."}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"text","value":"soup"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"BeautifulSoup"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"resp"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"text"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":"’html"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"parser’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nresults "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" soup"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find_all"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“div”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"class"}]},{"type":"text","value":"”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"”jGGQ5e”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"We have used "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"html.parser"}]},{"type":"text","value":" inside the BS4 library to create a tree of our HTML code. "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"results"}]}]},{"type":"text","value":" array, you will get the HTML code of all the top 10 results."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In this list, we have to search our links one by one. For that, we are going to use for loop."}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" urllib"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"parse "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" urlparse\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"for"}]},{"type":"text","value":" x "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"in"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"range"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"0"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"len"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n   domain"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"urlparse"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"["}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"]"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"div\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"class\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"yuRUbf\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"a\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"get"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"href\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"netloc\n  \n   "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"domain "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"'blog.christian-schou.dk'"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n       found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"text","value":"\n       position"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"\n       "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"break"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":"\n   "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"else"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n       found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"False"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n   "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"Found at position\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" position"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"else"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n   "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"not found in top\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"len"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"We have used"},{"type":"element","tagName":"a","properties":{"href":"https://docs.python.org/3/library/urllib.parse.html"},"children":[{"type":"text","value":" urlparse"}]},{"type":"text","value":" library to parse out the domain from the link. Then we are trying to match our domain with the domain we extracted."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If it matches we will get the position and if it does not match then it will print not found."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Let us run this code and let’s see what we get."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Well, the request was successful as I can see a 200 but we could find this domain in the top 10 results."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Let’s search for it in the top 20 results, but for that, we need to change the target URL and add param &num=20 to our google URL."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Google URL will become "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"https://www.google.com/search?q=scrape+prices&num=20"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Run the program again and check whether you see this domain or not."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This time I found the domain in the 18th position on Google search results."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So, the rank of this domain for “scrape prices” is 18th in my country. This position will change according to the country as google display different results in different country."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This is how you can track the rank of any domain for any keyword. If you want to track it for different countries then you can use google search result scraper."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Going forward you can also create an SEO tool just like"},{"type":"element","tagName":"a","properties":{"href":"https://ahrefs.com/"},"children":[{"type":"text","value":" Ahref"}]},{"type":"text","value":" and"},{"type":"element","tagName":"a","properties":{"href":"https://www.semrush.com/"},"children":[{"type":"text","value":" Semrush"}]},{"type":"text","value":" or you can create a lead generation tool like"},{"type":"element","tagName":"a","properties":{"href":"https://snov.io/"},"children":[{"type":"text","value":" Snov"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"h3","properties":{"id":"complete-code"},"children":[{"type":"text","value":"Complete Code"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" requests\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" bs4 "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" BeautifulSoup\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" urllib"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"parse "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" urlparse\nheaders"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"‘User"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"Agent’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"’Mozilla"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"5.0"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"Windows NT "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"10.0"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":" Win64"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":" x64"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" AppleWebKit"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"537.36"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"KHTML"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" like Gecko"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" Chrome"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"104.0"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":".0"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":".0"}]},{"type":"text","value":" Safari"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"537.36"}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"',’referer’:’https://www.google.com'"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":"\ntarget_url"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"’https"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"//"}]},{"type":"text","value":"www"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"google"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"com"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"text","value":"search?q"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"scrape"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":"prices"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"&"}]},{"type":"text","value":"num"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"20"}]},{"type":"text","value":"'\nresp "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" requests"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"get"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"target_url"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" headers"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"headers"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"resp"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"status_code"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nsoup"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"BeautifulSoup"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"resp"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"text"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":"’html"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"parser’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nresults "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" soup"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find_all"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“div”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"class"}]},{"type":"text","value":"”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"”jGGQ5e”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":"# print(results)"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"for"}]},{"type":"text","value":" x "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"in"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"range"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"0"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"len"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\ndomain"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"urlparse"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"["}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"]"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“div”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"class"}]},{"type":"text","value":"”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"”yuRUbf”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“a”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"get"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“href”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"netloc\n \n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"domain "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"text","value":" ‘blog"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"christian"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"schou"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"dk’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n  found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"text","value":"\n  position"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"\n  "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"break"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"else"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n  found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"False"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“Found at position”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" position"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"else"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"not"}]},{"type":"text","value":" found "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"in"}]},{"type":"text","value":" top”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"len"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"}]}]}]},{"type":"element","tagName":"h2","properties":{"id":"running-the-code-every-24-hours"},"children":[{"type":"text","value":"Running the code every 24 hours"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Let’s say you want to track your position every 24 hours because you are putting lots of effort into marketing and you want to see results on daily basis."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For that you can mail yourself the current position every morning, this will keep you updated.We will use"},{"type":"element","tagName":"a","properties":{"href":"https://schedule.readthedocs.io/en/stable/"},"children":[{"type":"text","value":" schedule"}]},{"type":"text","value":" library to implement this task."}]},{"type":"element","tagName":"h3","properties":{"id":"complete-code-1"},"children":[{"type":"text","value":"Complete Code"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" requests\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" bs4 "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" BeautifulSoup\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" urllib"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"parse "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" urlparse\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" schedule\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" time\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"def"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"tracker"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\nheaders"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"‘User"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"Agent’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"’Mozilla"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"5.0"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"Windows NT "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"10.0"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":" Win64"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":" x64"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" AppleWebKit"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"537.36"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"KHTML"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" like Gecko"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" Chrome"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"104.0"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":".0"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":".0"}]},{"type":"text","value":" Safari"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"537.36"}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"',’referer’:’https://www.google.com'"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":"\ntarget_url"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"’https"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"//"}]},{"type":"text","value":"www"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"google"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"com"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"text","value":"search?q"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"scrape"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":"prices"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"&"}]},{"type":"text","value":"num"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"20"}]},{"type":"text","value":"'\nresp "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" requests"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"get"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"target_url"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" headers"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"headers"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"resp"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"status_code"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nsoup"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"BeautifulSoup"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"resp"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"text"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":"’html"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"parser’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nresults "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" soup"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find_all"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“div”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"class"}]},{"type":"text","value":"”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"”jGGQ5e”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":"# print(results)"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"for"}]},{"type":"text","value":" x "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"in"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"range"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"0"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"len"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n domain"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"urlparse"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"["}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"]"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“div”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"class"}]},{"type":"text","value":"”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"”yuRUbf”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“a”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"get"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“href”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"netloc\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"domain "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"text","value":" ‘blog"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"christian"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"schou"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"dk’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"text","value":"\n position"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"\n "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"break"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"else"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"False"}]},{"type":"text","value":"\n position"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“Found at position”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" position"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"else"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"not"}]},{"type":"text","value":" found "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"in"}]},{"type":"text","value":" top “"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"str"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"position"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":" “ results”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"text","value":" __name__ "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"text","value":" “__main__”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\nschedule"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"every"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"5"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"seconds"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"do"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"tracker"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"while"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n schedule"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"run_pending"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Here we are running the schedule every 5 seconds just to test whether it will work for us or not. Once you run it you will get the results like this."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Now, to run it every day or after every 24 hours you can use:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"text","value":"schedule"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"every"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"day"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"at"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"12:00\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"do"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"job"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Now, let us mail ourselves these results to keep us updated with the latest position on google. For this task, we will use"},{"type":"element","tagName":"a","properties":{"href":"https://docs.python.org/3/library/smtplib.html"},"children":[{"type":"text","value":" smtplib"}]},{"type":"text","value":" library."}]},{"type":"element","tagName":"h3","properties":{"id":"mail"},"children":[{"type":"text","value":"Mail"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" requests\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" bs4 "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" BeautifulSoup\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" urllib"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"parse "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" urlparse\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" schedule\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" time\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" smtplib"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" ssl\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"def"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"mail"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"position"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\nattackMsg "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" position\nserver "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" smtplib"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"SMTP"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"‘smtp"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"gmail"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"com’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"587"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nserver"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"ehlo"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nserver"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"starttls"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nserver"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"login"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":"@gmail"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"com”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" “xxxx”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nSUBJECT "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" “Position Alert”\nmessage "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" ‘From"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":"@gmail"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"com \\nSubject"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":"\\n\\n"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":"’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"format"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"SUBJECT"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" attackMsg"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nserver"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"sendmail"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":"@gmail"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"com”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" ‘send_to@gmail"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"com’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" message"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n \nserver"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"quit"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"return"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"def"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"tracker"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\nheaders"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"‘User"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"Agent’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"’Mozilla"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"5.0"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"Windows NT "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"10.0"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":" Win64"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":" x64"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" AppleWebKit"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"537.36"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"KHTML"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" like Gecko"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" Chrome"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"104.0"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":".0"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":".0"}]},{"type":"text","value":" Safari"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"537.36"}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"',’referer’:’https://www.google.com'"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":"\ntarget_url"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"’https"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"//"}]},{"type":"text","value":"www"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"google"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"com"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"text","value":"search?q"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"scrape"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":"prices"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"&"}]},{"type":"text","value":"num"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"20"}]},{"type":"text","value":"'\nresp "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" requests"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"get"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"target_url"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" headers"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"headers"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"print"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"resp"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"status_code"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nsoup"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"BeautifulSoup"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"resp"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"text"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":"’html"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"parser’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nresults "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" soup"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find_all"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“div”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"class"}]},{"type":"text","value":"”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"”jGGQ5e”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":"# print(results)"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"for"}]},{"type":"text","value":" x "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"in"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"range"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"0"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"len"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n domain"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"urlparse"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"results"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"["}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"]"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“div”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"“"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"class"}]},{"type":"text","value":"”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"”yuRUbf”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"find"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“a”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"get"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"“href”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"netloc\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"domain "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"text","value":" ‘blog"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"christian"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"schou"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"dk’"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"text","value":"\n position"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"\n "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"break"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":";"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"else"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"False"}]},{"type":"text","value":"\n position"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"x"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"found"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\nmessage"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"”Found at position “"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"str"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"position"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nmail"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"message"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"else"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\nmessage"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":"”"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"not"}]},{"type":"text","value":" found "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"in"}]},{"type":"text","value":" top “"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","builtin"]},"children":[{"type":"text","value":"str"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"position"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":" “ results”\nmail"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"message"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"if"}]},{"type":"text","value":" __name__ "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"=="}]},{"type":"text","value":" “__main__”"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\nschedule"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"every"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"day"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"at"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"12:00\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"do"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"job"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"while"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"True"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":"\n schedule"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"run_pending"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In the mail function, we are making a login attempt to our Gmail account with the password."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Then we have declared the subject and the message that will be sent to us. And finally we used .senemail function to send the email alert. This will send an email alert every 24 hours directly to your inbox."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Now, you might wonder if we stop the script our scheduler will stop working. Yes, you are right and to tackle it we are going to use"},{"type":"element","tagName":"a","properties":{"href":"https://janakiev.com/blog/python-background/"},"children":[{"type":"text","value":" nohup"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Nohup will ignore the hangup signal and will keep running your script even if you stop it."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"I leave this task to you as homework in a hope that you will learn something new and unique."}]},{"type":"element","tagName":"h2","properties":{"id":"conclusion"},"children":[{"type":"text","value":"Conclusion"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In this post, we learned how we can create a task that can run at any given interval of time. We used four libraries i.e. requests, BS4, schedule, and smtplib to complete this task."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Now it does not stop here, you can create any type of scheduler like news updates, stock updates, etc. I am sure python will make your job fast and simple."}]}],"data":{"quirksMode":false}},"tableOfContents":[{"id":"let%E2%80%99s-code","heading":"Let’s code","items":[{"id":"complete-code","heading":"Complete Code"}]},{"id":"running-the-code-every-24-hours","heading":"Running the code every 24 hours","items":[{"id":"complete-code-1","heading":"Complete Code"},{"id":"mail","heading":"Mail"}]},{"id":"conclusion","heading":"Conclusion"}]},"featureImageSharp":{"base":"serp-python.png","publicURL":"/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/serp-python.png","imageMeta":{"width":1040,"height":584},"childImageSharp":{"fluid":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAB0UlEQVQoz3VS3W/SUBzd32qib/sLTHjZi4mJkQcXHzRmih+Jm3aaDBfMcKwMBoOx1m0lBVoaEGSFlvbe9n5fU7ol9es83Kffuef8zvmtSSkJZVGMEcacc5mBWL2MCiHkP7EmhHC9ZQAggHGM8N8TrkdtD05B4M6XURwiImpd7ri35AvTPr/qHTU1hEmWBhHzEAWc7+x33j2rHW+Wn+eNV239fvPbU8VJyJzzzqWpNvVq67vRd0xrxNiNeTdGboQA44dPjrfXPx3lth/dKd/NHTwu7+nmj4TMGDs86ZTUU/VUrzQ0o++w1eaXwfCj1fTn0RyR4r72Ml8tPFTzG/X1e4Pi7rWUkvNEWdTbV1/VVqNj6N1BFKNUdhK6D+pbitOY+PBzrfehNFN2rL3GSNkN62qQxMkTZWH3oXbma21/aMFssgDjBSUOku819roECsVl9U3X3jwZvGiRCUhsp2WgmFMiKPmtE4TpNPDtXmjrpDtGFYNs6MrWxZefZxaehWnaEkZRAIAfhF4QskzVqYleZXReMGeub1mLt+2DnFEYzMecsxVZyvHUHY6m13PfXSxxpq3UBueMMSqlpIQIxmEEPT+glN3YFkL8cVv/w+13Io3mFxbdWtArs08/AAAAAElFTkSuQmCC","aspectRatio":1.7857142857142858,"src":"/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/60290/serp-python.png","srcSet":"/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/847ef/serp-python.png 175w,\n/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/91cba/serp-python.png 350w,\n/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/60290/serp-python.png 700w,\n/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/50033/serp-python.png 1040w","srcWebp":"/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/89afa/serp-python.webp","srcSetWebp":"/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/9fca7/serp-python.webp 175w,\n/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/37a4e/serp-python.webp 350w,\n/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/89afa/serp-python.webp 700w,\n/static/c7f2d7cb0a35bfefe5dee8bd3423a8af/e4875/serp-python.webp 1040w","sizes":"(max-width: 700px) 100vw, 700px"}}}},"next":{"id":"Ghost__Post__625dc17339840e1ac28750f8","title":"What is Representation Theory?","slug":"what-is-representation-theory","featured":false,"feature_image":"https://backend.shahednasser.com/content/images/2022/04/What-is-Representation-Theory.jpg","excerpt":"Representation theory is a field of Mathematics that has lots of applications in physics, number theory, and cryptography.","custom_excerpt":"Representation theory is a field of Mathematics that has lots of applications in physics, number theory, and cryptography.","visibility":"public","created_at_pretty":"18 Apr 2022","published_at_pretty":"18 Apr 2022","updated_at_pretty":"18 Apr 2022","created_at":"2022-04-18T19:52:19.000+00:00","published_at":"2022-04-18T19:54:03.000+00:00","updated_at":"2022-04-18T19:54:02.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"mohammad.jpg","publicURL":"/static/235d4863c99d493a85a384089d2bd383/mohammad.jpg","imageMeta":{"width":851,"height":956},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAWABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAUDAQb/xAAVAQEBAAAAAAAAAAAAAAAAAAABAP/aAAwDAQACEAMQAAABty9ZY+iTVYTxOBP/xAAcEAACAgIDAAAAAAAAAAAAAAABAgADBBIRExT/2gAIAQEAAQUCscVp7G2hezjtAbdzMhiZewJE/8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAEDAQE/ASN//8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAECAQE/AWd//8QAHxAAAgECBwAAAAAAAAAAAAAAAAERECECAyIxQVFh/9oACAEBAAY/AnifBfJcUuhNJSbj8ZpUd0//xAAdEAEAAwABBQAAAAAAAAAAAAABABExIVFhcZHB/9oACAEBAAE/IbA66JQQDa3mX2mVJtVDxJ2k3HrCUNfGDeYlqcif/9oADAMBAAIAAwAAABBHzz3/xAAXEQEBAQEAAAAAAAAAAAAAAAARAQAQ/9oACAEDAQE/EJA3LPP/xAAYEQACAwAAAAAAAAAAAAAAAAAAARARYf/aAAgBAgEBPxDBUUf/xAAeEAEAAgMAAgMAAAAAAAAAAAABABEhMUFRYXGBkf/aAAgBAQABPxAaFVg2qtAfbEAIJzFtaqOUWxtoU1mHsBUyb21b8TSKPpUSm+XTj9gUpVAFsGscgRd/LP/Z","aspectRatio":0.9032258064516129,"src":"/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg","srcSet":"/static/235d4863c99d493a85a384089d2bd383/f340b/mohammad.jpg 28w,\n/static/235d4863c99d493a85a384089d2bd383/22d64/mohammad.jpg 55w,\n/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg 110w,\n/static/235d4863c99d493a85a384089d2bd383/aa249/mohammad.jpg 165w,\n/static/235d4863c99d493a85a384089d2bd383/0dc33/mohammad.jpg 220w,\n/static/235d4863c99d493a85a384089d2bd383/3abfd/mohammad.jpg 851w","srcWebp":"/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp","srcSetWebp":"/static/235d4863c99d493a85a384089d2bd383/59cda/mohammad.webp 28w,\n/static/235d4863c99d493a85a384089d2bd383/7da75/mohammad.webp 55w,\n/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp 110w,\n/static/235d4863c99d493a85a384089d2bd383/f282e/mohammad.webp 165w,\n/static/235d4863c99d493a85a384089d2bd383/a7b21/mohammad.webp 220w,\n/static/235d4863c99d493a85a384089d2bd383/c1cbf/mohammad.webp 851w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"Representation theory is a field of Mathematics, known in 1896 by the German\nmathematician Frobenius, that has lots of applications in physics, number\ntheory, and cryptography.\n\nIn representation theory, mathematicians study representations of algebras\n(group, rings, topological spaces) by representing their elements as linear\ntransformations of vector spaces. More specifically, a representation makes\nabstract algebraic objects more concrete by transforming them into matrices.\n\nThe importance of representation theory is that abstract problems are reduced to\nproblems in linear algebra which is a well-known theory in mathematics.\n\nAn important branch of representation theory is \"group\nrepresentation theory\", in which the group elements are represented by\ninvertible matrices. Consequently, we work with matrix multiplication instead of\nworking with the original group operation.\n\nMore exactly, a \"representation\" of group G means a homomorphism mapping from G\nto the automorphism group of the object.\n\nThis asks for a possible way to view a group as a permutation group or a linear\ngroup. More narrowly, it considers homomorphisms from the group into the matrix\ngroup GLn(C), where C is most frequently the field of complex numbers.\n\nAlso, representation theory depends heavily on the type of vector space on which\nthe algebra acts. One must consider the type of field over which the vector\nspace is defined. The most important cases are the field of complex numbers and\nthe field of real numbers.","html":"<p>Representation theory is a field of Mathematics, known in 1896 by the German mathematician Frobenius, that has lots of applications in physics, number theory, and cryptography.</p><p>In representation theory, mathematicians study representations of algebras (group, rings, topological spaces) by representing their elements as linear transformations of vector spaces. More specifically, a representation makes abstract algebraic objects more concrete by transforming them into matrices.</p><p>The importance of representation theory is that abstract problems are reduced to problems in linear algebra which is a well-known theory in mathematics.</p><p>An important branch of representation theory is \"group<br>representation theory\", in which the group elements are represented by invertible matrices. Consequently, we work with matrix multiplication instead of working with the original group operation.</p><p>More exactly, a \"representation\" of group G means a homomorphism mapping from G to the automorphism group of the object.</p><p>This asks for a possible way to view a group as a permutation group or a linear group. More narrowly, it considers homomorphisms from the group into the matrix group GLn(C), where C is most frequently the field of complex numbers.</p><p>Also, representation theory depends heavily on the type of vector space on which the algebra acts. One must consider the type of field over which the vector space is defined. The most important cases are the field of complex numbers and the field of real numbers.</p>","url":"https://backend.shahednasser.com/what-is-representation-theory/","canonical_url":null,"uuid":"91c4c209-3da7-4a4f-a423-6f165804f461","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"625dc17339840e1ac28750f8","reading_time":1,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>Representation theory is a field of Mathematics, known in 1896 by the German mathematician Frobenius, that has lots of applications in physics, number theory, and cryptography.</p><p>In representation theory, mathematicians study representations of algebras (group, rings, topological spaces) by representing their elements as linear transformations of vector spaces. More specifically, a representation makes abstract algebraic objects more concrete by transforming them into matrices.</p><p>The importance of representation theory is that abstract problems are reduced to problems in linear algebra which is a well-known theory in mathematics.</p><p>An important branch of representation theory is \"group<br>representation theory\", in which the group elements are represented by invertible matrices. Consequently, we work with matrix multiplication instead of working with the original group operation.</p><p>More exactly, a \"representation\" of group G means a homomorphism mapping from G to the automorphism group of the object.</p><p>This asks for a possible way to view a group as a permutation group or a linear group. More narrowly, it considers homomorphisms from the group into the matrix group GLn(C), where C is most frequently the field of complex numbers.</p><p>Also, representation theory depends heavily on the type of vector space on which the algebra acts. One must consider the type of field over which the vector space is defined. The most important cases are the field of complex numbers and the field of real numbers.</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Representation theory is a field of Mathematics, known in 1896 by the German mathematician Frobenius, that has lots of applications in physics, number theory, and cryptography."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In representation theory, mathematicians study representations of algebras (group, rings, topological spaces) by representing their elements as linear transformations of vector spaces. More specifically, a representation makes abstract algebraic objects more concrete by transforming them into matrices."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The importance of representation theory is that abstract problems are reduced to problems in linear algebra which is a well-known theory in mathematics."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"An important branch of representation theory is \"group"},{"type":"element","tagName":"br","properties":{},"children":[]},{"type":"text","value":"representation theory\", in which the group elements are represented by invertible matrices. Consequently, we work with matrix multiplication instead of working with the original group operation."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"More exactly, a \"representation\" of group G means a homomorphism mapping from G to the automorphism group of the object."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This asks for a possible way to view a group as a permutation group or a linear group. More narrowly, it considers homomorphisms from the group into the matrix group GLn(C), where C is most frequently the field of complex numbers."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Also, representation theory depends heavily on the type of vector space on which the algebra acts. One must consider the type of field over which the vector space is defined. The most important cases are the field of complex numbers and the field of real numbers."}]}],"data":{"quirksMode":false}},"tableOfContents":[]},"featureImageSharp":{"base":"What-is-Representation-Theory.jpg","publicURL":"/static/e11db6c9495534768e7a31d8655c4223/What-is-Representation-Theory.jpg","imageMeta":{"width":1560,"height":876},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAECBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAe60Io//xAAWEAEBAQAAAAAAAAAAAAAAAAARACD/2gAIAQEAAQUCZz//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/AT//xAAWEAEBAQAAAAAAAAAAAAAAAAAxACD/2gAIAQEABj8CIz//xAAaEAACAgMAAAAAAAAAAAAAAAAAEQFRICFB/9oACAEBAAE/IWuNcjfFh//aAAwDAQACAAMAAAAQ48//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAdEAEAAgAHAAAAAAAAAAAAAAABABEgIUFhodHx/9oACAEBAAE/EEVBa1sz5nqncSLVscH/2Q==","aspectRatio":1.7857142857142858,"src":"/static/e11db6c9495534768e7a31d8655c4223/ea4ab/What-is-Representation-Theory.jpg","srcSet":"/static/e11db6c9495534768e7a31d8655c4223/477ba/What-is-Representation-Theory.jpg 175w,\n/static/e11db6c9495534768e7a31d8655c4223/06776/What-is-Representation-Theory.jpg 350w,\n/static/e11db6c9495534768e7a31d8655c4223/ea4ab/What-is-Representation-Theory.jpg 700w,\n/static/e11db6c9495534768e7a31d8655c4223/3055e/What-is-Representation-Theory.jpg 1050w,\n/static/e11db6c9495534768e7a31d8655c4223/eff08/What-is-Representation-Theory.jpg 1400w,\n/static/e11db6c9495534768e7a31d8655c4223/81a53/What-is-Representation-Theory.jpg 1560w","srcWebp":"/static/e11db6c9495534768e7a31d8655c4223/89afa/What-is-Representation-Theory.webp","srcSetWebp":"/static/e11db6c9495534768e7a31d8655c4223/9fca7/What-is-Representation-Theory.webp 175w,\n/static/e11db6c9495534768e7a31d8655c4223/37a4e/What-is-Representation-Theory.webp 350w,\n/static/e11db6c9495534768e7a31d8655c4223/89afa/What-is-Representation-Theory.webp 700w,\n/static/e11db6c9495534768e7a31d8655c4223/78e7a/What-is-Representation-Theory.webp 1050w,\n/static/e11db6c9495534768e7a31d8655c4223/03d34/What-is-Representation-Theory.webp 1400w,\n/static/e11db6c9495534768e7a31d8655c4223/f5845/What-is-Representation-Theory.webp 1560w","sizes":"(max-width: 700px) 100vw, 700px"}}}},"allGhostPost":{"edges":[{"node":{"id":"Ghost__Post__625dc17339840e1ac28750f8","title":"What is Representation Theory?","slug":"what-is-representation-theory","featured":false,"feature_image":"https://backend.shahednasser.com/content/images/2022/04/What-is-Representation-Theory.jpg","excerpt":"Representation theory is a field of Mathematics that has lots of applications in physics, number theory, and cryptography.","custom_excerpt":"Representation theory is a field of Mathematics that has lots of applications in physics, number theory, and cryptography.","visibility":"public","created_at_pretty":"18 Apr 2022","published_at_pretty":"18 Apr 2022","updated_at_pretty":"18 Apr 2022","created_at":"2022-04-18T19:52:19.000+00:00","published_at":"2022-04-18T19:54:03.000+00:00","updated_at":"2022-04-18T19:54:02.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"mohammad.jpg","publicURL":"/static/235d4863c99d493a85a384089d2bd383/mohammad.jpg","imageMeta":{"width":851,"height":956},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAWABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAUDAQb/xAAVAQEBAAAAAAAAAAAAAAAAAAABAP/aAAwDAQACEAMQAAABty9ZY+iTVYTxOBP/xAAcEAACAgIDAAAAAAAAAAAAAAABAgADBBIRExT/2gAIAQEAAQUCscVp7G2hezjtAbdzMhiZewJE/8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAEDAQE/ASN//8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAECAQE/AWd//8QAHxAAAgECBwAAAAAAAAAAAAAAAAERECECAyIxQVFh/9oACAEBAAY/AnifBfJcUuhNJSbj8ZpUd0//xAAdEAEAAwABBQAAAAAAAAAAAAABABExIVFhcZHB/9oACAEBAAE/IbA66JQQDa3mX2mVJtVDxJ2k3HrCUNfGDeYlqcif/9oADAMBAAIAAwAAABBHzz3/xAAXEQEBAQEAAAAAAAAAAAAAAAARAQAQ/9oACAEDAQE/EJA3LPP/xAAYEQACAwAAAAAAAAAAAAAAAAAAARARYf/aAAgBAgEBPxDBUUf/xAAeEAEAAgMAAgMAAAAAAAAAAAABABEhMUFRYXGBkf/aAAgBAQABPxAaFVg2qtAfbEAIJzFtaqOUWxtoU1mHsBUyb21b8TSKPpUSm+XTj9gUpVAFsGscgRd/LP/Z","aspectRatio":0.9032258064516129,"src":"/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg","srcSet":"/static/235d4863c99d493a85a384089d2bd383/f340b/mohammad.jpg 28w,\n/static/235d4863c99d493a85a384089d2bd383/22d64/mohammad.jpg 55w,\n/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg 110w,\n/static/235d4863c99d493a85a384089d2bd383/aa249/mohammad.jpg 165w,\n/static/235d4863c99d493a85a384089d2bd383/0dc33/mohammad.jpg 220w,\n/static/235d4863c99d493a85a384089d2bd383/3abfd/mohammad.jpg 851w","srcWebp":"/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp","srcSetWebp":"/static/235d4863c99d493a85a384089d2bd383/59cda/mohammad.webp 28w,\n/static/235d4863c99d493a85a384089d2bd383/7da75/mohammad.webp 55w,\n/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp 110w,\n/static/235d4863c99d493a85a384089d2bd383/f282e/mohammad.webp 165w,\n/static/235d4863c99d493a85a384089d2bd383/a7b21/mohammad.webp 220w,\n/static/235d4863c99d493a85a384089d2bd383/c1cbf/mohammad.webp 851w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"Representation theory is a field of Mathematics, known in 1896 by the German\nmathematician Frobenius, that has lots of applications in physics, number\ntheory, and cryptography.\n\nIn representation theory, mathematicians study representations of algebras\n(group, rings, topological spaces) by representing their elements as linear\ntransformations of vector spaces. More specifically, a representation makes\nabstract algebraic objects more concrete by transforming them into matrices.\n\nThe importance of representation theory is that abstract problems are reduced to\nproblems in linear algebra which is a well-known theory in mathematics.\n\nAn important branch of representation theory is \"group\nrepresentation theory\", in which the group elements are represented by\ninvertible matrices. Consequently, we work with matrix multiplication instead of\nworking with the original group operation.\n\nMore exactly, a \"representation\" of group G means a homomorphism mapping from G\nto the automorphism group of the object.\n\nThis asks for a possible way to view a group as a permutation group or a linear\ngroup. More narrowly, it considers homomorphisms from the group into the matrix\ngroup GLn(C), where C is most frequently the field of complex numbers.\n\nAlso, representation theory depends heavily on the type of vector space on which\nthe algebra acts. One must consider the type of field over which the vector\nspace is defined. The most important cases are the field of complex numbers and\nthe field of real numbers.","html":"<p>Representation theory is a field of Mathematics, known in 1896 by the German mathematician Frobenius, that has lots of applications in physics, number theory, and cryptography.</p><p>In representation theory, mathematicians study representations of algebras (group, rings, topological spaces) by representing their elements as linear transformations of vector spaces. More specifically, a representation makes abstract algebraic objects more concrete by transforming them into matrices.</p><p>The importance of representation theory is that abstract problems are reduced to problems in linear algebra which is a well-known theory in mathematics.</p><p>An important branch of representation theory is \"group<br>representation theory\", in which the group elements are represented by invertible matrices. Consequently, we work with matrix multiplication instead of working with the original group operation.</p><p>More exactly, a \"representation\" of group G means a homomorphism mapping from G to the automorphism group of the object.</p><p>This asks for a possible way to view a group as a permutation group or a linear group. More narrowly, it considers homomorphisms from the group into the matrix group GLn(C), where C is most frequently the field of complex numbers.</p><p>Also, representation theory depends heavily on the type of vector space on which the algebra acts. One must consider the type of field over which the vector space is defined. The most important cases are the field of complex numbers and the field of real numbers.</p>","url":"https://backend.shahednasser.com/what-is-representation-theory/","canonical_url":null,"uuid":"91c4c209-3da7-4a4f-a423-6f165804f461","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"625dc17339840e1ac28750f8","reading_time":1,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>Representation theory is a field of Mathematics, known in 1896 by the German mathematician Frobenius, that has lots of applications in physics, number theory, and cryptography.</p><p>In representation theory, mathematicians study representations of algebras (group, rings, topological spaces) by representing their elements as linear transformations of vector spaces. More specifically, a representation makes abstract algebraic objects more concrete by transforming them into matrices.</p><p>The importance of representation theory is that abstract problems are reduced to problems in linear algebra which is a well-known theory in mathematics.</p><p>An important branch of representation theory is \"group<br>representation theory\", in which the group elements are represented by invertible matrices. Consequently, we work with matrix multiplication instead of working with the original group operation.</p><p>More exactly, a \"representation\" of group G means a homomorphism mapping from G to the automorphism group of the object.</p><p>This asks for a possible way to view a group as a permutation group or a linear group. More narrowly, it considers homomorphisms from the group into the matrix group GLn(C), where C is most frequently the field of complex numbers.</p><p>Also, representation theory depends heavily on the type of vector space on which the algebra acts. One must consider the type of field over which the vector space is defined. The most important cases are the field of complex numbers and the field of real numbers.</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Representation theory is a field of Mathematics, known in 1896 by the German mathematician Frobenius, that has lots of applications in physics, number theory, and cryptography."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In representation theory, mathematicians study representations of algebras (group, rings, topological spaces) by representing their elements as linear transformations of vector spaces. More specifically, a representation makes abstract algebraic objects more concrete by transforming them into matrices."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The importance of representation theory is that abstract problems are reduced to problems in linear algebra which is a well-known theory in mathematics."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"An important branch of representation theory is \"group"},{"type":"element","tagName":"br","properties":{},"children":[]},{"type":"text","value":"representation theory\", in which the group elements are represented by invertible matrices. Consequently, we work with matrix multiplication instead of working with the original group operation."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"More exactly, a \"representation\" of group G means a homomorphism mapping from G to the automorphism group of the object."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This asks for a possible way to view a group as a permutation group or a linear group. More narrowly, it considers homomorphisms from the group into the matrix group GLn(C), where C is most frequently the field of complex numbers."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Also, representation theory depends heavily on the type of vector space on which the algebra acts. One must consider the type of field over which the vector space is defined. The most important cases are the field of complex numbers and the field of real numbers."}]}],"data":{"quirksMode":false}},"tableOfContents":[]},"featureImageSharp":{"base":"What-is-Representation-Theory.jpg","publicURL":"/static/e11db6c9495534768e7a31d8655c4223/What-is-Representation-Theory.jpg","imageMeta":{"width":1560,"height":876},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAECBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAe60Io//xAAWEAEBAQAAAAAAAAAAAAAAAAARACD/2gAIAQEAAQUCZz//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/AT//xAAWEAEBAQAAAAAAAAAAAAAAAAAxACD/2gAIAQEABj8CIz//xAAaEAACAgMAAAAAAAAAAAAAAAAAEQFRICFB/9oACAEBAAE/IWuNcjfFh//aAAwDAQACAAMAAAAQ48//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAdEAEAAgAHAAAAAAAAAAAAAAABABEgIUFhodHx/9oACAEBAAE/EEVBa1sz5nqncSLVscH/2Q==","aspectRatio":1.7857142857142858,"src":"/static/e11db6c9495534768e7a31d8655c4223/ea4ab/What-is-Representation-Theory.jpg","srcSet":"/static/e11db6c9495534768e7a31d8655c4223/477ba/What-is-Representation-Theory.jpg 175w,\n/static/e11db6c9495534768e7a31d8655c4223/06776/What-is-Representation-Theory.jpg 350w,\n/static/e11db6c9495534768e7a31d8655c4223/ea4ab/What-is-Representation-Theory.jpg 700w,\n/static/e11db6c9495534768e7a31d8655c4223/3055e/What-is-Representation-Theory.jpg 1050w,\n/static/e11db6c9495534768e7a31d8655c4223/eff08/What-is-Representation-Theory.jpg 1400w,\n/static/e11db6c9495534768e7a31d8655c4223/81a53/What-is-Representation-Theory.jpg 1560w","srcWebp":"/static/e11db6c9495534768e7a31d8655c4223/89afa/What-is-Representation-Theory.webp","srcSetWebp":"/static/e11db6c9495534768e7a31d8655c4223/9fca7/What-is-Representation-Theory.webp 175w,\n/static/e11db6c9495534768e7a31d8655c4223/37a4e/What-is-Representation-Theory.webp 350w,\n/static/e11db6c9495534768e7a31d8655c4223/89afa/What-is-Representation-Theory.webp 700w,\n/static/e11db6c9495534768e7a31d8655c4223/78e7a/What-is-Representation-Theory.webp 1050w,\n/static/e11db6c9495534768e7a31d8655c4223/03d34/What-is-Representation-Theory.webp 1400w,\n/static/e11db6c9495534768e7a31d8655c4223/f5845/What-is-Representation-Theory.webp 1560w","sizes":"(max-width: 700px) 100vw, 700px"}}}}},{"node":{"id":"Ghost__Post__61cb166d61dbd80628bf9865","title":"What is Mathematical Induction","slug":"what-is-mathematical-induction","featured":false,"feature_image":"https://backend.shahednasser.com/content/images/2021/12/tom-wilson-Em2hPK55o8g-unsplash-2.jpg","excerpt":"Mathematical induction is one of the most important proof techniques in math.","custom_excerpt":"Mathematical induction is one of the most important proof techniques in math.","visibility":"public","created_at_pretty":"28 Dec 2021","published_at_pretty":"26 Dec 2021","updated_at_pretty":"28 Dec 2021","created_at":"2021-12-28T13:51:41.000+00:00","published_at":"2021-12-26T13:54:00.000+00:00","updated_at":"2021-12-28T13:55:28.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"mohammad.jpg","publicURL":"/static/235d4863c99d493a85a384089d2bd383/mohammad.jpg","imageMeta":{"width":851,"height":956},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAWABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAUDAQb/xAAVAQEBAAAAAAAAAAAAAAAAAAABAP/aAAwDAQACEAMQAAABty9ZY+iTVYTxOBP/xAAcEAACAgIDAAAAAAAAAAAAAAABAgADBBIRExT/2gAIAQEAAQUCscVp7G2hezjtAbdzMhiZewJE/8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAEDAQE/ASN//8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAECAQE/AWd//8QAHxAAAgECBwAAAAAAAAAAAAAAAAERECECAyIxQVFh/9oACAEBAAY/AnifBfJcUuhNJSbj8ZpUd0//xAAdEAEAAwABBQAAAAAAAAAAAAABABExIVFhcZHB/9oACAEBAAE/IbA66JQQDa3mX2mVJtVDxJ2k3HrCUNfGDeYlqcif/9oADAMBAAIAAwAAABBHzz3/xAAXEQEBAQEAAAAAAAAAAAAAAAARAQAQ/9oACAEDAQE/EJA3LPP/xAAYEQACAwAAAAAAAAAAAAAAAAAAARARYf/aAAgBAgEBPxDBUUf/xAAeEAEAAgMAAgMAAAAAAAAAAAABABEhMUFRYXGBkf/aAAgBAQABPxAaFVg2qtAfbEAIJzFtaqOUWxtoU1mHsBUyb21b8TSKPpUSm+XTj9gUpVAFsGscgRd/LP/Z","aspectRatio":0.9032258064516129,"src":"/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg","srcSet":"/static/235d4863c99d493a85a384089d2bd383/f340b/mohammad.jpg 28w,\n/static/235d4863c99d493a85a384089d2bd383/22d64/mohammad.jpg 55w,\n/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg 110w,\n/static/235d4863c99d493a85a384089d2bd383/aa249/mohammad.jpg 165w,\n/static/235d4863c99d493a85a384089d2bd383/0dc33/mohammad.jpg 220w,\n/static/235d4863c99d493a85a384089d2bd383/3abfd/mohammad.jpg 851w","srcWebp":"/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp","srcSetWebp":"/static/235d4863c99d493a85a384089d2bd383/59cda/mohammad.webp 28w,\n/static/235d4863c99d493a85a384089d2bd383/7da75/mohammad.webp 55w,\n/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp 110w,\n/static/235d4863c99d493a85a384089d2bd383/f282e/mohammad.webp 165w,\n/static/235d4863c99d493a85a384089d2bd383/a7b21/mohammad.webp 220w,\n/static/235d4863c99d493a85a384089d2bd383/c1cbf/mohammad.webp 851w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"Mathematical induction is one of the most important proof techniques in math.\nThis technique is like a chain of objects in the picture attached.\n\nActually, we use this technique in order to prove that a statement p(n) is true\nfor any natural number n.\n\nThis technique is divided into two parts:\n\nFirst part, we have to show that p(0) is true, that is the statement is true for\nn=0 (actually not especially for n=0, but for the lower bound of n that is\nmentioned in the theorem).\n\nIn the second part, we assume that p(n) is true and then we prove that p(n+1) is\nalso true.\n\nFrom these two steps, we can easily see that p(0) is true, which implies that\np(1) is true, which yields also that p(2) is true, and so on we get p(n) is true\nfor any natural number n.\n\nThis way of thinking is actually brilliant, and it is one of the issues that mix\nlogic with math.","html":"<p>Mathematical induction is one of the most important proof techniques in math.<br>This technique is like a chain of objects in the picture attached.</p><p>Actually, we use this technique in order to prove that a statement p(n) is true for any natural number n.</p><p>This technique is divided into two parts:</p><p>First part, we have to show that p(0) is true, that is the statement is true for n=0 (actually not especially for n=0, but for the lower bound of n that is mentioned in the theorem).</p><p>In the second part, we assume that p(n) is true and then we prove that p(n+1) is also true.</p><p>From these two steps, we can easily see that p(0) is true, which implies that p(1) is true, which yields also that p(2) is true, and so on we get p(n) is true for any natural number n.</p><p>This way of thinking is actually brilliant, and it is one of the issues that mix logic with math.</p>","url":"https://backend.shahednasser.com/what-is-mathematical-induction/","canonical_url":null,"uuid":"4f537484-b79e-4e89-846f-0bd51063fce0","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"61cb166d61dbd80628bf9865","reading_time":1,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>Mathematical induction is one of the most important proof techniques in math.<br>This technique is like a chain of objects in the picture attached.</p><p>Actually, we use this technique in order to prove that a statement p(n) is true for any natural number n.</p><p>This technique is divided into two parts:</p><p>First part, we have to show that p(0) is true, that is the statement is true for n=0 (actually not especially for n=0, but for the lower bound of n that is mentioned in the theorem).</p><p>In the second part, we assume that p(n) is true and then we prove that p(n+1) is also true.</p><p>From these two steps, we can easily see that p(0) is true, which implies that p(1) is true, which yields also that p(2) is true, and so on we get p(n) is true for any natural number n.</p><p>This way of thinking is actually brilliant, and it is one of the issues that mix logic with math.</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Mathematical induction is one of the most important proof techniques in math."},{"type":"element","tagName":"br","properties":{},"children":[]},{"type":"text","value":"This technique is like a chain of objects in the picture attached."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Actually, we use this technique in order to prove that a statement p(n) is true for any natural number n."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This technique is divided into two parts:"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"First part, we have to show that p(0) is true, that is the statement is true for n=0 (actually not especially for n=0, but for the lower bound of n that is mentioned in the theorem)."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In the second part, we assume that p(n) is true and then we prove that p(n+1) is also true."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"From these two steps, we can easily see that p(0) is true, which implies that p(1) is true, which yields also that p(2) is true, and so on we get p(n) is true for any natural number n."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This way of thinking is actually brilliant, and it is one of the issues that mix logic with math."}]}],"data":{"quirksMode":false}},"tableOfContents":[]},"featureImageSharp":{"base":"tom-wilson-Em2hPK55o8g-unsplash-2.jpg","publicURL":"/static/830dbdca6e3bb3b7fdfb0886d8781c84/tom-wilson-Em2hPK55o8g-unsplash-2.jpg","imageMeta":{"width":1920,"height":1440},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAPABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAMEBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAcl8lpnDQ//EABkQAAMBAQEAAAAAAAAAAAAAAAECAwAEEf/aAAgBAQABBQJJFg3JQLgxGl0MDQ+0/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAGxAAAgIDAQAAAAAAAAAAAAAAABEBAhAhYXH/2gAIAQEABj8CbgcK3mdlp6f/xAAZEAEBAQEBAQAAAAAAAAAAAAABEQAhUWH/2gAIAQEAAT8hFgr7qjALF3JHuNg6CXN9Jrf/2gAMAwEAAgADAAAAEHgv/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGhABAQEAAwEAAAAAAAAAAAAAAREAITFBsf/aAAgBAQABPxAlDRK8ZltkHwHvIgEThE6w2cNzoIlmEj2z/9k=","aspectRatio":1.3358778625954197,"src":"/static/830dbdca6e3bb3b7fdfb0886d8781c84/ea4ab/tom-wilson-Em2hPK55o8g-unsplash-2.jpg","srcSet":"/static/830dbdca6e3bb3b7fdfb0886d8781c84/477ba/tom-wilson-Em2hPK55o8g-unsplash-2.jpg 175w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/06776/tom-wilson-Em2hPK55o8g-unsplash-2.jpg 350w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/ea4ab/tom-wilson-Em2hPK55o8g-unsplash-2.jpg 700w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/3055e/tom-wilson-Em2hPK55o8g-unsplash-2.jpg 1050w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/eff08/tom-wilson-Em2hPK55o8g-unsplash-2.jpg 1400w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/74fd5/tom-wilson-Em2hPK55o8g-unsplash-2.jpg 1920w","srcWebp":"/static/830dbdca6e3bb3b7fdfb0886d8781c84/89afa/tom-wilson-Em2hPK55o8g-unsplash-2.webp","srcSetWebp":"/static/830dbdca6e3bb3b7fdfb0886d8781c84/9fca7/tom-wilson-Em2hPK55o8g-unsplash-2.webp 175w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/37a4e/tom-wilson-Em2hPK55o8g-unsplash-2.webp 350w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/89afa/tom-wilson-Em2hPK55o8g-unsplash-2.webp 700w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/78e7a/tom-wilson-Em2hPK55o8g-unsplash-2.webp 1050w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/03d34/tom-wilson-Em2hPK55o8g-unsplash-2.webp 1400w,\n/static/830dbdca6e3bb3b7fdfb0886d8781c84/6833b/tom-wilson-Em2hPK55o8g-unsplash-2.webp 1920w","sizes":"(max-width: 700px) 100vw, 700px"}}}}},{"node":{"id":"Ghost__Post__6127ba1b3ed159214d382eb9","title":"What is Proof by Contradiction","slug":"what-is-proof-by-contradiction","featured":false,"feature_image":"https://res-3.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg","excerpt":"Proving using contradiction stays the more famous and familiar way mathematicians like to use.","custom_excerpt":"Proving using contradiction stays the more famous and familiar way mathematicians like to use.","visibility":"public","created_at_pretty":"3 Aug 2021","published_at_pretty":"3 Aug 2021","updated_at_pretty":"26 Aug 2021","created_at":"2021-08-03T06:30:46.000+00:00","published_at":"2021-08-03T06:36:39.000+00:00","updated_at":"2021-08-26T17:34:08.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"mohammad","url":"https://backend.shahednasser.com/author/mohammad/","name":"Mohammad Nasser","bio":"Ph.D. in Mathematics (Algebra). Math Instructor and Researcher. Education Manager.","cover_image":null,"profile_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/mohammad.jpg","location":"Lebanon","website":null,"twitter":null,"facebook":"Mohamadnasser170890/","meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"mohammad.jpg","publicURL":"/static/235d4863c99d493a85a384089d2bd383/mohammad.jpg","imageMeta":{"width":851,"height":956},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAWABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAUDAQb/xAAVAQEBAAAAAAAAAAAAAAAAAAABAP/aAAwDAQACEAMQAAABty9ZY+iTVYTxOBP/xAAcEAACAgIDAAAAAAAAAAAAAAABAgADBBIRExT/2gAIAQEAAQUCscVp7G2hezjtAbdzMhiZewJE/8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAEDAQE/ASN//8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAECAQE/AWd//8QAHxAAAgECBwAAAAAAAAAAAAAAAAERECECAyIxQVFh/9oACAEBAAY/AnifBfJcUuhNJSbj8ZpUd0//xAAdEAEAAwABBQAAAAAAAAAAAAABABExIVFhcZHB/9oACAEBAAE/IbA66JQQDa3mX2mVJtVDxJ2k3HrCUNfGDeYlqcif/9oADAMBAAIAAwAAABBHzz3/xAAXEQEBAQEAAAAAAAAAAAAAAAARAQAQ/9oACAEDAQE/EJA3LPP/xAAYEQACAwAAAAAAAAAAAAAAAAAAARARYf/aAAgBAgEBPxDBUUf/xAAeEAEAAgMAAgMAAAAAAAAAAAABABEhMUFRYXGBkf/aAAgBAQABPxAaFVg2qtAfbEAIJzFtaqOUWxtoU1mHsBUyb21b8TSKPpUSm+XTj9gUpVAFsGscgRd/LP/Z","aspectRatio":0.9032258064516129,"src":"/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg","srcSet":"/static/235d4863c99d493a85a384089d2bd383/f340b/mohammad.jpg 28w,\n/static/235d4863c99d493a85a384089d2bd383/22d64/mohammad.jpg 55w,\n/static/235d4863c99d493a85a384089d2bd383/31709/mohammad.jpg 110w,\n/static/235d4863c99d493a85a384089d2bd383/aa249/mohammad.jpg 165w,\n/static/235d4863c99d493a85a384089d2bd383/0dc33/mohammad.jpg 220w,\n/static/235d4863c99d493a85a384089d2bd383/3abfd/mohammad.jpg 851w","srcWebp":"/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp","srcSetWebp":"/static/235d4863c99d493a85a384089d2bd383/59cda/mohammad.webp 28w,\n/static/235d4863c99d493a85a384089d2bd383/7da75/mohammad.webp 55w,\n/static/235d4863c99d493a85a384089d2bd383/8678c/mohammad.webp 110w,\n/static/235d4863c99d493a85a384089d2bd383/f282e/mohammad.webp 165w,\n/static/235d4863c99d493a85a384089d2bd383/a7b21/mohammad.webp 220w,\n/static/235d4863c99d493a85a384089d2bd383/c1cbf/mohammad.webp 851w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"mathematics","url":"https://backend.shahednasser.com/tag/mathematics/","name":"Mathematics","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"In mathematics, one of the most famous ways of proving theorems and propositions\nis to prove by contradiction. Actually, this is a logical way of thinking based\non \"the law on non-contradiction (LNC)\" as first formalized as a metaphysical\nprinciple by Aristotle.\n\nThis way of proving says that a statement P and its negation (non)P can not\nhappen at the same time. For example, day and night can not happen at the same\ntime; similarly, left and right, up and down, and full and empty.\n\nSo, to prove a theorem or a proposition, you may either prove that its statement\nis right, or the negation of its statement is wrong.\n\nUsing the contradiction in proving a theorem or a proposition in mathematics\nstarts usually by assuming that the statement of this theorem or proposition is\nwrong. Then, the researcher should find a mistake as a result of his assumption.\nThus, the statement must not be wrong by contradiction, and so it is true.\n\nFor example, we will prove, using contradiction, the following statement P: \"If \nx^2 is even, then x is even\". Suppose to get a contradiction that x is odd, that\nis x=n+1, where n is an even number. So, x^2=(n+1)^2=n^2+2n+1. Then \nx^2-(n)^2-2n=1 an odd number, hence the number y= x^2-(n)^2-2n is an odd number.\nOn the other hand, x^2 is even, (n)^2 is even since n is even and 2n is even,\nwhich implies that y is even. So, y is odd and even at the same time, which is a\ncontradiction. Therefore, the statement P is true.\n\nConclusion\nAlthough there are a lot of ways for proving theorems and propositions in\nmathematics, proving using contradiction stays the more famous and familiar way\nmathematicians like to use.","html":"<p>In mathematics, one of the most famous ways of proving theorems and propositions is to prove by contradiction. Actually, this is a logical way of thinking based on \"the law on non-contradiction (LNC)\" as first formalized as a metaphysical principle by Aristotle.</p><p>This way of proving says that a statement P and its negation (non)P can not happen at the same time. For example, day and night can not happen at the same time; similarly, left and right, up and down, and full and empty.</p><p>So, to prove a theorem or a proposition, you may either prove that its statement is right, or the negation of its statement is wrong.</p><p>Using the contradiction in proving a theorem or a proposition in mathematics starts usually by assuming that the statement of this theorem or proposition is wrong. Then, the researcher should find a mistake as a result of his assumption. Thus, the statement must not be wrong by contradiction, and so it is true.</p><p>For example, we will prove, using contradiction, the following statement P: \"If <code>x^2</code> is even, then <code>x</code> is even\". Suppose to get a contradiction that <code>x</code> is odd, that is <code>x=n+1</code>, where <code>n</code> is an even number. So, <code>x^2=(n+1)^2=n^2+2n+1</code>. Then <code>x^2-(n)^2-2n=1</code> an odd number, hence the number <code>y= x^2-(n)^2-2n</code> is an odd number. On the other hand, <code>x^2</code> is even, <code>(n)^2</code> is even since <code>n</code> is even and <code>2n</code> is even, which implies that <code>y</code> is even. So, <code>y</code> is odd and even at the same time, which is a contradiction. Therefore, the statement P is true.</p><h3 id=\"conclusion\">Conclusion</h3><p>Although there are a lot of ways for proving theorems and propositions in mathematics, proving using contradiction stays the more famous and familiar way mathematicians like to use.</p>","url":"https://backend.shahednasser.com/what-is-proof-by-contradiction/","canonical_url":null,"uuid":"1fd6af4d-5eb8-41b2-ad45-05784497185c","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"6108e296d3fc22001ceaf96d","reading_time":1,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>In mathematics, one of the most famous ways of proving theorems and propositions is to prove by contradiction. Actually, this is a logical way of thinking based on \"the law on non-contradiction (LNC)\" as first formalized as a metaphysical principle by Aristotle.</p><p>This way of proving says that a statement P and its negation (non)P can not happen at the same time. For example, day and night can not happen at the same time; similarly, left and right, up and down, and full and empty.</p><p>So, to prove a theorem or a proposition, you may either prove that its statement is right, or the negation of its statement is wrong.</p><p>Using the contradiction in proving a theorem or a proposition in mathematics starts usually by assuming that the statement of this theorem or proposition is wrong. Then, the researcher should find a mistake as a result of his assumption. Thus, the statement must not be wrong by contradiction, and so it is true.</p><p>For example, we will prove, using contradiction, the following statement P: \"If <code class=\"language-text\">x^2</code> is even, then <code class=\"language-text\">x</code> is even\". Suppose to get a contradiction that <code class=\"language-text\">x</code> is odd, that is <code class=\"language-text\">x=n+1</code>, where <code class=\"language-text\">n</code> is an even number. So, <code class=\"language-text\">x^2=(n+1)^2=n^2+2n+1</code>. Then <code class=\"language-text\">x^2-(n)^2-2n=1</code> an odd number, hence the number <code class=\"language-text\">y= x^2-(n)^2-2n</code> is an odd number. On the other hand, <code class=\"language-text\">x^2</code> is even, <code class=\"language-text\">(n)^2</code> is even since <code class=\"language-text\">n</code> is even and <code class=\"language-text\">2n</code> is even, which implies that <code class=\"language-text\">y</code> is even. So, <code class=\"language-text\">y</code> is odd and even at the same time, which is a contradiction. Therefore, the statement P is true.</p><h3 id=\"conclusion\">Conclusion</h3><p>Although there are a lot of ways for proving theorems and propositions in mathematics, proving using contradiction stays the more famous and familiar way mathematicians like to use.</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In mathematics, one of the most famous ways of proving theorems and propositions is to prove by contradiction. Actually, this is a logical way of thinking based on \"the law on non-contradiction (LNC)\" as first formalized as a metaphysical principle by Aristotle."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This way of proving says that a statement P and its negation (non)P can not happen at the same time. For example, day and night can not happen at the same time; similarly, left and right, up and down, and full and empty."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So, to prove a theorem or a proposition, you may either prove that its statement is right, or the negation of its statement is wrong."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Using the contradiction in proving a theorem or a proposition in mathematics starts usually by assuming that the statement of this theorem or proposition is wrong. Then, the researcher should find a mistake as a result of his assumption. Thus, the statement must not be wrong by contradiction, and so it is true."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For example, we will prove, using contradiction, the following statement P: \"If "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"x^2"}]},{"type":"text","value":" is even, then "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"x"}]},{"type":"text","value":" is even\". Suppose to get a contradiction that "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"x"}]},{"type":"text","value":" is odd, that is "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"x=n+1"}]},{"type":"text","value":", where "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" is an even number. So, "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"x^2=(n+1)^2=n^2+2n+1"}]},{"type":"text","value":". Then "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"x^2-(n)^2-2n=1"}]},{"type":"text","value":" an odd number, hence the number "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"y= x^2-(n)^2-2n"}]},{"type":"text","value":" is an odd number. On the other hand, "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"x^2"}]},{"type":"text","value":" is even, "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"(n)^2"}]},{"type":"text","value":" is even since "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" is even and "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"2n"}]},{"type":"text","value":" is even, which implies that "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"y"}]},{"type":"text","value":" is even. So, "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"y"}]},{"type":"text","value":" is odd and even at the same time, which is a contradiction. Therefore, the statement P is true."}]},{"type":"element","tagName":"h3","properties":{"id":"conclusion"},"children":[{"type":"text","value":"Conclusion"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Although there are a lot of ways for proving theorems and propositions in mathematics, proving using contradiction stays the more famous and familiar way mathematicians like to use."}]}],"data":{"quirksMode":false}},"tableOfContents":[{"id":"conclusion","heading":"Conclusion"}]},"featureImageSharp":{"base":"pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg","publicURL":"/static/fa3f06117ec25cf0260fbb794aeb5110/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg","imageMeta":{"width":1920,"height":1280},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAwACBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHqoKWajj//xAAZEAADAAMAAAAAAAAAAAAAAAAAAQIDEBH/2gAIAQEAAQUCnJNVriVCP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABcQAQEBAQAAAAAAAAAAAAAAAAEQIUH/2gAIAQEABj8CQ5XL/8QAGRABAAIDAAAAAAAAAAAAAAAAASExABAR/9oACAEBAAE/IUC620PacEABbdRIic//2gAMAwEAAgADAAAAEHjv/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFxEAAwEAAAAAAAAAAAAAAAAAARARQf/aAAgBAgEBPxAXV//EABsQAQACAgMAAAAAAAAAAAAAAAEAESExQWFx/9oACAEBAAE/EOBe1S4IsE1hhhrECl9gsA9AKcHc/9k=","aspectRatio":1.4957264957264957,"src":"/static/fa3f06117ec25cf0260fbb794aeb5110/ea4ab/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg","srcSet":"/static/fa3f06117ec25cf0260fbb794aeb5110/477ba/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg 175w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/06776/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg 350w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/ea4ab/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg 700w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/3055e/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg 1050w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/eff08/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg 1400w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/74fd5/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.jpg 1920w","srcWebp":"/static/fa3f06117ec25cf0260fbb794aeb5110/89afa/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.webp","srcSetWebp":"/static/fa3f06117ec25cf0260fbb794aeb5110/9fca7/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.webp 175w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/37a4e/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.webp 350w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/89afa/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.webp 700w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/78e7a/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.webp 1050w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/03d34/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.webp 1400w,\n/static/fa3f06117ec25cf0260fbb794aeb5110/6833b/pawel-czerwinski-lw5KEl7JoB0-unsplash--1-.webp 1920w","sizes":"(max-width: 700px) 100vw, 700px"}}}}}]}},"pageContext":{"slug":"what-are-prime-numbers","prev":"track-keywords-in-google-using-python","next":"what-is-representation-theory","tag":"mathematics","limit":3,"skip":0,"primaryTagCount":5,"collectionPaths":{}}},"staticQueryHashes":["1272700106","1676991999","2138873178","2546165603","2681841279","2938721187","293880488","3052966952","4156497161"]}