Code Monkey home page Code Monkey logo

snag's Introduction

snag

Snag videos from Instagram and YouTube with Pystagram and Pytube

Setup

$ sh setup.sh

Usage

--link -l YouTube or Instagram link. (required)
--name -n File name. Required for Instagram videos.
--dst  -d Save destination (default: queue)
--file -f File of urls to download

Example

Single video

$ python snag.py -l https://www.youtube.com/watch?v=QlsaQZz6418

Youtube playlist

$ python snag.py -l https://www.youtube.com/playlist?list=PLoROMvodv4rMiGQp3WXShtMGgzqpfVfbU

Instagram video

$ python snag.py -l https://www.instagram.com/p/BuEelMGnYpW/ -n dope

File of urls

Supports .txt and .tsv. Label tsv column as link and place file inside project folder.

$ python snag.py -f videos.tsv

snag's People

Contributors

ch3njust1n avatar

Watchers

 avatar  avatar

snag's Issues

Exception: Expecting value: line 1 column 1 (char 0)

python snag.py -l https://www.instagram.com/p/B7BvcY8nadk/ -n test
Traceback (most recent call last):
  File "/Users/justin/anaconda3/lib/python3.7/site-packages/pystagram-1.0.0-py3.7.egg/pystagram/__main__.py", line 58, in download
  File "/Users/justin/anaconda3/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/Users/justin/anaconda3/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/Users/justin/anaconda3/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/justin/anaconda3/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "snag.py", line 82, in <module>
    main()
  File "snag.py", line 76, in main
    download(args.link, args.dst, args.name)
  File "snag.py", line 26, in download
    gram.download(dst=dst, filename=name)
  File "/Users/justin/anaconda3/lib/python3.7/site-packages/pystagram-1.0.0-py3.7.egg/pystagram/__main__.py", line 87, in download
Exception: Expecting value: line 1 column 1 (char 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.