metalx1000

Scraping Pastes

Apr 3rd, 2025
877
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.98 KB | None | 0 0
  1. #!/bin/bash
  2. ######################################################################
  3. #Copyright (C) 2025  Kris Occhipinti
  4. #https://filmsbykris.com
  5.  
  6. #This program is free software: you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation version 3 of the License.
  9.  
  10. #This program is distributed in the hope that it will be useful,
  11. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. #GNU General Public License for more details.
  14.  
  15. #You should have received a copy of the GNU General Public License
  16. #along with this program.  If not, see <http://www.gnu.org/licenses/>.
  17. ######################################################################
  18. domain="http://pastebin.com"
  19. user="metalx1000"
  20. url="${domain}/u/${user}"
  21.  
  22. wget -qO- "$url" | grep -A 1 "Public paste" | grep href | sed "s|<a href=\"|$domain|g;s/\">/|/g;s|</a>    </td>||g"
  23.  
Advertisement
Comments
  • kaslmineer7999
    174 days
    # text 0.01 KB | 0 0
    1. cool man
  • SergeySamoylov
    174 days
    # text 0.21 KB | 0 0
    1. Added fzf search for known pastebin users,
    2. added fzf filtering of pastebin posts
    3. and it opens links for snippets in a browser
    4.  
    5. Yeap, it's not a one-liner in my case, but works for me just fine.
    6. Thank you!
    • metalx1000
      55 days
      # text 0.23 KB | 0 0
      1. Thanks your the comment. Sorry for my late response, Pastbin just notified me of these comments today for the first time.
      2. I've moved away from pastebin and now put all my notes/scripts here
      3. https://filmsbykris.com/scripts/MyNotes
Add Comment
Please, Sign In to add comment