Example #1
0
def ctx(category=''):
    tree = fetch(f'{domain}/python/topics/{category}')
    posts = tree.css('ul.note-list li')
    return {
        'title': 'CTOLib码库',
        'link': domain,
        'description': 'Python开发社区',
        'author': 'alphardex',
        'items': list(map(parse, posts))
    }
Example #2
0
def ctx(category=''):
    tree = fetch(f"{domain}/main/zcgl/zxgg/index.shtml?catalogId=1,5,228")
    posts = tree.css('.news_list li')
    return {
        'title': '东兴资管产品最新公告',
        'link': f'{domain}/main/zcgl/zxgg/index.shtml?catalogId=1,5,228',
        'description': '东兴资管产品最新公告',
        'author': 'hillerliao',
        'items': list(map(parse, posts))
    }
Example #3
0
def ctx(category=''):
    tree = fetch(f"{domain}/{category}")
    posts = tree.css('.feed_body .pagedlist_item')
    return {
        'title': '传送门',
        'link': domain,
        'description': '传送门:微信公众号订阅',
        'author': 'alphardex',
        'items': list(map(parse, posts))
    }
Example #4
0
def ctx(category=''):
    tree = fetch(f"{domain}/search/scroll/{category}.jsp")
    posts = tree.css('dl')
    channel_title = tree.css('b').css('b::text').extract_first()
    return {
        'title': channel_title,
        'link': f'{domain}/search/scroll/{category}.jsp',
        'description': '财新网滚动新闻',
        'author': 'hillerliao',
        'items': list(map(parse, posts)) 
    }
Example #5
0
def ctx(category=''):
    DEFAULT_HEADERS.update(
        {'Referer': f'https://www.chaindd.com/column/{category}'})
    tree = fetch(f"{domain}/column/{category}")
    posts = tree.css('li .cont')
    return {
        'title': f'链得得栏目{category}最新文章',
        'link': f'{domain}/column/{category}',
        'description': f'链得得栏目{category}最新文章',
        'author': 'hillerliao',
        'items': list(map(parse, posts))
    }
Example #6
0
def ctx(category=''):
    tree = fetch(f"{domain}/RssFeed/subjectcode/13-Earnings%20Releases%20And%20Operating%20Results/feedTitle/GlobeNewswire%20-%20Earnings%20Releases%20And%20Operating%20Results")
    posts = tree.css('item')
    items = list(map(parse, posts)) 
    items = filter_content(items)
    return {
        'title': 'Earnings Date - Globenewswire',
        'link': f'{domain}/RssFeed/subjectcode/13-Earnings%20Releases%20And%20Operating%20Results/feedTitle/GlobeNewswire%20-%20Earnings%20Releases%20And%20Operating%20Results',
        'description': 'Earnings Date - Globenewswire',
        'author': 'hillerliao',
        'items': items
    }
Example #7
0
def ctx(category=''):
    tree = fetch(f"https://feed.{domain}/rss/home/?rss=G1QFDERJXkJeGVtYWA==",
                 headers=DEFAULT_HEADERS)
    posts = tree.css('item')
    items = list(map(parse, posts))
    items = filter_content(items)
    return {
        'title': 'Earnings Date - Businesswire',
        'link':
        f'https://www.{domain}/portal/site/home/news/subject/?vnsId=31407',
        'description': 'Earnings Date - Businesswire',
        'author': 'hillerliao',
        'items': items
    }
Example #8
0
def ctx(author=''):
    url = f"{domain}/author/{author}"
    tree = fetch(url=url, headers=DEFAULT_HEADERS)
    html = tree.css('body')
    mp_name = html.css('h1::text').get().split(':')[-1]
    mp_description = html.css('.archive-description::text').get()
    posts = html.css('.entry-content-wrap')
    return {
        'title': f'{mp_name} - 公众号',
        'link': url,
        'description': mp_description,
        'author': 'hillerliao',
        'items': list(map(parse, posts))
    }
Example #9
0
def ctx(category=''):
    # DEFAULT_HEADERS.update({'upgrade-insecure-requests': 1})
    url = f"{domain}/news-releases/financial-services-latest-news/earnings-list/?page=1&pagesize=100"
    tree = fetch(url, headers=DEFAULT_HEADERS)
    posts = tree.css('.card-list-hr .row')
    items = list(map(parse, posts)) 
    items = filter_content(items)
    return {
        'title': 'Earnings Date - Prnewswire',
        'link': f'{domain}/news-releases/financial-services-latest-news/earnings-list/',
        'description': 'Earnings Date - Prnewswire',
        'author': 'hillerliao',
        'items': items
    }
Example #10
0
def ctx(category=''):
    url = f'{domain}/column/{category}'
    DEFAULT_HEADERS.update({'Host': 'www.jintiankansha.me'})
    tree = fetch(url, headers=DEFAULT_HEADERS)
    posts = tree.css('.cell.item')
    items = list(map(parse, posts))

    column_title = tree.css('title::text').extract_first()
    return {
        'title': f'{column_title}',
        'description': f'{category}',
        'link': url,
        'author': f'hillerliao',
        'items': items
    }
Example #11
0
def ctx(gh=''):
    global url
    url = f"{domain}/weixin?type=1&s_from=input&query={gh}&ie=utf8&_sug_=n&_sug_type_=&w=01019900&sut=1554&sst0=1628603087755&lkt=0%2C0%2C0"
    tree = fetch(url=url, headers=DEFAULT_HEADERS)
    global dd_num
    dd_num = len(tree.css('dd'))
    posts = [tree.css('dd')[-1]]
    mp_name = tree.css('p.tit a::text').get()
    mp_description = tree.css('dd::text')[0].get()
    return {
        'title': f'{mp_name}-公众号',
        'link': url,
        'description': mp_description,
        'author': 'hillerliao',
        'items': list(map(parse, posts))
    }
Example #12
0
def ctx(category=''):

    stock = category
    
    def parse(post):
        item = {}
        item['description'] = item['title'] = stock.upper() + '的评级:' +  ', '.join(post.css('td::text').extract())
        item['link'] = url
        return item    

    
    url = f'{domain}/stock/{category}/ratings'
    tree = fetch(url, headers=DEFAULT_HEADERS)
    posts = tree.css('tbody tr')
    items = list(map(parse, posts))

    column_title = tree.css('title::text').extract_first()
    return {
        'title': f'{column_title} - benzinga',
        'description': f'{column_title} - benzinga',
        'link': url,
        'author': f'hillerliao',
        'items': items
    }
Example #13
0
def get_content(url):
    tree = fetch(url=url, headers=DEFAULT_HEADERS)
    content = tree.css('.single-content').get()
    return content