Skip to content

OSC spider for new info #7

Description

@edonyzpc

https://github.com/edonyM/edonyM.github.io/issues/49

import scrapy

class OSCSpider(scrapy.Spider):
    name = "OSC"
    allowd_domains = ["www.oschina.net"]
    start_url = ['http://www.oschina.net/news/industry']

    def parse(self, response):
        self.log("fet the OSC: " + response.url)
        for item in response.css('div.main-info box-aw'):
            url = item.css('a::attr(href)').extract_first()
            yield url

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions