ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!

Jump to content



Photo

Python Giftcard generator Source Code


  • Please log in to reply
Python Giftcard generator Source Code

#61

LosRifinos
LosRifinos
    Offline
    0
    Rep
    1
    Likes

    Lurker

Posts: 3
Threads: 0
Joined: May 22, 2020
Credits: 0
Four years registered
#61

Thanks


  • 0

#62

chickpea97
chickpea97
    Offline
    0
    Rep
    1
    Likes

    Advanced Member

  • PipPipPipPip
Posts: 79
Threads: 1
Joined: Jul 25, 2019
Credits: 0
Five years registered
#62

#!/usr/bin/env python

 

import json

import requests

from bs4 import BeautifulSoup

 

class ScannerScraper(object):

    def __init__(self):

        self.search_request = {

            "scan_clause" : "{cash}+(+net+profit[yearly]+>+ttm+net+profit+*+2+)+and+(+net+profit[yearly]+>+0+)+and+(+ttm+net+profit+>+0+)"

        }

 

    def scrape(self):

        scans = self.scrape_scans()

        for scan in scans:

            print(scan)

    def scrape_scans(self):

        scans = []

       

        self.search_request['scan_clause'] = "{cash}+(+net+profit[yearly]+>+ttm+net+profit+*+2+)+and+(+net+profit[yearly]+>+0+)+and+(+ttm+net+profit+>+0+)"

        i=2

        while i>1:

            payload = {

                'scan_clause': json.dumps(self.search_request),

               

            }

 

            r = requests.post(

                url='https://chartink.com/screener/process'

                data=payload,

                headers={

                    'X-Requested-With': 'XMLHttpRequest'

                }

            )

 

            s = BeautifulSoup(r.text , features="lxml")

            if not s.requisition:

                break

 

            for r in s.findAll('requisition'):

                scan = {}

                scan['nsecode'] = r.nsecode.text

                scan['name'] = r.name.text

                scans.append(scan)

 

            # Next page

        i=i-1

           

 

        return scans

 

if __name__ == '__main__':

    scraper = ScannerScraper()

    scraper.scrape()


  • 0

#63

2skorpion9
2skorpion9
    Offline
    0
    Rep
    0
    Likes

    Member

Posts: 27
Threads: 0
Joined: Apr 28, 2020
Credits: 0
Four years registered
#63

thanks!


  • 0

#64

coolguy1111
coolguy1111
    Offline
    0
    Rep
    9
    Likes

    Member

  • PipPipPip
Posts: 64
Threads: 1
Joined: Apr 21, 2020
Credits: 0
Four years registered
#64

ty


  • 0

#65

carl64
carl64
    Offline
    0
    Rep
    0
    Likes

    New Member

Posts: 12
Threads: 0
Joined: Jun 05, 2020
Credits: 0
Four years registered
#65

very nice bro


  • 0

#66

yellowbunny321
yellowbunny321
    Offline
    0
    Rep
    37
    Likes

    Advanced Member

Posts: 101
Threads: 5
Joined: May 11, 2020
Credits: 0

Four years registered
#66

thx :D  :P


  • 0

" I murder a rhyme one word at a time "

- Slim Shady


#67

xehes
xehes
    Offline
    0
    Rep
    0
    Likes

    New Member

  • PipPip
Posts: 23
Threads: 0
Joined: Jun 07, 2020
Credits: 0
Four years registered
#67

thnx


  • 0

#68

thatguyuio
thatguyuio
    Offline
    -1
    Rep
    33
    Likes

    Veteran

  • PipPipPipPipPipPipPip
Posts: 1205
Threads: 50
Joined: Nov 01, 2018
Credits: 0

Six years registered
#68

thank you man!


  • 0

#69

MikePlayzHD
MikePlayzHD
    Offline
    0
    Rep
    0
    Likes

    Member

Posts: 47
Threads: 0
Joined: May 23, 2020
Credits: 0
Four years registered
#69

ok


  • 0

#70

a2k1
a2k1
    Offline
    0
    Rep
    1
    Likes

    Member

Posts: 31
Threads: 0
Joined: Jun 12, 2020
Credits: 0
Four years registered
#70

Thanks!


  • 0


 Users browsing this thread: