Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BabyComeBack
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PLN
BabyComeBack
Commits
8ef04bb3
Unverified
Commit
8ef04bb3
authored
Nov 30, 2019
by
PLN (Algolia)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(baby): SMS without emojis
parent
6d5ab42b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
baby.py
baby.py
+4
-2
No files found.
baby.py
View file @
8ef04bb3
#!/usr/bin/env python
# -*- coding: utf8
import
requests
import
requests
from
bs4
import
BeautifulSoup
from
bs4
import
BeautifulSoup
...
@@ -11,9 +13,9 @@ def main():
...
@@ -11,9 +13,9 @@ def main():
stock
=
soup
.
find
(
attrs
=
{
"class"
:
"stock"
})
.
text
stock
=
soup
.
find
(
attrs
=
{
"class"
:
"stock"
})
.
text
if
"Out of stock"
not
in
stock
:
if
"Out of stock"
not
in
stock
:
sms
(
"
%
s
in stock 🎉
\"
%
s
\"\n
🔗
%
s"
%
(
name
,
stock
,
url
))
sms
(
"
%
s
en stock:
\"
%
s
\"\n
->
%
s"
%
(
name
,
stock
,
url
))
else
:
else
:
sms
(
"
%
s
not in stock, I'll keep checking for you 🙃
"
%
name
)
sms
(
"
%
s
pas encore en stock... À suivre ;)
"
%
name
)
def
sms
(
msg
:
str
):
def
sms
(
msg
:
str
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment