Posts

Showing posts with the label ibm-cloud

IBM Cloud functions - Unable to create an action

Image
IBM Cloud functions - Unable to create an action I'm unable to create an IBM Cloud action. I have no idea why. My IBM data that I get in console is as follows: API endpoint: https://api.eu-gb.bluemix.net Region: eu-gb User: my-name@my-company.com Account: My Name's Account (12fcae9b137946b8bbfe481448612345) Resource group: Default CF API endpoint: https://api.eu-gb.bluemix.net (API version: 2.92.0) Org: my-org Space: dev That look fine to me. When I execute the test action as the docs says here as follows: test action ibmcloud wsk action invoke whisk.system/utils/echo -p message hello --result I get correct result: { "message": "hello" } But I'm not able to create my own actions. The folder looks as follows: Thus there is .zip file that I created with .zip zip -r as24-crawler.zip virtualenv commmon.py __main__.py And now when I try to create an action as the docs says here with ...

Why the Python Scrapy library class isn't executed

Why the Python Scrapy library class isn't executed I'm trying to use Scrapy on IBM cloud as a function. My __main__.py is as follows: __main__.py import scrapy from scrapy.crawler import CrawlerProcess class AutoscoutListSpider(scrapy.Spider): name = "vehicles list" def __init__(self, params, *args, **kwargs): super(AutoscoutListSpider, self).__init__(*args, **kwargs) make = params.get("make", None) model = params.get("model", None) mileage = params.get("mileage", None) init_url = "https://www.autoscout24.be/nl/resultaten?sort=standard&desc=0&ustate=N%2CU&size=20&page=1&cy=B&mmvmd0={0}&mmvmk0={1}&kmto={2}&atype=C&".format( model, make, mileage) self.start_urls = [init_url] def parse(self, response): # Get total result on list load init_total_results = int(response.css('.cl-filters-summary-counter::...