mirror of
https://github.com/xdtianyu/scripts.git
synced 2025-08-09 12:02:16 +08:00
Create cm2cron.py
This commit is contained in:
19
net/cm2cron.py
Normal file
19
net/cm2cron.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
import urllib2
|
||||
|
||||
url = 'https://download.cyanogenmod.org/'
|
||||
soup = BeautifulSoup(urllib2.urlopen(url))
|
||||
|
||||
tag = soup.find_all('span')
|
||||
|
||||
count = 0
|
||||
|
||||
for span in tag:
|
||||
if span.get('class')[0] == "codename":
|
||||
print str(count) + " * * * * bash /root/bin/cm " + span.string
|
||||
count += 2
|
||||
if count == 60:
|
||||
count = 0
|
Reference in New Issue
Block a user