flask-Humanify 0.1.3.2__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Verify Human</title>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Verify you're human</title>
7
7
  <style>
8
8
  body {
9
9
  font-family: system-ui, sans-serif;
@@ -17,40 +17,35 @@
17
17
  height: 100vh;
18
18
  padding: 0 20px;
19
19
  }
20
-
20
+
21
21
  @media (prefers-color-scheme: dark) {
22
22
  body {
23
23
  background: #121212;
24
24
  color: #f2f2f2;
25
25
  }
26
-
26
+
27
27
  .fill {
28
- background: rgba(0,0,0,0.15);
28
+ background: rgba(0, 0, 0, 0.15);
29
29
  }
30
30
  }
31
-
31
+
32
32
  .content {
33
- max-width: 600px;
33
+ max-width: 800px;
34
34
  display: flex;
35
35
  flex-direction: column;
36
36
  align-items: center;
37
37
  }
38
38
 
39
- .emoji {
40
- font-size: 48px;
41
- margin-bottom: 10px;
42
- }
43
-
44
39
  h1 {
45
40
  font-size: 22px;
46
41
  margin: 15px 0;
47
42
  }
48
-
43
+
49
44
  p {
50
45
  margin: 15px 0;
51
46
  opacity: 0.8;
52
47
  }
53
-
48
+
54
49
  .preview-container {
55
50
  width: 200px;
56
51
  height: 200px;
@@ -64,18 +59,18 @@
64
59
  border-radius: 8px;
65
60
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
66
61
  }
67
-
62
+
68
63
  .text-container {
69
64
  text-align: center;
70
65
  margin-bottom: 25px;
71
66
  }
72
-
67
+
73
68
  .error {
74
69
  color: #e53935;
75
70
  margin: 10px 0;
76
71
  font-size: 16px;
77
72
  }
78
-
73
+
79
74
  .images-row {
80
75
  display: flex;
81
76
  flex-direction: row;
@@ -85,7 +80,7 @@
85
80
  margin-bottom: 25px;
86
81
  width: 100%;
87
82
  }
88
-
83
+
89
84
  .image-button {
90
85
  background: none;
91
86
  border: none;
@@ -93,23 +88,25 @@
93
88
  cursor: pointer;
94
89
  width: 100px;
95
90
  height: 100px;
96
- transition: transform 0.2s ease, box-shadow 0.2s ease;
91
+ transition:
92
+ transform 0.2s ease,
93
+ box-shadow 0.2s ease;
97
94
  border-radius: 8px;
98
95
  overflow: hidden;
99
96
  position: relative;
100
97
  }
101
-
98
+
102
99
  .image-button:hover {
103
100
  transform: translateY(-3px);
104
101
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
105
102
  }
106
-
103
+
107
104
  .image-button img {
108
105
  width: 100%;
109
106
  height: 100%;
110
107
  object-fit: cover;
111
108
  }
112
-
109
+
113
110
  .audio-challenge-link {
114
111
  display: flex;
115
112
  align-items: center;
@@ -120,29 +117,29 @@
120
117
  font-size: 14px;
121
118
  transition: all 0.2s ease;
122
119
  }
123
-
120
+
124
121
  .audio-challenge-link:hover {
125
122
  transform: translateY(-2px);
126
123
  }
127
-
124
+
128
125
  .audio-challenge-link svg {
129
126
  margin-right: 6px;
130
127
  width: 16px;
131
128
  height: 16px;
132
129
  fill: currentColor;
133
130
  }
134
-
131
+
135
132
  @media (max-width: 600px) {
136
133
  .preview-container {
137
134
  width: 180px;
138
135
  height: 180px;
139
136
  }
140
-
137
+
141
138
  .images-row {
142
139
  gap: 10px;
143
140
  justify-content: center;
144
141
  }
145
-
142
+
146
143
  .image-button {
147
144
  width: 80px;
148
145
  height: 80px;
@@ -153,39 +150,45 @@
153
150
  <body>
154
151
  <div class="content">
155
152
  <div class="preview-container">
156
- <img src="{{ preview_image }}" alt="Reference image">
153
+ <img src="{{ preview_image }}" alt="Reference image" />
157
154
  </div>
158
-
155
+
159
156
  <div class="text-container">
160
157
  {% if subject == "smiling dog" %}
161
158
  <p>To verify you're not a bot, select the dog that smiles like shown above.</p>
162
159
  {% else %}
163
- <p>To verify you're not a bot, select the image that matches the motif shown above.</p>
164
- {% endif %}
165
- {% if error %}
166
- <p class="error">{{ error }}</p>
160
+ <p>
161
+ To verify you're not a bot, select the image that matches the motif shown above.
162
+ </p>
163
+ {% endif %} {% if error %}
164
+ <p class="error">{{ error }}</p>
167
165
  {% endif %}
168
166
  </div>
169
167
 
170
168
  <div class="images-row">
171
169
  {% for image in images %}
172
170
  <form action="{{ url_for('humanify.verify') }}" method="POST">
173
- <input type="hidden" name="return_url" value="{{ return_url }}">
174
- <input type="hidden" name="captcha_data" value="{{ captcha_data }}">
171
+ <input type="hidden" name="return_url" value="{{ return_url }}" />
172
+ <input type="hidden" name="captcha_data" value="{{ captcha_data }}" />
175
173
  <button type="submit" class="image-button" name="{{ loop.index }}" value="1">
176
- <img src="{{ image }}" alt="Selection image {{ loop.index }}">
174
+ <img src="{{ image }}" alt="Selection image {{ loop.index }}" />
177
175
  </button>
178
176
  </form>
179
177
  {% endfor %}
180
178
  </div>
181
-
179
+
182
180
  {% if audio_challenge_available %}
183
- <a class="audio-challenge-link" href="{{ url_for('humanify.audio_challenge', return_url=return_url) }}">
184
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
185
- <path d="M10 1a1 1 0 0 1 1 1v13.59l1.29-1.29a1 1 0 1 1 1.42 1.42l-3 3a1 1 0 0 1-1.42 0l-3-3a1 1 0 0 1 1.42-1.42L9 15.59V2a1 1 0 0 1 1-1zm2-1a1 1 0 1 1 0 2 5 5 0 0 0-5 5 1 1 0 1 1-2 0 7 7 0 0 1 7-7zm2 3a1 1 0 1 1 0 2 3 3 0 0 0-3 3 1 1 0 1 1-2 0 5 5 0 0 1 5-5z" />
186
- </svg>
187
- Audio challenge
188
- </a>
181
+ <a
182
+ class="audio-challenge-link"
183
+ href="{{ url_for('humanify.audio_challenge', return_url=return_url) }}"
184
+ >
185
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
186
+ <path
187
+ d="M128 448q-26 0-45-19t-19-45V256q0-50 26-96 26-45 71-70 44-26 95-26 52 0 96 26 45 26 71 71 25 44 25 95v128q0 26-19 45t-45 19h-64V288h80v-32q0-38-19-72-20-33-53-52-33-20-72-20-40 0-72 19-33 20-52 53-20 33-20 72v32h80v160z"
188
+ />
189
+ </svg>
190
+ Audio challenge
191
+ </a>
189
192
  {% endif %}
190
193
  </div>
191
194
  </body>
@@ -1,8 +1,8 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Rate Limited</title>
7
7
  <style>
8
8
  body {
@@ -17,23 +17,23 @@
17
17
  height: 100vh;
18
18
  padding: 0 20px;
19
19
  }
20
-
20
+
21
21
  @media (prefers-color-scheme: dark) {
22
22
  body {
23
23
  background: #121212;
24
24
  color: #f2f2f2;
25
25
  }
26
-
26
+
27
27
  .btn {
28
28
  background: #f2f2f2;
29
29
  color: #121212;
30
30
  }
31
-
31
+
32
32
  .fill {
33
- background: rgba(0,0,0,0.15);
33
+ background: rgba(0, 0, 0, 0.15);
34
34
  }
35
35
  }
36
-
36
+
37
37
  .content {
38
38
  max-width: 600px;
39
39
  }
@@ -42,17 +42,17 @@
42
42
  font-size: 48px;
43
43
  margin-bottom: 10px;
44
44
  }
45
-
45
+
46
46
  h1 {
47
47
  font-size: 22px;
48
48
  margin: 15px 0;
49
49
  }
50
-
50
+
51
51
  p {
52
52
  margin: 15px 0;
53
53
  opacity: 0.8;
54
54
  }
55
-
55
+
56
56
  .btn {
57
57
  display: inline-block;
58
58
  padding: 12px 24px;
@@ -65,46 +65,53 @@
65
65
  overflow: hidden;
66
66
  pointer-events: none;
67
67
  }
68
-
68
+
69
69
  .fill {
70
70
  position: absolute;
71
71
  left: 0;
72
72
  top: 0;
73
73
  height: 100%;
74
74
  width: 0;
75
- background: rgba(255,255,255,0.15);
75
+ background: rgba(255, 255, 255, 0.15);
76
76
  animation: fillBtn 10s linear forwards;
77
77
  }
78
-
78
+
79
79
  @keyframes fillBtn {
80
- to { width: 100%; }
80
+ to {
81
+ width: 100%;
82
+ }
81
83
  }
82
84
  </style>
83
85
  </head>
84
86
  <body>
85
87
  <div class="content">
86
- <div class="emoji">
87
- 🫖
88
- </div>
88
+ <div class="emoji">🫖</div>
89
89
  <h1>Have some Tea</h1>
90
- <p>It appears that you are sending an excessive number of requests to this website. Please reduce the frequency of your requests.</p>
90
+ <p>
91
+ It appears that you are sending an excessive number of requests to this website.
92
+ Please reduce the frequency of your requests.
93
+ </p>
91
94
  <a href="RETURN_URL" id="retry" class="btn">
92
95
  <div class="fill"></div>
93
96
  <span>Try again</span>
94
97
  </a>
95
98
  </div>
96
-
99
+
97
100
  <noscript>
98
101
  <style>
99
- .btn { pointer-events: all !important; }
100
- .fill { display: none; }
102
+ .btn {
103
+ pointer-events: all !important;
104
+ }
105
+ .fill {
106
+ display: none;
107
+ }
101
108
  </style>
102
109
  </noscript>
103
-
110
+
104
111
  <script>
105
- setTimeout(function() {
112
+ setTimeout(function () {
106
113
  document.getElementById('retry').style.pointerEvents = 'all';
107
114
  }, 10000);
108
115
  </script>
109
116
  </body>
110
- </html>
117
+ </html>