Skip to navigation
Get all lineageos device URLs from https://wiki.lineageos.org/
17.03.22
def get_items(self): _url = 'https://wiki.lineageos.org/devices/' headers = {'User-Agent': self.get_random_header()} url = urllib.parse.unquote(_url) r = requests.get(url, headers=headers) doc = sortedcontainers.SortedDict() if r.status_code == 200: bs = BeautifulSoup(r.text, "html.parser") t = bs.find_all('a') devices = [] for i in t: if i['href'].startswith('/devices/'): url = 'https://wiki.lineageos.org{0}'.format(i['href']) devices.append(url) devices = list(set(devices)) print(devices)
Reply
Anonymous
Information Epoch 1732512913
Design for simplicity, add complexity only where you must.
Home
Notebook
Contact us