Jump to content
View in the app

A better way to browse. Learn more.

Forum Supreme-Elite

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Si vous voulez simuler une présence humaine sur le web, oubliez les macros qui squattent votre clavier et votre souris et passez à RoboBrowser. Cette bibliothèque Python permet d'aller sur la page web de votre choix, remplir des formulaires, les soumettre, récupérer des contenus ou cliquer sur des liens. C'est un scraper avec des notions de navigation web un peu plus poussées.

Alors oui effectivement, cela peut servir à des spammeurs de commentaires, mais je pense que les mecs ne m'ont pas attendu. Par contre, ce qui est cool, c'est que si vous développez vous-même vos outils et que vous vous connectez à des plateformes extérieures qui n'ont pas d'API, il est parfaitement envisageable grâce à RoboBrowser, d'intégrer ces plateformes dans vos workflows.

Voici un exemple de code où RoboBrowser est utilisé pour récupérer les paroles d'une chanson :

import refrom robobrowser import RoboBrowser# Browse to Geniusbrowser = RoboBrowser(history=True)browser.open('http://genius.com/')# Search for Porcupine Treeform = browser.get_form(action='/search')form                # <RoboForm q=>form['q'].value = 'porcupine tree'browser.submit_form(form)# Look up the first songsongs = browser.select('.song_link')browser.follow_link(songs[0])lyrics = browser.select('.lyrics')lyrics[0].text      # nHear the sound of music ...# Back to results pagebrowser.back()# Look up my favorite songsong_link = browser.get_link('trains')browser.follow_link(song_link)# Can also search HTML using regex patternslyrics = browser.find(class_=re.compile(r'blyricsb'))lyrics.text         # nTrain set and match spied under the blind...

Et voici un autre exemple ou RoboBrowser est utilisé pour remplir un formulaire :

from robobrowser import RoboBrowserbrowser = RoboBrowser()browser.open('http://twitter.com')# Get the signup formsignup_form = browser.get_form(class_='signup')signup_form         # <RoboForm user[name]=, user[email]=, ...# Inspect its valuessignup_form['authenticity_token'].value     # 6d03597 ...# Fill it outsignup_form['user[name]'].value = 'python-robot'signup_form['user[user_password]'].value = 'secret'# Submit the formbrowser.submit_form(signup_form)

Cet article merveilleux et sans aucun égal intitulé : RoboBrowser – Une bibliothèque Python pour scraper et faire surfer votre code ; a été publié sur Korben, le seul site qui t'aime plus fort que tes parents.



Voir l'article complet

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.