@irmat101/

SandyDarkBlog

Python

Coding is cool♥

fork
loading
Files
  • main.py
  • 4th.py
  • requirements.txt
  • second.py
  • third.py
  • Welcome.mp3
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
"""username = input("What is your name? ")
username = "Ian"
password = "mypassword" 

Username = input("What is your username? ")
Password = input("What is your password? ")
count = 0 
count += 1 

while username == username and password == password: 

    if count == 3: 
        print("\nThree Username and Password Attempts used. Goodbye") 
        break 

    elif username == 'Ian' and password == 'mypassword':
        print("Welcome, " + username + "!") 
        break 

    elif username != 'Ian' and password != 'MYPASSWORD': 
        print("Your Username and or Password is wrong!")
        username = input("\n\nUsername: ")
        password = input("Password: ")
        count += 1 
        continue 

    elif username == 'Ian' and password != 'Mypassword': 
        print("Your Password and or username is wrong!") 
        username = input("\n\nUsername: ") 
        password = input("Password: ")
        count += 1 
        continue 

    elif username != 'Ian' and password == 'mypassWord': 
        print("Your Username and or password is wrong!")
        username = input("\n\nUsername: ")
        password = input("Password: ")
        count += 1 
        continue

print("If you want to know my name is Speedy")
whatcanidotohelp = input("What can I do for you " + username + "?")

lookup = input("Ok, What do you want me to look up for you?")
print("Ok I will look up " + lookup + ".")

print("here are the results for " + lookup)
"""

#!/usr/bin/python

import httplib2

from apiclient import errors
from apiclient.discovery import build
from oauth2client.client import OAuth2WebServerFlow


# Copy your credentials from the console
CLIENT_ID = 'YOUR_CLIENT_ID'
CLIENT_SECRET = 'YOUR_CLIENT_SECRET'

# Check https://developers.google.com/webmaster-tools/search-console-api-original/v3/ for all available scopes
OAUTH_SCOPE = 'https://www.googleapis.com/auth/webmasters.readonly'

# Redirect URI for installed apps
REDIRECT_URI = 'urn:ietf:wg:oauth:2.0:oob'

# Run through the OAuth flow and retrieve credentials
flow = OAuth2WebServerFlow(CLIENT_ID, CLIENT_SECRET, OAUTH_SCOPE, REDIRECT_URI)
authorize_url = flow.step1_get_authorize_url()
print('Go to the following link in your browser: ' + authorize_url)
code = raw_input('Enter verification code: ').strip()
credentials = flow.step2_exchange(code)

# Create an httplib2.Http object and authorize it with our credentials
http = httplib2.Http()
http = credentials.authorize(http)

webmasters_service = build('webmasters', 'v3', http=http)

# Retrieve list of properties in account
site_list = webmasters_service.sites().list().execute()

# Filter for verified websites
verified_sites_urls = [s['siteUrl'] for s in site_list['siteEntry']
                       if s['permissionLevel'] != 'siteUnverifiedUser'
                          and s['siteUrl'][:4] == 'http']

# Printing the URLs of all websites you are verified for.
for site_url in verified_sites_urls:
  print(site_url)
  # Retrieve list of sitemaps submitted
  sitemaps = webmasters_service.sitemaps().list(siteUrl=site_url).execute()
  if 'sitemap' in sitemaps:
    sitemap_urls = [s['path'] for s in sitemaps['sitemap']]
    print("  " + "\n  ".join(sitemap_urls))