Skip to main content

Code Snippets that I regularly use.

Project description

SnippetHub

Code Snippets that I regularly use.

from myhelper.yt_dlp_helper import Ytube

url="Your YouTube Url"

yt=Ytube(url)

list_of_formats=yt.formats

audios=yt.audios
videos=yt.videos 
progressive=yt.progressive

video=yt.download_by_resolution("144p")
audio=yt.download_audio_by_bt_rate(128)
audio=yt.download_audio_by_bt_rate("128kbps")
audio=yt.download_audio_by_bt_rate("128k")
from pdftk import pdftk
# **To Merge Pdf:**
pdftk().merge( input_files=['file1.pdf','file1.pdf'],output='/your path/your pdf.pdf',user_pw='PrinceIsGod',owner_pw='HeIsTheOnlyOwnerOfWorld' )

# **To Burst Pdf:**
pdftk().burst_pdf('file1.pdf',output_folder='pk',input_pw='passwordofyourpdf')

# ** To Remove Password:**
pdftk().decrypt('file1.pdf',input_pw='yourpass',output='pk.pdf')

# ** To encrypt Pdf:**
pdftk().encrypt('file1.pdf',user_pw='pass',owner_pw='pass1',output='output.pdf')

Help on class pdftk in module pdftk:

class pdftk(builtins.object)
 |  pdftk() -> None
 |  
 |  Complete wrapper for pdftk.
 |  
 |  Methods defined here:
 |  
 |  __init__(self) -> None
 |      Initialize self.  See help(type(self)) for accurate signature.
 |  
 |  add_background(self, pdf, back_pdf, input_pw=None, multi=False, user_pw=None, owner_pw=None, output=None)
 |      If the input PDF does not have a transparent background (such as a PDF created from page scans) then
 |      the resulting background won't be visible -- use the add_stamp operation instead.
 |  
 |  add_stamp(self, pdf, back_pdf, input_pw=None, multi=False, user_pw=None, owner_pw=None, output=None)
 |  
 |  burst_pdf(self, pdf, output_folder=None, input_pw=None)
 |  
 |  decrypt(self, pdf, input_pw, output=None)
 |  
 |  encrypt(self, pdf, user_pw=None, owner_pw=None, output=None)
 |  
 |  execute(self)
 |  
 |  get_page_count(self, pdf)
 |  
 |  merge(self, input_files: list, output=None, user_pw=None, owner_pw=None)
 |  
 |  rotate_pdf(self, pdf, direction='north', page_ranges='1-end', output=None, input_pw=None, user_pw=None, owner_pw=None)
 |      Each option sets the page rotation as follows (in degrees): north: 0,east: 90, south: 180, west: 270, left: -90,
 |      right: +90, down: +180. left, right, and down make relative adjustments to a page's rotation.
 |  
 |  split_pdf(self, pdf, page_or_range: list, output=None, input_pw=None)
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myhelper-0.1.6a0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

myhelper-0.1.6a0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file myhelper-0.1.6a0.tar.gz.

File metadata

  • Download URL: myhelper-0.1.6a0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for myhelper-0.1.6a0.tar.gz
Algorithm Hash digest
SHA256 490fb9af932b6aca9c6f194a252aece133b645546fe1385959f8226cc948b458
MD5 283d3426eeab11ffe8a6422a310dcfc2
BLAKE2b-256 96e57e356679dbe8cd2d0f818370f9a6bd37dc06ed9b0899a8e2a32f5ed16415

See more details on using hashes here.

File details

Details for the file myhelper-0.1.6a0-py3-none-any.whl.

File metadata

  • Download URL: myhelper-0.1.6a0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for myhelper-0.1.6a0-py3-none-any.whl
Algorithm Hash digest
SHA256 829ff75796e9e9c003288ae78a326c35f4ad25ded49407e3b28dd64183d5a65d
MD5 274e55009f6f9a0bb009083de98af020
BLAKE2b-256 4fbb1a71c1e7b8dd9aeacde9e684a176dba1fb68a791cf59284febd901fa89a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page