Beispiel #1
0
def run_checkers():
	t = TaskUtils()

	kwargs = {
		'check_me':True,
	}
	args=(Q(id__gt = 100),)
	t.run_checkers(BBCNews, 'news_website__scraper', checker_runtime, 'news_checker', *args, **kwargs)
Beispiel #2
0
def run_checkers():
	t = TaskUtils()

	kwargs = {
		'check_me':True,
	}
	args=(Q(id__gt = 100),)
	t.run_checkers(JobAd, 'job_website__scraper', checker_runtime, 'job_checker', *args, **kwargs)
Beispiel #3
0
def run_spiders():
	t = TaskUtils()
	# Django field lookup keyword arguments to specify which ref objects(JobWebsite)
	# to run
	kwargs = {
		'scrape_me':True,
	}
	args=(Q(name = 'BBC'),)
	t.run_spiders(NewsWebsite, 'scraper', 'scraper_runtime', 'news_spider', *args, **kwargs)
Beispiel #4
0
def run_spiders():
    t = TaskUtils()
    #Optional: Django field lookup keyword arguments to specify which reference objects (NewsWebsite)
    #to use for spider runs, e.g.:
    kwargs = {'status': '1'}
    #Optional as well: For more complex lookups you can pass Q objects vi args argument
    args = ()
    t.run_spiders(Source, 'scraper', 'scraper_runtime', 'article_spider',
                  *args, **kwargs)
Beispiel #5
0
def run_checkers():
    t = TaskUtils()
    #Optional: Django field lookup keyword arguments to specify which reference objects (Article)
    #to use for checker runs, e.g.:
    kwargs = {
        'check_me': True, #imaginary, model Article hat no attribute 'check_me' in example
    }
    #Optional as well: For more complex lookups you can pass Q objects vi args argument
    args = (Q(id__gt=100),)
    t.run_checkers(Article, 'news_website__scraper', 'checker_runtime', 'article_checker', *args, **kwargs)
Beispiel #6
0
def run_spiders():
    t = TaskUtils()
    #Optional as well: For more complex lookups you can pass Q objects vi args argument
    kwargs = {
        'id': 2, #imaginary, model NewsWebsite hat no attribute 'scrape_me' in example
        'do_action': 'yes',
       'class': 'googlespider',
        'itemc': 'GoogleItem'
          }
    t.run_spiders(NewsWebsite, 'scraper', 'scraper_runtime', 'article_spider')
Beispiel #7
0
def run_spiders():
    t = TaskUtils()
    #Optional: Django field lookup keyword arguments to specify which reference objects (NewsWebsite)
    #to use for spider runs, e.g.:
    kwargs = {
        'status' : '1'
    }
    #Optional as well: For more complex lookups you can pass Q objects vi args argument
    args = ()
    t.run_spiders(Source, 'scraper', 'scraper_runtime', 'article_spider', *args, **kwargs)
Beispiel #8
0
def run_spiders():
    t = TaskUtils()
    #Optional: Django field lookup keyword arguments to specify which reference objects (NewsWebsite)
    #to use for spider runs, e.g.:
    #kwargs = {
    #    'scrape_me': True, #imaginary, model NewsWebsite hat no attribute 'scrape_me' in example
    #}
    #Optional as well: For more complex lookups you can pass Q objects vi args argument
    args = (Q(name='Wikinews'),)
    t.run_spiders(NewsWebsite, 'scraper', 'scraper_runtime', 'article_spider')
Beispiel #9
0
def run_spiders():
    t = TaskUtils()
    #Optional: Django field lookup keyword arguments to specify which reference objects (NewsWebsite)
    #to use for spider runs, e.g.:
    #kwargs = {
    #    'scrape_me': True, #imaginary, model NewsWebsite hat no attribute 'scrape_me' in example
    #}
    #Optional as well: For more complex lookups you can pass Q objects vi args argument
    args = (Q(name='GlobalBank'), )
    t.run_spiders(NewsWebsite, 'scraper', 'scraper_runtime', 'FirstSpider',
                  *args)  #, **kwargs)
Beispiel #10
0
def run_checkers():
    t = TaskUtils()
    #Optional: Django field lookup keyword arguments to specify which reference objects (Article)
    #to use for checker runs, e.g.:
    kwargs = {
        'check_me':
        True,  #imaginary, model Article hat no attribute 'check_me' in example
    }
    #Optional as well: For more complex lookups you can pass Q objects vi args argument
    args = (Q(id__gt=100), )
    t.run_checkers(Article, 'news_website__scraper', 'checker_runtime',
                   'article_checker', *args, **kwargs)
Beispiel #11
0
def search_it(request, template_name='core/home.html'):
    search = '' #add in the slug maker
    form = SearchForm(request.POST) # A form bound to the POST data
    if form.is_valid(): # All validation rules pass
        form.process()
        search = form.cleaned_data['title']
        slug = slugify(search)
        try:
            e = Den.objects.get(slug=slug)
        except ObjectDoesNotExist:
            den = form.save(commit=False)
            den.save()

            #Spider Tasks
            t = TaskUtils()
            t.run_spiders(NewsWebsite, 'scraper', 'scraper_runtime', 'article_spider', search)

        return redirect('den/' + slug)
    return render(request, template_name, {'form': form,})
Beispiel #12
0
def run_spiders():
    t = TaskUtils()
    #Optional: Django field lookup keyword arguments to specify which reference objects (Source)
    #to use for spider runs, e.g.:
    kwargs = {
    }
    #Optional as well: For more complex lookups you can pass Q objects vi args argument
    args = ()

    util.fetch_token()

    t.run_spiders(Source, 'scraper', 'scraper_runtime', 'ii_spider', *args, **kwargs)

# @task()
# def run_checkers():
#     t = TaskUtils()
#     #Optional: Django field lookup keyword arguments to specify which reference objects (Article)
#     #to use for checker runs, e.g.:
#     kwargs = {
#         'check_me': True, #imaginary, model Article hat no attribute 'check_me' in example
#     }
#     #Optional as well: For more complex lookups you can pass Q objects vi args argument
#     args = (Q(id__gt=100),)
#     t.run_checkers(Article, 'news_website__scraper', 'checker_runtime', 'article_checker', *args, **kwargs)
Beispiel #13
0
def run_checkers():
    t = TaskUtils()
    t.run_checkers(Product, 'source__scraper', 'checker_runtime', 'product_checker')
Beispiel #14
0
def run_checker_tests():
    t = TaskUtils()
    t.run_checker_tests()
Beispiel #15
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(NewsWebsite, 'scraper', 'scraper_runtime', 'article_spider')
Beispiel #16
0
def run_checkers():
    t = TaskUtils()
    t.run_checkers(Article, 'news_website__scraper', 'checker_runtime', 'article_checker')
def run_checkers():
    t = TaskUtils()
    t.run_checkers(Article, 'checker_runtime', 'article_checker')
Beispiel #18
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(NewsWebsite, 'scraper', 'scraper_runtime', 'product_spider')
Beispiel #19
0
def run_checkers():
    t = TaskUtils()
    args = (Q(id__gt=100),)
    t.run_checkers(Data, 'news_website__scraper', 'checker_runtime', 'whale_checker', *args, **kwargs)
Beispiel #20
0
def run_spiders():
    t = TaskUtils()
    args = (Q(name='egg'),)
    t.run_spiders(NewsWebsite, 'scraper', 'scraper_runtime', 'whale', *args, **kwargs)
Beispiel #21
0
def run_spiders():
    print('running spiders')
    t = TaskUtils()
    t.run_spiders(Casino, 'scraper', 'scraper_runtime', 'promotion_spider')
Beispiel #22
0
def run_checkers():
    t = TaskUtils()
    t.run_checkers(Article, 'news_website__scraper', 'checker_runtime', 'article_checker')
Beispiel #23
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(InsuranceWebsite, 'scraper', 'scraper_runtime', 'loan_spider')
Beispiel #24
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(LoanScraper, 'scraper', 'scraper_runtime', 'loan_spider')
Beispiel #25
0
def run_checkers():
    t = TaskUtils()
    t.run_checkers(VisaInformation, 'checker_runtime', 'article_checker')
Beispiel #26
0
def run_checkers():
    t = TaskUtils()
    t.run_checkers(main_models.News, 'news_website__scraper',
                   'checker_runtime', 'news_checker', *args, **kwargs)
Beispiel #27
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(main_models.NewsWebsite, 'scraper',
                  'scraper_runtime', 'news_spider')
Beispiel #28
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(Basicinfo, 'scraper_runtime', 'article_spider')
Beispiel #29
0
def run_checkers():
    t = TaskUtils()
    t.run_checkers(Item, 'website__scraper', 'checker_runtime', 'fly_checker')
Beispiel #30
0
def run_checkers():
    t = TaskUtils()
    t.run_checkers(Loan, 'loan_website__scraper', 'checker_runtime', 'loan_checker')
def run_checkers():
    t = TaskUtils()
    kwargs = {}
    args = (Q(), )
    t.run_checkers(Address, 'source__scraper', 'checker_runtime',
                   'hydro_quebec_checker', *args, **kwargs)
Beispiel #32
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(Source, 'scraper', 'scraper_runtime', 'product_spider')
def run_spiders():
    t = TaskUtils()
    kwargs = {}
    args = (Q(), )
    t.run_spiders(AddressWebsite, 'scraper', 'scraper_runtime', 'hydro_quebec',
                  *args, **kwargs)
Beispiel #34
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(Website, 'scraper', 'scraper_runtime', 'fly_spider')
Beispiel #35
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(NewsWebsite, 'scraper', 'scraper_runtime', 'dmoz')
Beispiel #36
0
def run_spiders():
    t = TaskUtils()
    t.run_spiders(Website, 'scraper', 'scraper_runtime', 'article_spider')
def run_checker_tests():
    t = TaskUtils()
    t.run_checker_tests()